merging jeff olson's work

This commit is contained in:
Jeremy Ashkenas
2010-02-07 15:45:05 -05:00
6 changed files with 581 additions and 19 deletions

View File

@@ -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: [