Created
October 15, 2013 19:04
-
-
Save joewalnes/6996934 to your computer and use it in GitHub Desktop.
parser notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"{{foo bar.baz.bam}}" | |
OPEN ID(foo) ID(bar) SEP ID(baz) SEP ID(bam) CLOSE | |
root | |
TemplateNode(statements) | |
TemplateNode([statement]) | |
TemplateNode([expression]) | |
TemplateNode([ExpressionNode(expression_contents)]) | |
TemplateNode([ExpressionNode(path param* hash?)]) | |
TemplateNode([ExpressionNode(IdNode.build(path_segments) param*)]) | |
TemplateNode([ExpressionNode(IdNode.build(id) param*)]) | |
TemplateNode([ExpressionNode(IdNode.build([CallNode("foo")]) param*)]) | |
TemplateNode([ExpressionNode(CallNode("foo") param*)]) | |
TemplateNode([ExpressionNode(CallNode("foo") path)]) | |
TemplateNode([ExpressionNode(CallNode("foo") IdNode.build(path_segments))]) | |
TemplateNode([ExpressionNode(CallNode("foo") IdNode.build(((([CallNode("bar")]) << CallNode("baz")) << CallNode("bam"))))]) | |
TemplateNode([ExpressionNode(CallNode("foo") IdNode.build([CallNode("bar"), CallNode("baz"), CallNode("bam")))]) | |
TemplateNode([ExpressionNode(CallNode("foo") PathNode([CallNode("bar"), CallNode("baz"), CallNode("bam")))]) | |
to_s => "EXPRESSION(ID(foo) [PATH(ID(bar) ID(baz) ID(bam)]) )" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment