|
@@ -7,8 +7,8 @@ selector: "close",
|
|
category: 'actions',
|
|
category: 'actions',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send(smalltalk.send(process,"_stdin",[]),"_destroy",[]);
|
|
+return smalltalk.withContext(function($ctx1) {
_st(_st(process)._stdin())._destroy();
|
|
-return self},
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"close",{}, smalltalk.Repl)})},
|
|
args: [],
|
|
args: [],
|
|
source: "close\x0a\x09process stdin destroy",
|
|
source: "close\x0a\x09process stdin destroy",
|
|
messageSends: ["destroy", "stdin"],
|
|
messageSends: ["destroy", "stdin"],
|
|
@@ -23,16 +23,16 @@ selector: "createInterface",
|
|
category: 'actions',
|
|
category: 'actions',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-self["@interface"]=smalltalk.send(self["@readline"],"_createInterface_stdout_",[smalltalk.send(process,"_stdin",[]),smalltalk.send(process,"_stdout",[])]);
|
|
+return smalltalk.withContext(function($ctx1) {
self["@interface"]=_st(self["@readline"])._createInterface_stdout_(_st(process)._stdin(),_st(process)._stdout());
|
|
-smalltalk.send(self["@interface"],"_on_do_",["line",(function(buffer){
|
|
+_st(self["@interface"])._on_do_("line",(function(buffer){
|
|
-return smalltalk.send(self,"_eval_",[buffer]);
|
|
+return smalltalk.withContext(function($ctx2) {
return _st(self)._eval_(buffer);
|
|
-})]);
|
|
+}, function($ctx2) {$ctx2.fillBlock({buffer:buffer},$ctx1)})}));
|
|
-smalltalk.send(self["@interface"],"_on_do_",["close",(function(){
|
|
+_st(self["@interface"])._on_do_("close",(function(){
|
|
-return smalltalk.send(self,"_close",[]);
|
|
+return smalltalk.withContext(function($ctx2) {
return _st(self)._close();
|
|
-})]);
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
|
-smalltalk.send(self,"_setPrompt",[]);
|
|
+_st(self)._setPrompt();
|
|
-smalltalk.send(self["@interface"],"_prompt",[]);
|
|
+_st(self["@interface"])._prompt();
|
|
-return self},
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"createInterface",{}, smalltalk.Repl)})},
|
|
args: [],
|
|
args: [],
|
|
source: "createInterface\x0a\x09\x22No completion for now\x22\x0a\x09interface := readline createInterface: process stdin stdout: process stdout.\x0a\x09interface on: 'line' do: [:buffer | self eval: buffer].\x0a\x09interface on: 'close' do: [self close].\x0a\x09self setPrompt.\x0a\x09interface prompt",
|
|
source: "createInterface\x0a\x09\x22No completion for now\x22\x0a\x09interface := readline createInterface: process stdin stdout: process stdout.\x0a\x09interface on: 'line' do: [:buffer | self eval: buffer].\x0a\x09interface on: 'close' do: [self close].\x0a\x09self setPrompt.\x0a\x09interface prompt",
|
|
messageSends: ["createInterface:stdout:", "stdin", "stdout", "on:do:", "eval:", "close", "setPrompt", "prompt"],
|
|
messageSends: ["createInterface:stdout:", "stdin", "stdout", "on:do:", "eval:", "close", "setPrompt", "prompt"],
|
|
@@ -47,25 +47,25 @@ selector: "eval:",
|
|
category: 'actions',
|
|
category: 'actions',
|
|
fn: function (buffer){
|
|
fn: function (buffer){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1,$2;
|
|
|
|
var result;
|
|
var result;
|
|
-$1=smalltalk.send(buffer,"_isEmpty",[]);
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2;
|
|
|
|
+$1=_st(buffer)._isEmpty();
|
|
if(! smalltalk.assert($1)){
|
|
if(! smalltalk.assert($1)){
|
|
-smalltalk.send(self,"_try_catch_",[(function(){
|
|
+_st(self)._try_catch_((function(){
|
|
-result=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler),"_new",[]),"_evaluateExpression_",[buffer]);
|
|
+return smalltalk.withContext(function($ctx2) {
result=_st(_st((smalltalk.Compiler || Compiler))._new())._evaluateExpression_(buffer);
|
|
result;
|
|
result;
|
|
-return smalltalk.send((smalltalk.Transcript || Transcript),"_show_",[result]);
|
|
+return _st((smalltalk.Transcript || Transcript))._show_(result);
|
|
-}),(function(e){
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(e){
|
|
-$2=smalltalk.send(e,"_isSmalltalkError",[]);
|
|
+return smalltalk.withContext(function($ctx2) {
$2=_st(e)._isSmalltalkError();
|
|
if(smalltalk.assert($2)){
|
|
if(smalltalk.assert($2)){
|
|
-return smalltalk.send(smalltalk.send((smalltalk.ErrorHandler || ErrorHandler),"_new",[]),"_handleError_",[e]);
|
|
+return _st(_st((smalltalk.ErrorHandler || ErrorHandler))._new())._handleError_(e);
|
|
} else {
|
|
} else {
|
|
-return smalltalk.send(smalltalk.send(process,"_stdout",[]),"_write_",[smalltalk.send(e,"_jsStack",[])]);
|
|
+return _st(_st(process)._stdout())._write_(_st(e)._jsStack());
|
|
};
|
|
};
|
|
-})]);
|
|
+}, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
|
|
};
|
|
};
|
|
-smalltalk.send(self["@interface"],"_prompt",[]);
|
|
+_st(self["@interface"])._prompt();
|
|
-return self},
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"eval:",{buffer:buffer,result:result}, smalltalk.Repl)})},
|
|
args: ["buffer"],
|
|
args: ["buffer"],
|
|
source: "eval: buffer\x0a\x09| result |\x0a\x09buffer isEmpty ifFalse: [\x0a\x09\x09self try: [\x0a\x09\x09\x09result := Compiler new evaluateExpression: buffer.\x0a\x09\x09\x09Transcript show: result]\x0a\x09\x09catch: [:e |\x0a\x09\x09\x09e isSmalltalkError\x0a\x09\x09\x09 ifTrue: [ErrorHandler new handleError: e]\x0a\x09\x09\x09 ifFalse: [process stdout write: e jsStack]]].\x0a\x09interface prompt",
|
|
source: "eval: buffer\x0a\x09| result |\x0a\x09buffer isEmpty ifFalse: [\x0a\x09\x09self try: [\x0a\x09\x09\x09result := Compiler new evaluateExpression: buffer.\x0a\x09\x09\x09Transcript show: result]\x0a\x09\x09catch: [:e |\x0a\x09\x09\x09e isSmalltalkError\x0a\x09\x09\x09 ifTrue: [ErrorHandler new handleError: e]\x0a\x09\x09\x09 ifFalse: [process stdout write: e jsStack]]].\x0a\x09interface prompt",
|
|
messageSends: ["ifFalse:", "try:catch:", "evaluateExpression:", "new", "show:", "ifTrue:ifFalse:", "handleError:", "write:", "jsStack", "stdout", "isSmalltalkError", "isEmpty", "prompt"],
|
|
messageSends: ["ifFalse:", "try:catch:", "evaluateExpression:", "new", "show:", "ifTrue:ifFalse:", "handleError:", "write:", "jsStack", "stdout", "isSmalltalkError", "isEmpty", "prompt"],
|
|
@@ -80,10 +80,10 @@ selector: "initialize",
|
|
category: 'initialization',
|
|
category: 'initialization',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send(self,"_initialize",[],smalltalk.Object);
|
|
+return smalltalk.withContext(function($ctx1) {
smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
|
|
-self["@readline"]=smalltalk.send(require,"_value_",["readline"]);
|
|
+self["@readline"]=_st(require)._value_("readline");
|
|
-self["@util"]=smalltalk.send(require,"_value_",["util"]);
|
|
+self["@util"]=_st(require)._value_("util");
|
|
-return self},
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.Repl)})},
|
|
args: [],
|
|
args: [],
|
|
source: "initialize\x0a\x09super initialize.\x0a\x09readline := require value: 'readline'.\x0a\x09util := require value: 'util'",
|
|
source: "initialize\x0a\x09super initialize.\x0a\x09readline := require value: 'readline'.\x0a\x09util := require value: 'util'",
|
|
messageSends: ["initialize", "value:"],
|
|
messageSends: ["initialize", "value:"],
|
|
@@ -98,8 +98,8 @@ selector: "prompt",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return "amber >> ";
|
|
+return smalltalk.withContext(function($ctx1) {
return "amber >> ";
|
|
-},
|
|
+}, function($ctx1) {$ctx1.fill(self,"prompt",{}, smalltalk.Repl)})},
|
|
args: [],
|
|
args: [],
|
|
source: "prompt\x0a\x09^'amber >> '",
|
|
source: "prompt\x0a\x09^'amber >> '",
|
|
messageSends: [],
|
|
messageSends: [],
|
|
@@ -114,8 +114,8 @@ selector: "setPrompt",
|
|
category: 'actions',
|
|
category: 'actions',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send(self["@interface"],"_setPrompt_",[smalltalk.send(self,"_prompt",[])]);
|
|
+return smalltalk.withContext(function($ctx1) {
_st(self["@interface"])._setPrompt_(_st(self)._prompt());
|
|
-return self},
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"setPrompt",{}, smalltalk.Repl)})},
|
|
args: [],
|
|
args: [],
|
|
source: "setPrompt\x0a\x09interface setPrompt: self prompt",
|
|
source: "setPrompt\x0a\x09interface setPrompt: self prompt",
|
|
messageSends: ["setPrompt:", "prompt"],
|
|
messageSends: ["setPrompt:", "prompt"],
|
|
@@ -131,8 +131,8 @@ selector: "main",
|
|
category: 'not yet classified',
|
|
category: 'not yet classified',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send(smalltalk.send(self,"_new",[]),"_createInterface",[]);
|
|
+return smalltalk.withContext(function($ctx1) {
_st(_st(self)._new())._createInterface();
|
|
-return self},
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"main",{}, smalltalk.Repl.klass)})},
|
|
args: [],
|
|
args: [],
|
|
source: "main\x0a\x09self new createInterface",
|
|
source: "main\x0a\x09self new createInterface",
|
|
messageSends: ["createInterface", "new"],
|
|
messageSends: ["createInterface", "new"],
|