|
@@ -1,6 +1,6 @@
|
|
|
-define("amber/parser", ["./boot"], function(boot) {
|
|
|
-var globals = boot.globals, nil = boot.nil;
|
|
|
-globals.SmalltalkParser = (function() {
|
|
|
+define("amber/parser", ["./boot"], function($boot) {
|
|
|
+var $globals = $boot.globals, nil = $boot.nil;
|
|
|
+$globals.SmalltalkParser = (function() {
|
|
|
|
|
|
* Generated by PEG.js 0.8.0.
|
|
|
*
|
|
@@ -62,7 +62,7 @@ globals.SmalltalkParser = (function() {
|
|
|
peg$c25 = /^[^']/,
|
|
|
peg$c26 = { type: "class", value: "[^']", description: "[^']" },
|
|
|
peg$c27 = function(val) {
|
|
|
- return globals.ValueNode._new()
|
|
|
+ return $globals.ValueNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._value_(val.join(""));
|
|
@@ -71,7 +71,7 @@ globals.SmalltalkParser = (function() {
|
|
|
peg$c29 = { type: "literal", value: "$", description: "\"$\"" },
|
|
|
peg$c30 = { type: "any", description: "any character" },
|
|
|
peg$c31 = function(char) {
|
|
|
- return globals.ValueNode._new()
|
|
|
+ return $globals.ValueNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._value_(char);
|
|
@@ -81,13 +81,13 @@ globals.SmalltalkParser = (function() {
|
|
|
peg$c34 = function(rest) {return rest;},
|
|
|
peg$c35 = function(node) {return node._value();},
|
|
|
peg$c36 = function(val) {
|
|
|
- return globals.ValueNode._new()
|
|
|
+ return $globals.ValueNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._value_(val);
|
|
|
},
|
|
|
peg$c37 = function(n) {
|
|
|
- return globals.ValueNode._new()
|
|
|
+ return $globals.ValueNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._value_(n);
|
|
@@ -117,7 +117,7 @@ globals.SmalltalkParser = (function() {
|
|
|
peg$c60 = ")",
|
|
|
peg$c61 = { type: "literal", value: ")", description: "\")\"" },
|
|
|
peg$c62 = function(lits) {
|
|
|
- return globals.ValueNode._new()
|
|
|
+ return $globals.ValueNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._value_(lits);
|
|
@@ -127,7 +127,7 @@ globals.SmalltalkParser = (function() {
|
|
|
peg$c65 = "}",
|
|
|
peg$c66 = { type: "literal", value: "}", description: "\"}\"" },
|
|
|
peg$c67 = function(expressions) {
|
|
|
- return globals.DynamicArrayNode._new()
|
|
|
+ return $globals.DynamicArrayNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._nodes_(expressions || []);
|
|
@@ -135,7 +135,7 @@ globals.SmalltalkParser = (function() {
|
|
|
peg$c68 = "#{",
|
|
|
peg$c69 = { type: "literal", value: "#{", description: "\"#{\"" },
|
|
|
peg$c70 = function(expressions) {
|
|
|
- return globals.DynamicDictionaryNode._new()
|
|
|
+ return $globals.DynamicDictionaryNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._nodes_(expressions || []);
|
|
@@ -150,13 +150,13 @@ globals.SmalltalkParser = (function() {
|
|
|
peg$c78 = { type: "literal", value: "nil", description: "\"nil\"" },
|
|
|
peg$c79 = function() {return nil;},
|
|
|
peg$c80 = function(val) {
|
|
|
- return globals.ValueNode._new()
|
|
|
+ return $globals.ValueNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._value_(val);
|
|
|
},
|
|
|
peg$c81 = function(identifier) {
|
|
|
- return globals.VariableNode._new()
|
|
|
+ return $globals.VariableNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._value_(identifier);
|
|
@@ -184,7 +184,7 @@ globals.SmalltalkParser = (function() {
|
|
|
peg$c91 = ":=",
|
|
|
peg$c92 = { type: "literal", value: ":=", description: "\":=\"" },
|
|
|
peg$c93 = function(variable, expression) {
|
|
|
- return globals.AssignmentNode._new()
|
|
|
+ return $globals.AssignmentNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._left_(variable)
|
|
@@ -193,7 +193,7 @@ globals.SmalltalkParser = (function() {
|
|
|
peg$c94 = "^",
|
|
|
peg$c95 = { type: "literal", value: "^", description: "\"^\"" },
|
|
|
peg$c96 = function(expression) {
|
|
|
- return globals.ReturnNode._new()
|
|
|
+ return $globals.ReturnNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._nodes_([expression]);
|
|
@@ -214,7 +214,7 @@ globals.SmalltalkParser = (function() {
|
|
|
return expressions || [];
|
|
|
},
|
|
|
peg$c106 = function(temps, statements) {
|
|
|
- return globals.SequenceNode._new()
|
|
|
+ return $globals.SequenceNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._temps_(temps || [])
|
|
@@ -225,7 +225,7 @@ globals.SmalltalkParser = (function() {
|
|
|
peg$c109 = "]",
|
|
|
peg$c110 = { type: "literal", value: "]", description: "\"]\"" },
|
|
|
peg$c111 = function(params, sequence) {
|
|
|
- return globals.BlockNode._new()
|
|
|
+ return $globals.BlockNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._parameters_(params || [])
|
|
@@ -233,7 +233,7 @@ globals.SmalltalkParser = (function() {
|
|
|
},
|
|
|
peg$c112 = void 0,
|
|
|
peg$c113 = function(selector) {
|
|
|
- return globals.SendNode._new()
|
|
|
+ return $globals.SendNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._selector_(selector);
|
|
@@ -255,7 +255,7 @@ globals.SmalltalkParser = (function() {
|
|
|
}
|
|
|
},
|
|
|
peg$c116 = function(selector, arg) {
|
|
|
- return globals.SendNode._new()
|
|
|
+ return $globals.SendNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._selector_(selector)
|
|
@@ -276,7 +276,7 @@ globals.SmalltalkParser = (function() {
|
|
|
selector.push(pairs[i].key);
|
|
|
args.push(pairs[i].arg);
|
|
|
}
|
|
|
- return globals.SendNode._new()
|
|
|
+ return $globals.SendNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._selector_(selector.join(""))
|
|
@@ -294,7 +294,7 @@ globals.SmalltalkParser = (function() {
|
|
|
for(var i = 0; i < messages.length; i++) {
|
|
|
cascade.push(messages[i]);
|
|
|
}
|
|
|
- return globals.CascadeNode._new()
|
|
|
+ return $globals.CascadeNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._receiver_(send._receiver())
|
|
@@ -310,12 +310,12 @@ globals.SmalltalkParser = (function() {
|
|
|
peg$c131 = ">",
|
|
|
peg$c132 = { type: "literal", value: ">", description: "\">\"" },
|
|
|
peg$c133 = function(val) {
|
|
|
- return globals.JSStatementNode._new()
|
|
|
+ return $globals.JSStatementNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(val.join(""))
|
|
|
},
|
|
|
peg$c134 = function(pattern, sequence) {
|
|
|
- return globals.MethodNode._new()
|
|
|
+ return $globals.MethodNode._new()
|
|
|
._position_((line()).__at(column()))
|
|
|
._source_(text())
|
|
|
._selector_(pattern[0])
|