Am 03.02.2013 08:15, schrieb dennis luehring:
Am 01.02.2013 12:24, schrieb Timon Gehr:
On 02/01/2013 11:54 AM, Jacob Carlborg wrote:
...
Sounds like an ugly hack for AST macros. This is a proposal for AST
macros I've been working on. It's not finished but here it is:
https://dl.dropbox.com/u/18386187/ast_macros.html
Make sure to include some way to pattern match on the syntax trees.
(Otherwise we are back to manual parsing of the ast.toString() output.)
from the text
"...The first parameter of macro is always of the type Context..."
is then there a real need for context as an parameter - it semanticly
similar to "this" in the class scope - i would prefer a "context"
keyword inside of the macro scope
i understand that pushing the context und sub-macro is a need
but didn't you define a macro-type by
alias macro (Ast!(string) str) my_macro
and this type can be used by sub-macros like normal typed parameters
another question:
why Ast! here - can the input any else than a AST?
and why not use your $ notation not also here $string?