eth-cscs / modparser

BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Implement AST printer as Visitor #6

Open bcumming opened 9 years ago

bcumming commented 9 years ago

The current Expression::to_string() method for printing AST nodes has stopped scaling (e.g. indentation of sub-nodes isn't working well).

vkarak commented 8 years ago

I think this is fixed already, isn't it?

bcumming commented 8 years ago

No, it wasn't fixed. It is implemented as a to_string method in each specialization of Expression. This needs to be cleaned up so that things like indentation when printing chunks of AST works properly.

vkarak commented 8 years ago

Ok, now I see. It's just for printing the AST itself. I thought it was referring to the CPrinter/CUDAPrinter.

bcumming commented 8 years ago

The printer is very useful for debugging the compiler, and will also be useful as the logging facility is expanded.