Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The if condition:
- <keyword><conditional expression><code>
- Conditional expressions need a LEFT and RIGHT side:
- if 1 < 2 && 0 != "Hello" foobar();
- | | | | | |
- | L + R L -+--- R <code>
- | | |
- | L ---+--- R
- | |
- | <cond. expr.>
- <keyword>
- Parsing:
- Enter EXPRESSION PARSER when <keyword> is encountered
- Exit EXPRESSION PARSER when sides are balanced
- Single-sided expressions: If the LEFT side returns a boolean value
- OR/AND no conditional operator is found, the expression is also balanced.
Advertisement
Add Comment
Please, Sign In to add comment