-
In my DSL
I want to change the argument in If I need to change(or append) AST node, Where can I do it? Scope computation? linker? validator? I have no idea at all. Thanks in advance... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
do you want to change it in the file (refactoring) or in the ast, if in the ast you want to change all -1 to 0, if yes you might look into datatype rules and value converters |
Beta Was this translation helpful? Give feedback.
Hey @negahama,
you shouldn't attempt to change the AST. I would instead recommend you to perform the offset (i.e.
-1
) operation during the transpilation. That way you don't need to keep track of the offset during all other operations (like validation, etc.). You would essentially do something like this: