Yield of a (sub)parse tree in Rascal -
how can obtain yield of (sub)parse tree in rascal, i.e., text associated subtree? ex., during visit encounter declaration (with java/m3) , want text of declaration. have tried "unparse", gives "does not match of declared (overloaded) signature patterns :unparse(tree)", guess works top sort/starting symbol.
one of simplest solutions using string template , inserting subtree in -- assuming subtree d
:
"<d>"
this automatically unparse d
. more sophisticated pretty printing missing on our todo list.
Comments
Post a Comment