Open meyerkizner opened 10 years ago
Yeah, I agree, this needs to happen. There was a reason for the current design, but it turns out it was mostly unfounded.
On Jun 6, 2014, at 12:05 AM, meyerkizner notifications@github.com wrote:
Currently the document compiler uses a hierarchy of Block instances as an intermediate representation, which is best described as a concrete syntax tree. I think parsing to a proper AST would be a more robust design, because as things stand there's lots of functionality in the code generator that in principle shouldn't be there. This is especially true for more complex BlockGenerators like those for lists and tables. Parsing to an AST would allow us to implement this functionality with AST walkers/visitors instead.
— Reply to this email directly or view it on GitHub.
Currently the document compiler uses a hierarchy of
Block
instances as an intermediate representation, which is best described as a concrete syntax tree. I think parsing to a proper AST would be a more robust design, because as things stand there's lots of functionality in the code generator that in principle shouldn't be there. This is especially true for more complexBlockGenerator
s like those for lists and tables. Parsing to an AST would allow us to implement this functionality with AST walkers/visitors instead.