mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 03:21:20 -05:00
Issue #621. Added the ability to leave the start and end index off of arrays. list[5..] is now valid CoffeeScript, slicing to the end of the array.
This commit is contained in:
@@ -348,6 +348,10 @@ grammar =
|
||||
Slice: [
|
||||
o "INDEX_START Expression . . Expression INDEX_END", -> new RangeNode $2, $5
|
||||
o "INDEX_START Expression . . . Expression INDEX_END", -> new RangeNode $2, $6, true
|
||||
o "INDEX_START Expression . . INDEX_END", -> new RangeNode $2, null
|
||||
o "INDEX_START Expression . . . INDEX_END", -> new RangeNode $2, null, true
|
||||
o "INDEX_START . . Expression INDEX_END", -> new RangeNode null, $4
|
||||
o "INDEX_START . . . Expression INDEX_END", -> new RangeNode null, $5, true
|
||||
]
|
||||
|
||||
# The array literal.
|
||||
|
||||
Reference in New Issue
Block a user