allowing Klass::['dynamic-property'] syntax. Issue #392

This commit is contained in:
Jeremy Ashkenas
2010-05-31 22:32:43 -04:00
parent b8a4adbdc7
commit 45f442bd73
10 changed files with 178 additions and 167 deletions

View File

@@ -253,7 +253,8 @@ grammar: {
# Indexing into an object or array using bracket notation.
Index: [
o "INDEX_START Expression INDEX_END", -> new IndexNode $2
o "SOAKED_INDEX_START Expression SOAKED_INDEX_END", -> new IndexNode $2, 'soak'
o "INDEX_SOAK Index", -> $2.soak_node: yes; $2
o "INDEX_PROTO Index", -> $2.proto: yes; $2
]
# In CoffeeScript, an object literal is simply a list of assignments.