mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
merging jeff olson's work
This commit is contained in:
@@ -192,22 +192,29 @@
|
||||
return new SplatNode(yytext);
|
||||
})
|
||||
],
|
||||
// # A regular splat.
|
||||
// Splat: [
|
||||
// o "Expression . . .", -> new SplatNode($1)
|
||||
// ]
|
||||
// A regular splat.
|
||||
Splat: [o("Expression . . .", function() {
|
||||
return new SplatNode($1);
|
||||
})
|
||||
],
|
||||
// Expressions that can be treated as values.
|
||||
Value: [o("IDENTIFIER", function() {
|
||||
return new ValueNode(yytext);
|
||||
}), o("Literal", function() {
|
||||
return new ValueNode($1);
|
||||
}), o("Array", function() {
|
||||
return new ValueNode($1);
|
||||
}), o("Object", function() {
|
||||
return new ValueNode($1);
|
||||
}), o("Parenthetical", function() {
|
||||
return new ValueNode($1);
|
||||
}), o("Range", function() {
|
||||
return new ValueNode($1);
|
||||
}),
|
||||
// o "Array", -> new ValueNode($1)
|
||||
// o "Object", -> new ValueNode($1)
|
||||
// o "Parenthetical", -> new ValueNode($1)
|
||||
// o "Range", -> new ValueNode($1)
|
||||
// o "Value Accessor", -> $1.push($2)
|
||||
// o "Invocation Accessor", -> new ValueNode($1, [$2])
|
||||
o("Invocation Accessor", function() {
|
||||
return new ValueNode($1, [$2]);
|
||||
})
|
||||
]
|
||||
// # Accessing into an object or array, through dot or index notation.
|
||||
// Accessor: [
|
||||
|
||||
Reference in New Issue
Block a user