|  | @@ -1,5 +1,5 @@
 | 
	
		
			
				|  |  | -define("amber_vm/parser", ["./smalltalk", "./nil"], function(smalltalk, nil) {
 | 
	
		
			
				|  |  | -smalltalk.parser = (function(){
 | 
	
		
			
				|  |  | +define("amber_vm/parser", ["./globals", "./nil"], function(globals, nil) {
 | 
	
		
			
				|  |  | +globals.SmalltalkParser = (function(){
 | 
	
		
			
				|  |  |    /*
 | 
	
		
			
				|  |  |     * Generated by PEG.js 0.7.0.
 | 
	
		
			
				|  |  |     *
 | 
	
	
		
			
				|  | @@ -756,7 +756,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, val) {
 | 
	
		
			
				|  |  | -                             return smalltalk.ValueNode._new()
 | 
	
		
			
				|  |  | +                             return globals.ValueNode._new()
 | 
	
		
			
				|  |  |                                      ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                      ._value_(val.join("").replace(/\"/ig, '"'));
 | 
	
		
			
				|  |  |                           })(pos0.offset, pos0.line, pos0.column, result0[1]);
 | 
	
	
		
			
				|  | @@ -848,7 +848,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, val) {
 | 
	
		
			
				|  |  | -                              return smalltalk.ValueNode._new()
 | 
	
		
			
				|  |  | +                              return globals.ValueNode._new()
 | 
	
		
			
				|  |  |                                       ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                       ._value_(val);
 | 
	
		
			
				|  |  |                            })(pos0.offset, pos0.line, pos0.column, result0);
 | 
	
	
		
			
				|  | @@ -888,7 +888,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, n) {
 | 
	
		
			
				|  |  | -                             return smalltalk.ValueNode._new()
 | 
	
		
			
				|  |  | +                             return globals.ValueNode._new()
 | 
	
		
			
				|  |  |                                      ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                      ._value_(n);
 | 
	
		
			
				|  |  |                           })(pos0.offset, pos0.line, pos0.column, result0);
 | 
	
	
		
			
				|  | @@ -1443,7 +1443,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, lits) {
 | 
	
		
			
				|  |  | -                             return smalltalk.ValueNode._new()
 | 
	
		
			
				|  |  | +                             return globals.ValueNode._new()
 | 
	
		
			
				|  |  |                                      ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                      ._value_(lits);
 | 
	
		
			
				|  |  |                           })(pos0.offset, pos0.line, pos0.column, result0[1]);
 | 
	
	
		
			
				|  | @@ -1537,7 +1537,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, expressions) {
 | 
	
		
			
				|  |  | -                             return smalltalk.DynamicArrayNode._new()
 | 
	
		
			
				|  |  | +                             return globals.DynamicArrayNode._new()
 | 
	
		
			
				|  |  |                                      ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                      ._nodes_(expressions);
 | 
	
		
			
				|  |  |                           })(pos0.offset, pos0.line, pos0.column, result0[2]);
 | 
	
	
		
			
				|  | @@ -1616,7 +1616,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, expressions) {
 | 
	
		
			
				|  |  | -                                return smalltalk.DynamicDictionaryNode._new()
 | 
	
		
			
				|  |  | +                                return globals.DynamicDictionaryNode._new()
 | 
	
		
			
				|  |  |                                         ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                         ._nodes_(expressions);
 | 
	
		
			
				|  |  |                              })(pos0.offset, pos0.line, pos0.column, result0[2]);
 | 
	
	
		
			
				|  | @@ -1698,7 +1698,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, val) {
 | 
	
		
			
				|  |  | -                               return smalltalk.ValueNode._new()
 | 
	
		
			
				|  |  | +                               return globals.ValueNode._new()
 | 
	
		
			
				|  |  |                                        ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                        ._value_(val);
 | 
	
		
			
				|  |  |                             })(pos0.offset, pos0.line, pos0.column, result0);
 | 
	
	
		
			
				|  | @@ -1807,7 +1807,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          result0 = parse_identifier();
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, identifier) {
 | 
	
		
			
				|  |  | -                             return smalltalk.VariableNode._new()
 | 
	
		
			
				|  |  | +                             return globals.VariableNode._new()
 | 
	
		
			
				|  |  |                                      ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                      ._value_(identifier);
 | 
	
		
			
				|  |  |                           })(pos0.offset, pos0.line, pos0.column, result0);
 | 
	
	
		
			
				|  | @@ -2323,7 +2323,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, variable, expression) {
 | 
	
		
			
				|  |  | -                             return smalltalk.AssignmentNode._new()
 | 
	
		
			
				|  |  | +                             return globals.AssignmentNode._new()
 | 
	
		
			
				|  |  |                                      ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                      ._left_(variable)
 | 
	
		
			
				|  |  |                                      ._right_(expression);
 | 
	
	
		
			
				|  | @@ -2403,7 +2403,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, expression) {
 | 
	
		
			
				|  |  | -                             return smalltalk.ReturnNode._new()
 | 
	
		
			
				|  |  | +                             return globals.ReturnNode._new()
 | 
	
		
			
				|  |  |                                      ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                      ._nodes_([expression]);
 | 
	
		
			
				|  |  |                           })(pos0.offset, pos0.line, pos0.column, result0[2]);
 | 
	
	
		
			
				|  | @@ -3024,7 +3024,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, temps, statements) {
 | 
	
		
			
				|  |  | -                             return smalltalk.SequenceNode._new()
 | 
	
		
			
				|  |  | +                             return globals.SequenceNode._new()
 | 
	
		
			
				|  |  |                                      ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                      ._temps_(temps || [])
 | 
	
		
			
				|  |  |                                      ._nodes_(statements || []);
 | 
	
	
		
			
				|  | @@ -3117,7 +3117,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, params, sequence) {
 | 
	
		
			
				|  |  | -                             return smalltalk.BlockNode._new()
 | 
	
		
			
				|  |  | +                             return globals.BlockNode._new()
 | 
	
		
			
				|  |  |                                      ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                      ._parameters_(params || [])
 | 
	
		
			
				|  |  |                                      ._nodes_([sequence._asBlockSequenceNode()]);
 | 
	
	
		
			
				|  | @@ -3210,7 +3210,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, selector) {
 | 
	
		
			
				|  |  | -                             return smalltalk.SendNode._new()
 | 
	
		
			
				|  |  | +                             return globals.SendNode._new()
 | 
	
		
			
				|  |  |                                      ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                      ._selector_(selector);
 | 
	
		
			
				|  |  |                           })(pos0.offset, pos0.line, pos0.column, result0[1]);
 | 
	
	
		
			
				|  | @@ -3383,7 +3383,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, selector, arg) {
 | 
	
		
			
				|  |  | -                             return smalltalk.SendNode._new()
 | 
	
		
			
				|  |  | +                             return globals.SendNode._new()
 | 
	
		
			
				|  |  |                                      ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                      ._selector_(selector)
 | 
	
		
			
				|  |  |                                      ._arguments_([arg]);
 | 
	
	
		
			
				|  | @@ -3579,7 +3579,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |                                    selector.push(pairs[i].key);
 | 
	
		
			
				|  |  |                                    args.push(pairs[i].arg);
 | 
	
		
			
				|  |  |                                }
 | 
	
		
			
				|  |  | -                              return smalltalk.SendNode._new()
 | 
	
		
			
				|  |  | +                              return globals.SendNode._new()
 | 
	
		
			
				|  |  |                                       ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                       ._selector_(selector.join(""))
 | 
	
		
			
				|  |  |                                       ._arguments_(args);
 | 
	
	
		
			
				|  | @@ -3806,7 +3806,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |                               for(var i = 0; i < messages.length; i++) {
 | 
	
		
			
				|  |  |                                   cascade.push(messages[i]);
 | 
	
		
			
				|  |  |                               }
 | 
	
		
			
				|  |  | -                             return smalltalk.CascadeNode._new()
 | 
	
		
			
				|  |  | +                             return globals.CascadeNode._new()
 | 
	
		
			
				|  |  |                                      ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                      ._receiver_(send._receiver())
 | 
	
		
			
				|  |  |                                      ._nodes_(cascade);
 | 
	
	
		
			
				|  | @@ -3930,7 +3930,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, val) {
 | 
	
		
			
				|  |  | -                             return smalltalk.JSStatementNode._new()
 | 
	
		
			
				|  |  | +                             return globals.JSStatementNode._new()
 | 
	
		
			
				|  |  |                                      ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                      ._source_(val.join(""));
 | 
	
		
			
				|  |  |                           })(pos0.offset, pos0.line, pos0.column, result0[1]);
 | 
	
	
		
			
				|  | @@ -3999,7 +3999,7 @@ smalltalk.parser = (function(){
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (result0 !== null) {
 | 
	
		
			
				|  |  |            result0 = (function(offset, line, column, pattern, sequence) {
 | 
	
		
			
				|  |  | -                              return smalltalk.MethodNode._new()
 | 
	
		
			
				|  |  | +                              return globals.MethodNode._new()
 | 
	
		
			
				|  |  |                                       ._position_((line).__at(column))
 | 
	
		
			
				|  |  |                                       ._selector_(pattern[0])
 | 
	
		
			
				|  |  |                                       ._arguments_(pattern[1])
 |