added git st with the new operator regex

This commit is contained in:
Jeremy Ashkenas
2009-12-24 00:37:33 -05:00
parent 64733981fd
commit a1ee622aa6
3 changed files with 888 additions and 863 deletions

View File

@@ -99,7 +99,7 @@ while true
continue if continuing.
# Unary operators.
!true
!!true
# Lexical scoping.
a: 5

View File

@@ -18,7 +18,7 @@ token JS
# Declare order of operations.
prechigh
nonassoc UMINUS NOT '!' '~'
nonassoc UMINUS NOT '!' '!!' '~'
left '*' '/' '%'
left '+' '-'
left '<<' '>>' '>>>'
@@ -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]) }

File diff suppressed because it is too large Load Diff