Ticket #19 (closed feature request: fixed)
Annotated trees
| Reported by: | jcpetruzza@… | Owned by: | nibro |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | syntax | Version: | |
| Keywords: | Cc: |
Description
It would be interesting if the ASTs allowed for used-defined annotations.
For example, right now one can parse a source file and get something of type Module; the idea would be to instead obtain something of type Module (). One could then analyze it and transform it into something of type Module (Maybe TypeAnnotations) (e.g. including the type of some the expressions and subexpressions) or Module DefiningModule (e.g. annotating each function with the module that defined it), etc.
Perhaps this can be related to ticket #12: SrcLoc might be removed from the AST definitions and instead become a form of used-defined annotation (Module SrcLoc) together with the ability to have an alternate parser that returns expressions of type Module SrcSpan.
