Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- start <<= importStmt & P(";") & P("EOF");
- importStmt <<= t_public & +(t_comma & t_public) >>= (ParseTree tree) {
- stderr.writeln("~~~~~~~~~~~~~~~~~~~~");
- stderr.writeln(indent(tree.toString()) ~ " -> ");
- auto res = new ParseTree([tree.children[0]]);
- foreach(child; tree.children[1].children)
- res.children = res.children ~ child.children[1];
- stderr.writeln(indent(res.toString()));
- stderr.writeln("~~~~~~~~~~~~~~~~~~~~");
- return res;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement