Synopsis Yield the string of characters that form the leafs of the given parse tree.
Function str unparse(Tree tree)
Usage import ParseTree;
Description unparse is the inverse function of parse, i.e., for every syntactically correct string TXT of type S, the following holds:
unparse(parse(#S, TXT)) == TXT
rascal>import demo::lang::Exp::Concrete::NoLayout::Syntax;
rascal>import ParseTree;
First parse an expression, this results in a parse tree. Then unparse this parse tree:
rascal>unparse(parse(#Exp, "2+3"));
str: "2+3"
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit