Created
March 6, 2011 22:37
-
-
Save gvx/857812 to your computer and use it in GitHub Desktop.
DejaVu test for parsing tree
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
func some function: | |
a test | |
catch handler: | |
some mistake | |
if this is wrong: | |
tell me why | |
elseif this should not fail: | |
hello | |
if hi: | |
bye | |
labda x: | |
x | |
call | |
else: | |
shut up | |
while we live: | |
for ever and ever: | |
this is still a test | |
fib n: | |
if <= n 1: | |
return n | |
return + fib - n 1 fib - n 2 | |
this is it |
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
File[FuncStatement[ArgumentList | |
BodyClause[Line | |
CatchStatement[ErrorHandler | |
BodyClause[Line | |
IfStatement[IfClause[ConditionClause | |
Line | |
] | |
ElseIfClause[ConditionClause | |
Line | |
IfStatement[IfClause[ConditionClause | |
Line | |
LabdaStatement[ArgumentList | |
BodyClause[Line] | |
] | |
Line | |
]] | |
] | |
ElseClause[Line] | |
] | |
] | |
] | |
] | |
] | |
WhileStatement[ConditionClause | |
BodyClause[ForStatement[ForClause | |
BodyClause[Line] | |
]] | |
] | |
FuncStatement[ArgumentList | |
BodyClause[IfStatement[IfClause[ConditionClause | |
Line | |
]] | |
Line | |
] | |
] | |
Line | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment