mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-19 03:44:23 -05:00
added git st with the new operator regex
This commit is contained in:
@@ -99,7 +99,7 @@ while true
|
|||||||
continue if continuing.
|
continue if continuing.
|
||||||
|
|
||||||
# Unary operators.
|
# Unary operators.
|
||||||
!true
|
!!true
|
||||||
|
|
||||||
# Lexical scoping.
|
# Lexical scoping.
|
||||||
a: 5
|
a: 5
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ token JS
|
|||||||
|
|
||||||
# Declare order of operations.
|
# Declare order of operations.
|
||||||
prechigh
|
prechigh
|
||||||
nonassoc UMINUS NOT '!' '~'
|
nonassoc UMINUS NOT '!' '!!' '~'
|
||||||
left '*' '/' '%'
|
left '*' '/' '%'
|
||||||
left '+' '-'
|
left '+' '-'
|
||||||
left '<<' '>>' '>>>'
|
left '<<' '>>' '>>>'
|
||||||
@@ -138,6 +138,7 @@ rule
|
|||||||
# https://www.cs.auckland.ac.nz/references/ruby/ProgrammingRuby/language.html
|
# https://www.cs.auckland.ac.nz/references/ruby/ProgrammingRuby/language.html
|
||||||
Operation:
|
Operation:
|
||||||
'!' Expression { result = OpNode.new(val[0], val[1]) }
|
'!' 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]) }
|
| '-' Expression = UMINUS { result = OpNode.new(val[0], val[1]) }
|
||||||
| NOT Expression { result = OpNode.new(val[0], val[1]) }
|
| NOT Expression { result = OpNode.new(val[0], val[1]) }
|
||||||
| '~' Expression { result = OpNode.new(val[0], val[1]) }
|
| '~' Expression { result = OpNode.new(val[0], val[1]) }
|
||||||
|
|||||||
Reference in New Issue
Block a user