Skip to content

Commit

Permalink
added git st with the new operator regex
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Dec 24, 2009
1 parent 2b94849 commit b1f3ad2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/code.cs
Expand Up @@ -99,7 +99,7 @@
continue if continuing.
# Unary operators.
!true
!!true
# Lexical scoping.
a: 5
Expand Down
3 changes: 2 additions & 1 deletion lib/coffee_script/grammar.y
Expand Up @@ -18,7 +18,7 @@ token JS

# Declare order of operations.
prechigh
nonassoc UMINUS NOT '!' '~'
nonassoc UMINUS NOT '!' '!!' '~'
left '*' '/' '%'
left '+' '-'
left '<<' '>>' '>>>'
Expand Down Expand Up @@ -138,6 +138,7 @@ rule
# https://www.cs.auckland.ac.nz/references/ruby/ProgrammingRuby/language.html
Operation:
'!' Expression { result = OpNode.new(val[0], val[1]) }
| '!!' Expression { result = OpNode.new(val[0], val[1]) }
| '-' Expression = UMINUS { result = OpNode.new(val[0], val[1]) }
| NOT Expression { result = OpNode.new(val[0], val[1]) }
| '~' Expression { result = OpNode.new(val[0], val[1]) }
Expand Down

0 comments on commit b1f3ad2

Please sign in to comment.