mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Fixes #2359 -- tweak grammar to use new name
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
action = (match = unwrap.exec(action)) ? match[1] : "(" + action + "())";
|
||||
action = action.replace(/\bnew /g, '$&yy.');
|
||||
action = action.replace(/\b(?:Block\.wrap|extend)\b/g, 'yy.$&');
|
||||
action = action.replace(/\b(Op|Value\.create)\b/g, 'yy.$&');
|
||||
action = action.replace(/\b(Op|Value\.(create|wrap))\b/g, 'yy.$&');
|
||||
return [patternString, "$$ = " + action + ";", options];
|
||||
};
|
||||
|
||||
@@ -83,12 +83,12 @@
|
||||
],
|
||||
AssignObj: [
|
||||
o('ObjAssignable', function() {
|
||||
return Value.create($1);
|
||||
return Value.wrap($1);
|
||||
}), o('ObjAssignable : Expression', function() {
|
||||
return new Assign(Value.create($1), $3, 'object');
|
||||
return new Assign(Value.wrap($1), $3, 'object');
|
||||
}), o('ObjAssignable :\
|
||||
INDENT Expression OUTDENT', function() {
|
||||
return new Assign(Value.create($1), $4, 'object');
|
||||
return new Assign(Value.wrap($1), $4, 'object');
|
||||
}), o('Comment')
|
||||
],
|
||||
ObjAssignable: [o('Identifier'), o('AlphaNumeric'), o('ThisProperty')],
|
||||
@@ -149,27 +149,27 @@
|
||||
],
|
||||
SimpleAssignable: [
|
||||
o('Identifier', function() {
|
||||
return Value.create($1);
|
||||
return Value.wrap($1);
|
||||
}), o('Value Accessor', function() {
|
||||
return $1.add($2);
|
||||
}), o('Invocation Accessor', function() {
|
||||
return Value.create($1, [].concat($2));
|
||||
return Value.wrap($1, [].concat($2));
|
||||
}), o('ThisProperty')
|
||||
],
|
||||
Assignable: [
|
||||
o('SimpleAssignable'), o('Array', function() {
|
||||
return Value.create($1);
|
||||
return Value.wrap($1);
|
||||
}), o('Object', function() {
|
||||
return Value.create($1);
|
||||
return Value.wrap($1);
|
||||
})
|
||||
],
|
||||
Value: [
|
||||
o('Assignable'), o('Literal', function() {
|
||||
return Value.create($1);
|
||||
return Value.wrap($1);
|
||||
}), o('Parenthetical', function() {
|
||||
return Value.create($1);
|
||||
return Value.wrap($1);
|
||||
}), o('Range', function() {
|
||||
return Value.create($1);
|
||||
return Value.wrap($1);
|
||||
}), o('This')
|
||||
],
|
||||
Accessor: [
|
||||
@@ -263,14 +263,14 @@
|
||||
],
|
||||
This: [
|
||||
o('THIS', function() {
|
||||
return Value.create(new Literal('this'));
|
||||
return Value.wrap(new Literal('this'));
|
||||
}), o('@', function() {
|
||||
return Value.create(new Literal('this'));
|
||||
return Value.wrap(new Literal('this'));
|
||||
})
|
||||
],
|
||||
ThisProperty: [
|
||||
o('@ Identifier', function() {
|
||||
return Value.create(new Literal('this'), [new Access($2)], 'this');
|
||||
return Value.wrap(new Literal('this'), [new Access($2)], 'this');
|
||||
})
|
||||
],
|
||||
Array: [
|
||||
@@ -337,7 +337,7 @@
|
||||
o('CATCH Identifier Block', function() {
|
||||
return [$2, $3];
|
||||
}), o('CATCH Object Block', function() {
|
||||
return [Value.create($2), $3];
|
||||
return [Value.wrap($2), $3];
|
||||
})
|
||||
],
|
||||
Throw: [
|
||||
@@ -400,7 +400,7 @@
|
||||
ForBody: [
|
||||
o('FOR Range', function() {
|
||||
return {
|
||||
source: Value.create($2)
|
||||
source: Value.wrap($2)
|
||||
};
|
||||
}), o('ForStart ForSource', function() {
|
||||
$2.own = $1.own;
|
||||
@@ -419,9 +419,9 @@
|
||||
],
|
||||
ForValue: [
|
||||
o('Identifier'), o('ThisProperty'), o('Array', function() {
|
||||
return Value.create($1);
|
||||
return Value.wrap($1);
|
||||
}), o('Object', function() {
|
||||
return Value.create($1);
|
||||
return Value.wrap($1);
|
||||
})
|
||||
],
|
||||
ForVariables: [
|
||||
|
||||
@@ -606,4 +606,4 @@ exports.main = function commonjsMain(args) {
|
||||
if (typeof module !== 'undefined' && require.main === module) {
|
||||
exports.main(typeof process !== 'undefined' ? process.argv.slice(1) : require("system").args);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user