mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-04-11 03:00:13 -04:00
eliminating the IndentedAssignList nonterminal.
This commit is contained in:
@@ -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;
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
|
|||||||
250
lib/parser.js
250
lib/parser.js
File diff suppressed because one or more lines are too long
@@ -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
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user