Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add logical operators.
  • Loading branch information
arnsholt committed Jan 5, 2015
1 parent 3d5cb58 commit ad0c213
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Snake/Grammar.nqp
Expand Up @@ -165,6 +165,10 @@ token infix:sym«>=» { <sym> }
token infix:sym<==> { <sym> }
token infix:sym<!=> { <sym> }

token infix:sym<and> { <sym> <O('%booland, :op<if>')> }
token infix:sym<or> { <sym> <O('%booland, :op<unless>')> }
token prefix:sym<not> { <sym> <O('%boolnot, :op<isfalse>')> }

## 2.6: Delimiters
# Handled elsewhere, since we don't have a separate lexer stage.

Expand Down

0 comments on commit ad0c213

Please sign in to comment.