|
@@ -2078,3 +2078,26 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Object);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "ast",
|
|
|
+category: '*Compiler-AST',
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
+_st(_st(self)._source())._ifEmpty_((function(){
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+return _st(self)._error_("Method source is empty");
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
|
|
+$1=_st(_st($Smalltalk())._current())._parse_(_st(self)._source());
|
|
|
+return $1;
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"ast",{},smalltalk.CompiledMethod)})},
|
|
|
+args: [],
|
|
|
+source: "ast\x0a\x09self source ifEmpty: [ self error: 'Method source is empty' ].\x0a\x09\x0a\x09^ Smalltalk current parse: self source",
|
|
|
+messageSends: ["ifEmpty:", "error:", "source", "parse:", "current"],
|
|
|
+referencedClasses: ["Smalltalk"]
|
|
|
+}),
|
|
|
+smalltalk.CompiledMethod);
|
|
|
+
|