mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-04-11 03:00:13 -04:00
allowing expressions within range literals
This commit is contained in:
@@ -265,8 +265,10 @@ rule
|
||||
|
||||
# The range literal.
|
||||
Range:
|
||||
"[" Value "." "." Value "]" { result = RangeNode.new(val[1], val[4]) }
|
||||
| "[" Value "." "." "." Value "]" { result = RangeNode.new(val[1], val[5], true) }
|
||||
"[" Expression
|
||||
"." "." Expression "]" { result = RangeNode.new(val[1], val[4]) }
|
||||
| "[" Expression
|
||||
"." "." "." Expression "]" { result = RangeNode.new(val[1], val[5], true) }
|
||||
;
|
||||
|
||||
# The array literal.
|
||||
|
||||
Reference in New Issue
Block a user