Fixed a small bug that happened when having a trailing comma in multiline array and object literals

This commit is contained in:
matehat
2010-03-26 14:11:34 -04:00
parent b9b87f7d8e
commit 8f3ea1d0c5
5 changed files with 122 additions and 107 deletions

View File

@@ -256,6 +256,7 @@ grammar: {
# An **AssignList** within a block indentation.
IndentedAssignList: [
o "INDENT AssignList OUTDENT", -> $2
o "INDENT AssignList , OUTDENT", -> $2
]
# The three flavors of function call: normal, object instantiation with `new`,
@@ -330,6 +331,7 @@ grammar: {
o "ArgList , TERMINATOR Expression", -> $1.concat [$4]
o "ArgList , INDENT Expression", -> $1.concat [$4]
o "ArgList OUTDENT"
o "ArgList , OUTDENT"
]
# Just simple, comma-separated, required arguments (no fancy syntax). We need