hawkw / decaf

like Java, but less so
hawkweisman.me/decaf
Other
18 stars 4 forks source link

Add AST implementation #4

Closed hawkw closed 9 years ago

hawkw commented 9 years ago

As of 9199119, my abstract syntax tree should be complete. It has node types for each of the node types in the C++ implementation (ast.h/ast-stmt.h/ast-expr.h/ast-decl.h/ast-type.h) in pp2, and should pretty print the tree identically to the C++ implementation, which should allow us to write a spec for the parser that just tests our output against the sample files, much as we did for the lexer.

If you wanna go over it briefly before merging, that'd be awesome. Otherwise, it should be good.

hawkw commented 9 years ago

Please don't accept this until I resolve one final blocker that I missed earlier.

hawkw commented 9 years ago

Okay, 7c8c83c fixes all the bugs, it should be green to merge now. All tests nominal (although that means very little since we don't have a spec for this yet, but it's good to know that it doesn't break DecafLexical, I guess).