abort if only remaining nodes are doomed
[sbp.git] / tests / ifthen.tc
1 testcase {
2   input "if (foo) if (bar) baz else bop";
3   output "IfThen:{Identifier:{{f o o}} IfThenElse:{IfThen:{Identifier:{{b a r}} Identifier:{{b a z}}} Identifier:{{b o p}}}}";
4
5   s             = Expr
6
7   Expr          = IfThen::     "if" "(" Expr ")" Expr             /ws
8                 | IfThenElse:: "if" "(" Expr ")" (x:: Expr "else" Expr /ws &~ Expr) /ws
9                 | Identifier:: [a-z]++ 
10
11   ws            = [\n ]**
12
13 }