eliminating the IndentedAssignList nonterminal.

This commit is contained in:
Jeremy Ashkenas
2010-04-25 21:22:29 -04:00
parent 315a2c63fa
commit 328a14014c
3 changed files with 125 additions and 137 deletions

View File

@@ -245,8 +245,6 @@
// In CoffeeScript, an object literal is simply a list of assignments. // In CoffeeScript, an object literal is simply a list of assignments.
Object: [o("{ AssignList OptComma }", function() { Object: [o("{ AssignList OptComma }", function() {
return new ObjectNode($2); return new ObjectNode($2);
}), o("{ IndentedAssignList OptComma }", function() {
return new ObjectNode($2);
}) })
], ],
// Assignment of properties within an object literal can be separated by // Assignment of properties within an object literal can be separated by
@@ -261,10 +259,7 @@
return $1.concat([$3]); return $1.concat([$3]);
}), o("AssignList , TERMINATOR AssignObj", function() { }), o("AssignList , TERMINATOR AssignObj", function() {
return $1.concat([$4]); return $1.concat([$4]);
}) }), o("INDENT AssignList OptComma OUTDENT", function() {
],
// An **AssignList** within a block indentation.
IndentedAssignList: [o("INDENT AssignList OptComma OUTDENT", function() {
return $2; return $2;
}) })
], ],

File diff suppressed because one or more lines are too long

View File

@@ -256,7 +256,6 @@ grammar: {
# In CoffeeScript, an object literal is simply a list of assignments. # In CoffeeScript, an object literal is simply a list of assignments.
Object: [ Object: [
o "{ AssignList OptComma }", -> new ObjectNode $2 o "{ AssignList OptComma }", -> new ObjectNode $2
o "{ IndentedAssignList OptComma }", -> new ObjectNode $2
] ]
# Assignment of properties within an object literal can be separated by # Assignment of properties within an object literal can be separated by
@@ -267,10 +266,6 @@ grammar: {
o "AssignList , AssignObj", -> $1.concat [$3] o "AssignList , AssignObj", -> $1.concat [$3]
o "AssignList TERMINATOR AssignObj", -> $1.concat [$3] o "AssignList TERMINATOR AssignObj", -> $1.concat [$3]
o "AssignList , TERMINATOR AssignObj", -> $1.concat [$4] o "AssignList , TERMINATOR AssignObj", -> $1.concat [$4]
]
# An **AssignList** within a block indentation.
IndentedAssignList: [
o "INDENT AssignList OptComma OUTDENT", -> $2 o "INDENT AssignList OptComma OUTDENT", -> $2
] ]