new-scaladoc's People
Forkers
cvogtnew-scaladoc's Issues
Example/test for all features we support
support type aliases and abstract types
e.g.
trait Foo{
type Z // abstract type
type X = Option[Map[Int, String]] // type alias
}
use collect for implementation of processPackage instead of manual re
def processPackage(pack: Package): String = {
val grouped: Map[String, Seq[DocElement]] = pack.elements.groupBy {
case e: ClassDoc => "classes"
case e: ObjectDoc => "objects"
case e: TraitDoc => "traits"
case e: DocElement => "nvm"
}
processObjects(grouped("objects").map(_.asInstanceOf[ObjectDoc]))
->
val objects = pack.elements.collect { case o: ObjectDoc => o }
processObjects(objects)
Add document describing the design decisions
can be in the readme, just an overview about the ideas behind this project, so that someone else can understand the context and how we decided to solve thus problem
investigate how to best parse scaladoc
- check scaladoc's parser and how hard it is to port it
- check scala meta on how to get the doc code
- make a plan how to integrate it
probably we need an html backend independent of latex
Turn sample model into test in src/test/ rather than main method in src/main/
This file needs to be turned into a test. https://github.com/kolowheel/new-scaladoc/blob/74918a4cddabb1bc2aa8322c54fef53026e35364/src/main/scala/Main.scala You already got ScalaTest in your dependencies. Use it :). Also, please just use the FunSuite with assert calls, no funny dsls (the test framework are meaning well, but doing harm there in my eyes).
support linking between types in document
generate HTML code via latex
support parameterized and intersection types
Foo[T,Q] and T with Q
remove .stripMargin calls from code base
there are some orphaned calls and in general let's avoid stripMargin if in any way possible, it just make the code harder to mangle.
support type names like `Seq.Seq`
Create code that generates an index from a model
An index like http://www.scala-lang.org/api/2.11.5/index.html#index.index-a, where all classes and methods etc are listed. Hopefully a better one, that is structured by type, method, term (aka value or object), etc. This may need some case classes, which aren't prefilled in a model, but computed from a model and can be used by a backend to produce a visual representation of the index.
use sealed traits in trees
show and link superclasses / traits in output
parse scaladoc comments /** @param, @usecase etc */
Frontend
Write frontend that goes from Scala source code to new-scaladoc trees. Wrap it all up, so you can go straight from source to PDF docs all the way.
Create Model for generics
make model as close to meta as possible
I would like to see this project help the efforts in scala meta and meta doc if in any way possible. One is to keep the trees as similar as possible, so that it is easy to take over code between the projects or interop as libraries.
It seems to me that the strategy should be that we replicate meta's trees in their current state, but add all doc relevant data that meta computes using a compiler as actual data into the model, e.g. super classes.
It sounds like metadoc is doing that (without having checked that). If that is the case, we can basically take a subset of metadoc's model as we go and eventually hopefully the full model and concentrate on the backends and improving metadocs model rather than newly inventing it from scratch.
So we should adapt the current model to metadoc's model (if it is true that it is designed as described above).
integrate with scala meta
plug scala meta in the front that starts with source code and write a converter that converts the corresponding trees to our trees. Plus wrap it all up as a full circle prototype.
support modifiers in output latex
support multiple argument lists
light weight html+javascript backend, that uses javascript for quick search
Add Readme
What is this and why does the world need this?
How to run it and play with it?
What can you work on to improve this / important missing features?
use local `pdflatex` installation to generate PDF
automate turning the generated latex file into a PDF, ideally from SBT, or alternatively from a .bat file
resolve type references using meta's semantic api
Figure out if meta already works for resolving
- parent types
- inferred return types (decltype = None)
- link companion / classes
If it does, let's use it to do that, otherwise let's just document here, where meta isn't ready yet. Integrating meta is fun, but we should aim for not being slowed down or blocked by meta's experimental stage. So not spend too much time on working around meta problems.
support nested / path dependent type
class A{ class B }
val a1 = new A
val a2 = new A
val b: A#B = new a2.B (edited)
class A{ class B; def b: B }
Make sure it "just works"
Clean up rough edges to make the "user experience" nice. Someone should be able to just install pdflatex, clone the project and smoothly run it on the sample sources.
Decide how to do HTML output
Do we want to generate our HTML from Latex or make it its own independent output format? We must choose!
fix indentation of strings in generator
some strings are weirdly indented, they should be something like (or close to)
class Baz{
def foo = s"""dsfsfdsf"""
def bar = s"""
fsfsdf
sdfsdfsdf
sdfsdf
"""
}
support all of our features using meta semantic api
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.