Compiler-AST.js 89 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411
  1. define(["amber/boot", "amber_core/Kernel-Methods", "amber_core/Kernel-Objects"], function($boot){"use strict";
  2. if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
  3. var $core=$boot.api,nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  4. if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
  5. $core.addPackage('Compiler-AST');
  6. $core.packages["Compiler-AST"].innerEval = function (expr) { return eval(expr); };
  7. $core.packages["Compiler-AST"].transport = {"type":"amd","amdNamespace":"amber_core"};
  8. $core.addClass('Node', $globals.Object, ['parent', 'position', 'source', 'nodes', 'shouldBeAliased'], 'Compiler-AST');
  9. //>>excludeStart("ide", pragmas.excludeIdeData);
  10. $globals.Node.comment="I am the abstract root class of the abstract syntax tree.\x0a\x0aConcrete classes should implement `#accept:` to allow visiting.\x0a\x0a`position` holds a point containing line and column number of the symbol location in the original source file.";
  11. //>>excludeEnd("ide");
  12. $core.addMethod(
  13. $core.method({
  14. selector: "accept:",
  15. protocol: 'visiting',
  16. fn: function (aVisitor){
  17. var self=this;
  18. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  19. return $core.withContext(function($ctx1) {
  20. //>>excludeEnd("ctx");
  21. return $recv(aVisitor)._visitNode_(self);
  22. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  23. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.Node)});
  24. //>>excludeEnd("ctx");
  25. },
  26. //>>excludeStart("ide", pragmas.excludeIdeData);
  27. args: ["aVisitor"],
  28. source: "accept: aVisitor\x0a\x09^ aVisitor visitNode: self",
  29. referencedClasses: [],
  30. //>>excludeEnd("ide");
  31. messageSends: ["visitNode:"]
  32. }),
  33. $globals.Node);
  34. $core.addMethod(
  35. $core.method({
  36. selector: "addNode:",
  37. protocol: 'accessing',
  38. fn: function (aNode){
  39. var self=this;
  40. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  41. return $core.withContext(function($ctx1) {
  42. //>>excludeEnd("ctx");
  43. $recv(self._nodes())._add_(aNode);
  44. $recv(aNode)._parent_(self);
  45. return self;
  46. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  47. }, function($ctx1) {$ctx1.fill(self,"addNode:",{aNode:aNode},$globals.Node)});
  48. //>>excludeEnd("ctx");
  49. },
  50. //>>excludeStart("ide", pragmas.excludeIdeData);
  51. args: ["aNode"],
  52. source: "addNode: aNode\x0a\x09self nodes add: aNode.\x0a\x09aNode parent: self",
  53. referencedClasses: [],
  54. //>>excludeEnd("ide");
  55. messageSends: ["add:", "nodes", "parent:"]
  56. }),
  57. $globals.Node);
  58. $core.addMethod(
  59. $core.method({
  60. selector: "allNodes",
  61. protocol: 'accessing',
  62. fn: function (){
  63. var self=this;
  64. var allNodes;
  65. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  66. return $core.withContext(function($ctx1) {
  67. //>>excludeEnd("ctx");
  68. var $1;
  69. $1=self._nodes();
  70. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  71. $ctx1.sendIdx["nodes"]=1;
  72. //>>excludeEnd("ctx");
  73. allNodes=$recv($1)._asSet();
  74. $recv(self._nodes())._do_((function(each){
  75. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  76. return $core.withContext(function($ctx2) {
  77. //>>excludeEnd("ctx");
  78. return $recv(allNodes)._addAll_($recv(each)._allNodes());
  79. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  80. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  81. //>>excludeEnd("ctx");
  82. }));
  83. return allNodes;
  84. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  85. }, function($ctx1) {$ctx1.fill(self,"allNodes",{allNodes:allNodes},$globals.Node)});
  86. //>>excludeEnd("ctx");
  87. },
  88. //>>excludeStart("ide", pragmas.excludeIdeData);
  89. args: [],
  90. source: "allNodes\x0a\x09| allNodes |\x0a\x09\x0a\x09allNodes := self nodes asSet.\x0a\x09self nodes do: [ :each | \x0a\x09\x09allNodes addAll: each allNodes ].\x0a\x09\x0a\x09^ allNodes",
  91. referencedClasses: [],
  92. //>>excludeEnd("ide");
  93. messageSends: ["asSet", "nodes", "do:", "addAll:", "allNodes"]
  94. }),
  95. $globals.Node);
  96. $core.addMethod(
  97. $core.method({
  98. selector: "inPosition:",
  99. protocol: 'testing',
  100. fn: function (aPoint){
  101. var self=this;
  102. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  103. return $core.withContext(function($ctx1) {
  104. //>>excludeEnd("ctx");
  105. return $recv($recv(self._positionStart()).__lt_eq(aPoint))._and_((function(){
  106. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  107. return $core.withContext(function($ctx2) {
  108. //>>excludeEnd("ctx");
  109. return $recv(self._positionEnd()).__gt_eq(aPoint);
  110. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  111. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  112. //>>excludeEnd("ctx");
  113. }));
  114. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  115. }, function($ctx1) {$ctx1.fill(self,"inPosition:",{aPoint:aPoint},$globals.Node)});
  116. //>>excludeEnd("ctx");
  117. },
  118. //>>excludeStart("ide", pragmas.excludeIdeData);
  119. args: ["aPoint"],
  120. source: "inPosition: aPoint\x0a\x09^ (self positionStart <= aPoint and: [\x0a\x09\x09self positionEnd >= aPoint ])",
  121. referencedClasses: [],
  122. //>>excludeEnd("ide");
  123. messageSends: ["and:", "<=", "positionStart", ">=", "positionEnd"]
  124. }),
  125. $globals.Node);
  126. $core.addMethod(
  127. $core.method({
  128. selector: "isAssignmentNode",
  129. protocol: 'testing',
  130. fn: function (){
  131. var self=this;
  132. return false;
  133. },
  134. //>>excludeStart("ide", pragmas.excludeIdeData);
  135. args: [],
  136. source: "isAssignmentNode\x0a\x09^ false",
  137. referencedClasses: [],
  138. //>>excludeEnd("ide");
  139. messageSends: []
  140. }),
  141. $globals.Node);
  142. $core.addMethod(
  143. $core.method({
  144. selector: "isBlockNode",
  145. protocol: 'testing',
  146. fn: function (){
  147. var self=this;
  148. return false;
  149. },
  150. //>>excludeStart("ide", pragmas.excludeIdeData);
  151. args: [],
  152. source: "isBlockNode\x0a\x09^ false",
  153. referencedClasses: [],
  154. //>>excludeEnd("ide");
  155. messageSends: []
  156. }),
  157. $globals.Node);
  158. $core.addMethod(
  159. $core.method({
  160. selector: "isBlockSequenceNode",
  161. protocol: 'testing',
  162. fn: function (){
  163. var self=this;
  164. return false;
  165. },
  166. //>>excludeStart("ide", pragmas.excludeIdeData);
  167. args: [],
  168. source: "isBlockSequenceNode\x0a\x09^ false",
  169. referencedClasses: [],
  170. //>>excludeEnd("ide");
  171. messageSends: []
  172. }),
  173. $globals.Node);
  174. $core.addMethod(
  175. $core.method({
  176. selector: "isCascadeNode",
  177. protocol: 'testing',
  178. fn: function (){
  179. var self=this;
  180. return false;
  181. },
  182. //>>excludeStart("ide", pragmas.excludeIdeData);
  183. args: [],
  184. source: "isCascadeNode\x0a\x09^ false",
  185. referencedClasses: [],
  186. //>>excludeEnd("ide");
  187. messageSends: []
  188. }),
  189. $globals.Node);
  190. $core.addMethod(
  191. $core.method({
  192. selector: "isImmutable",
  193. protocol: 'testing',
  194. fn: function (){
  195. var self=this;
  196. return false;
  197. },
  198. //>>excludeStart("ide", pragmas.excludeIdeData);
  199. args: [],
  200. source: "isImmutable\x0a\x09^ false",
  201. referencedClasses: [],
  202. //>>excludeEnd("ide");
  203. messageSends: []
  204. }),
  205. $globals.Node);
  206. $core.addMethod(
  207. $core.method({
  208. selector: "isJSStatementNode",
  209. protocol: 'testing',
  210. fn: function (){
  211. var self=this;
  212. return false;
  213. },
  214. //>>excludeStart("ide", pragmas.excludeIdeData);
  215. args: [],
  216. source: "isJSStatementNode\x0a\x09^ false",
  217. referencedClasses: [],
  218. //>>excludeEnd("ide");
  219. messageSends: []
  220. }),
  221. $globals.Node);
  222. $core.addMethod(
  223. $core.method({
  224. selector: "isNavigationNode",
  225. protocol: 'testing',
  226. fn: function (){
  227. var self=this;
  228. return false;
  229. },
  230. //>>excludeStart("ide", pragmas.excludeIdeData);
  231. args: [],
  232. source: "isNavigationNode\x0a\x09\x22Answer true if the node can be navigated to\x22\x0a\x09\x0a\x09^ false",
  233. referencedClasses: [],
  234. //>>excludeEnd("ide");
  235. messageSends: []
  236. }),
  237. $globals.Node);
  238. $core.addMethod(
  239. $core.method({
  240. selector: "isNode",
  241. protocol: 'testing',
  242. fn: function (){
  243. var self=this;
  244. return true;
  245. },
  246. //>>excludeStart("ide", pragmas.excludeIdeData);
  247. args: [],
  248. source: "isNode\x0a\x09^ true",
  249. referencedClasses: [],
  250. //>>excludeEnd("ide");
  251. messageSends: []
  252. }),
  253. $globals.Node);
  254. $core.addMethod(
  255. $core.method({
  256. selector: "isReturnNode",
  257. protocol: 'testing',
  258. fn: function (){
  259. var self=this;
  260. return false;
  261. },
  262. //>>excludeStart("ide", pragmas.excludeIdeData);
  263. args: [],
  264. source: "isReturnNode\x0a\x09^ false",
  265. referencedClasses: [],
  266. //>>excludeEnd("ide");
  267. messageSends: []
  268. }),
  269. $globals.Node);
  270. $core.addMethod(
  271. $core.method({
  272. selector: "isSendNode",
  273. protocol: 'testing',
  274. fn: function (){
  275. var self=this;
  276. return false;
  277. },
  278. //>>excludeStart("ide", pragmas.excludeIdeData);
  279. args: [],
  280. source: "isSendNode\x0a\x09^ false",
  281. referencedClasses: [],
  282. //>>excludeEnd("ide");
  283. messageSends: []
  284. }),
  285. $globals.Node);
  286. $core.addMethod(
  287. $core.method({
  288. selector: "isSequenceNode",
  289. protocol: 'testing',
  290. fn: function (){
  291. var self=this;
  292. return false;
  293. },
  294. //>>excludeStart("ide", pragmas.excludeIdeData);
  295. args: [],
  296. source: "isSequenceNode\x0a\x09^ false",
  297. referencedClasses: [],
  298. //>>excludeEnd("ide");
  299. messageSends: []
  300. }),
  301. $globals.Node);
  302. $core.addMethod(
  303. $core.method({
  304. selector: "isSuperKeyword",
  305. protocol: 'testing',
  306. fn: function (){
  307. var self=this;
  308. return false;
  309. },
  310. //>>excludeStart("ide", pragmas.excludeIdeData);
  311. args: [],
  312. source: "isSuperKeyword\x0a\x09^ false",
  313. referencedClasses: [],
  314. //>>excludeEnd("ide");
  315. messageSends: []
  316. }),
  317. $globals.Node);
  318. $core.addMethod(
  319. $core.method({
  320. selector: "isValueNode",
  321. protocol: 'testing',
  322. fn: function (){
  323. var self=this;
  324. return false;
  325. },
  326. //>>excludeStart("ide", pragmas.excludeIdeData);
  327. args: [],
  328. source: "isValueNode\x0a\x09^ false",
  329. referencedClasses: [],
  330. //>>excludeEnd("ide");
  331. messageSends: []
  332. }),
  333. $globals.Node);
  334. $core.addMethod(
  335. $core.method({
  336. selector: "isVariableNode",
  337. protocol: 'testing',
  338. fn: function (){
  339. var self=this;
  340. return false;
  341. },
  342. //>>excludeStart("ide", pragmas.excludeIdeData);
  343. args: [],
  344. source: "isVariableNode\x0a\x09^ false",
  345. referencedClasses: [],
  346. //>>excludeEnd("ide");
  347. messageSends: []
  348. }),
  349. $globals.Node);
  350. $core.addMethod(
  351. $core.method({
  352. selector: "location:",
  353. protocol: 'accessing',
  354. fn: function (aLocation){
  355. var self=this;
  356. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  357. return $core.withContext(function($ctx1) {
  358. //>>excludeEnd("ctx");
  359. var $3,$2,$1;
  360. $3=$recv(aLocation)._start();
  361. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  362. $ctx1.sendIdx["start"]=1;
  363. //>>excludeEnd("ctx");
  364. $2=$recv($3)._line();
  365. $1=$recv($2).__at($recv($recv(aLocation)._start())._column());
  366. self._position_($1);
  367. return self;
  368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  369. }, function($ctx1) {$ctx1.fill(self,"location:",{aLocation:aLocation},$globals.Node)});
  370. //>>excludeEnd("ctx");
  371. },
  372. //>>excludeStart("ide", pragmas.excludeIdeData);
  373. args: ["aLocation"],
  374. source: "location: aLocation\x0a\x09self position: aLocation start line @ aLocation start column",
  375. referencedClasses: [],
  376. //>>excludeEnd("ide");
  377. messageSends: ["position:", "@", "line", "start", "column"]
  378. }),
  379. $globals.Node);
  380. $core.addMethod(
  381. $core.method({
  382. selector: "method",
  383. protocol: 'accessing',
  384. fn: function (){
  385. var self=this;
  386. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  387. return $core.withContext(function($ctx1) {
  388. //>>excludeEnd("ctx");
  389. var $1,$receiver;
  390. $1=self._parent();
  391. if(($receiver = $1) == null || $receiver.isNil){
  392. return $1;
  393. } else {
  394. var node;
  395. node=$receiver;
  396. return $recv(node)._method();
  397. };
  398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  399. }, function($ctx1) {$ctx1.fill(self,"method",{},$globals.Node)});
  400. //>>excludeEnd("ctx");
  401. },
  402. //>>excludeStart("ide", pragmas.excludeIdeData);
  403. args: [],
  404. source: "method\x0a\x09^ self parent ifNotNil: [ :node | node method ]",
  405. referencedClasses: [],
  406. //>>excludeEnd("ide");
  407. messageSends: ["ifNotNil:", "parent", "method"]
  408. }),
  409. $globals.Node);
  410. $core.addMethod(
  411. $core.method({
  412. selector: "navigationNodeAt:ifAbsent:",
  413. protocol: 'accessing',
  414. fn: function (aPoint,aBlock){
  415. var self=this;
  416. var children;
  417. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  418. return $core.withContext(function($ctx1) {
  419. //>>excludeEnd("ctx");
  420. var $2,$1;
  421. var $early={};
  422. try {
  423. children=$recv(self._allNodes())._select_((function(each){
  424. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  425. return $core.withContext(function($ctx2) {
  426. //>>excludeEnd("ctx");
  427. return $recv($recv(each)._isNavigationNode())._and_((function(){
  428. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  429. return $core.withContext(function($ctx3) {
  430. //>>excludeEnd("ctx");
  431. return $recv(each)._inPosition_(aPoint);
  432. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  433. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  434. //>>excludeEnd("ctx");
  435. }));
  436. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  437. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  438. //>>excludeEnd("ctx");
  439. }));
  440. $recv(children)._ifEmpty_((function(){
  441. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  442. return $core.withContext(function($ctx2) {
  443. //>>excludeEnd("ctx");
  444. throw $early=[$recv(aBlock)._value()];
  445. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  446. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  447. //>>excludeEnd("ctx");
  448. }));
  449. return $recv($recv($recv(children)._asArray())._sort_((function(a,b){
  450. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  451. return $core.withContext(function($ctx2) {
  452. //>>excludeEnd("ctx");
  453. $2=$recv(a)._positionStart();
  454. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  455. $ctx2.sendIdx["positionStart"]=1;
  456. //>>excludeEnd("ctx");
  457. $1=$recv($2)._dist_(aPoint);
  458. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  459. $ctx2.sendIdx["dist:"]=1;
  460. //>>excludeEnd("ctx");
  461. return $recv($1).__lt_eq($recv($recv(b)._positionStart())._dist_(aPoint));
  462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  463. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,4)});
  464. //>>excludeEnd("ctx");
  465. })))._first();
  466. }
  467. catch(e) {if(e===$early)return e[0]; throw e}
  468. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  469. }, function($ctx1) {$ctx1.fill(self,"navigationNodeAt:ifAbsent:",{aPoint:aPoint,aBlock:aBlock,children:children},$globals.Node)});
  470. //>>excludeEnd("ctx");
  471. },
  472. //>>excludeStart("ide", pragmas.excludeIdeData);
  473. args: ["aPoint", "aBlock"],
  474. source: "navigationNodeAt: aPoint ifAbsent: aBlock\x0a\x09\x22Answer the navigation node in the receiver's tree at aPoint \x0a\x09or nil if no navigation node was found.\x0a\x09\x0a\x09See `node >> isNaviationNode`\x22\x0a\x09\x0a\x09| children |\x0a\x09\x0a\x09children := self allNodes select: [ :each | \x0a\x09\x09each isNavigationNode and: [ each inPosition: aPoint ] ].\x0a\x09\x0a\x09children ifEmpty: [ ^ aBlock value ].\x0a\x09\x0a\x09^ (children asArray sort: [ :a :b | \x0a\x09\x09(a positionStart dist: aPoint) <= \x0a\x09\x09(b positionStart dist: aPoint) ]) first",
  475. referencedClasses: [],
  476. //>>excludeEnd("ide");
  477. messageSends: ["select:", "allNodes", "and:", "isNavigationNode", "inPosition:", "ifEmpty:", "value", "first", "sort:", "asArray", "<=", "dist:", "positionStart"]
  478. }),
  479. $globals.Node);
  480. $core.addMethod(
  481. $core.method({
  482. selector: "nodes",
  483. protocol: 'accessing',
  484. fn: function (){
  485. var self=this;
  486. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  487. return $core.withContext(function($ctx1) {
  488. //>>excludeEnd("ctx");
  489. var $1,$receiver;
  490. $1=self["@nodes"];
  491. if(($receiver = $1) == null || $receiver.isNil){
  492. self["@nodes"]=$recv($globals.Array)._new();
  493. return self["@nodes"];
  494. } else {
  495. return $1;
  496. };
  497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  498. }, function($ctx1) {$ctx1.fill(self,"nodes",{},$globals.Node)});
  499. //>>excludeEnd("ctx");
  500. },
  501. //>>excludeStart("ide", pragmas.excludeIdeData);
  502. args: [],
  503. source: "nodes\x0a\x09^ nodes ifNil: [ nodes := Array new ]",
  504. referencedClasses: ["Array"],
  505. //>>excludeEnd("ide");
  506. messageSends: ["ifNil:", "new"]
  507. }),
  508. $globals.Node);
  509. $core.addMethod(
  510. $core.method({
  511. selector: "nodes:",
  512. protocol: 'building',
  513. fn: function (aCollection){
  514. var self=this;
  515. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  516. return $core.withContext(function($ctx1) {
  517. //>>excludeEnd("ctx");
  518. self["@nodes"]=aCollection;
  519. $recv(aCollection)._do_((function(each){
  520. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  521. return $core.withContext(function($ctx2) {
  522. //>>excludeEnd("ctx");
  523. return $recv(each)._parent_(self);
  524. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  525. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  526. //>>excludeEnd("ctx");
  527. }));
  528. return self;
  529. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  530. }, function($ctx1) {$ctx1.fill(self,"nodes:",{aCollection:aCollection},$globals.Node)});
  531. //>>excludeEnd("ctx");
  532. },
  533. //>>excludeStart("ide", pragmas.excludeIdeData);
  534. args: ["aCollection"],
  535. source: "nodes: aCollection\x0a\x09nodes := aCollection.\x0a\x09aCollection do: [ :each | each parent: self ]",
  536. referencedClasses: [],
  537. //>>excludeEnd("ide");
  538. messageSends: ["do:", "parent:"]
  539. }),
  540. $globals.Node);
  541. $core.addMethod(
  542. $core.method({
  543. selector: "parent",
  544. protocol: 'accessing',
  545. fn: function (){
  546. var self=this;
  547. return self["@parent"];
  548. },
  549. //>>excludeStart("ide", pragmas.excludeIdeData);
  550. args: [],
  551. source: "parent\x0a\x09^ parent",
  552. referencedClasses: [],
  553. //>>excludeEnd("ide");
  554. messageSends: []
  555. }),
  556. $globals.Node);
  557. $core.addMethod(
  558. $core.method({
  559. selector: "parent:",
  560. protocol: 'accessing',
  561. fn: function (aNode){
  562. var self=this;
  563. self["@parent"]=aNode;
  564. return self;
  565. },
  566. //>>excludeStart("ide", pragmas.excludeIdeData);
  567. args: ["aNode"],
  568. source: "parent: aNode\x0a\x09parent := aNode",
  569. referencedClasses: [],
  570. //>>excludeEnd("ide");
  571. messageSends: []
  572. }),
  573. $globals.Node);
  574. $core.addMethod(
  575. $core.method({
  576. selector: "position",
  577. protocol: 'accessing',
  578. fn: function (){
  579. var self=this;
  580. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  581. return $core.withContext(function($ctx1) {
  582. //>>excludeEnd("ctx");
  583. var $1,$2,$receiver;
  584. $1=self["@position"];
  585. if(($receiver = $1) == null || $receiver.isNil){
  586. $2=self._parent();
  587. if(($receiver = $2) == null || $receiver.isNil){
  588. return $2;
  589. } else {
  590. var node;
  591. node=$receiver;
  592. return $recv(node)._position();
  593. };
  594. } else {
  595. return $1;
  596. };
  597. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  598. }, function($ctx1) {$ctx1.fill(self,"position",{},$globals.Node)});
  599. //>>excludeEnd("ctx");
  600. },
  601. //>>excludeStart("ide", pragmas.excludeIdeData);
  602. args: [],
  603. source: "position\x0a\x09\x22answer the line and column of the receiver in the source code\x22\x0a\x09\x0a\x09^ position ifNil: [ \x0a\x09\x09self parent ifNotNil: [ :node | node position ] ]",
  604. referencedClasses: [],
  605. //>>excludeEnd("ide");
  606. messageSends: ["ifNil:", "ifNotNil:", "parent", "position"]
  607. }),
  608. $globals.Node);
  609. $core.addMethod(
  610. $core.method({
  611. selector: "position:",
  612. protocol: 'accessing',
  613. fn: function (aPosition){
  614. var self=this;
  615. self["@position"]=aPosition;
  616. return self;
  617. },
  618. //>>excludeStart("ide", pragmas.excludeIdeData);
  619. args: ["aPosition"],
  620. source: "position: aPosition\x0a\x09position := aPosition",
  621. referencedClasses: [],
  622. //>>excludeEnd("ide");
  623. messageSends: []
  624. }),
  625. $globals.Node);
  626. $core.addMethod(
  627. $core.method({
  628. selector: "positionEnd",
  629. protocol: 'accessing',
  630. fn: function (){
  631. var self=this;
  632. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  633. return $core.withContext(function($ctx1) {
  634. //>>excludeEnd("ctx");
  635. var $1,$6,$5,$4,$3,$2;
  636. $1=self._positionStart();
  637. $6=self._source();
  638. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  639. $ctx1.sendIdx["source"]=1;
  640. //>>excludeEnd("ctx");
  641. $5=$recv($6)._lines();
  642. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  643. $ctx1.sendIdx["lines"]=1;
  644. //>>excludeEnd("ctx");
  645. $4=$recv($5)._size();
  646. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  647. $ctx1.sendIdx["size"]=1;
  648. //>>excludeEnd("ctx");
  649. $3=$recv($4).__minus((1));
  650. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  651. $ctx1.sendIdx["-"]=1;
  652. //>>excludeEnd("ctx");
  653. $2=$recv($3).__at($recv($recv($recv($recv(self._source())._lines())._last())._size()).__minus((1)));
  654. return $recv($1).__plus($2);
  655. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  656. }, function($ctx1) {$ctx1.fill(self,"positionEnd",{},$globals.Node)});
  657. //>>excludeEnd("ctx");
  658. },
  659. //>>excludeStart("ide", pragmas.excludeIdeData);
  660. args: [],
  661. source: "positionEnd\x0a\x09^ self positionStart + ((self source lines size - 1) @ (self source lines last size - 1))",
  662. referencedClasses: [],
  663. //>>excludeEnd("ide");
  664. messageSends: ["+", "positionStart", "@", "-", "size", "lines", "source", "last"]
  665. }),
  666. $globals.Node);
  667. $core.addMethod(
  668. $core.method({
  669. selector: "positionStart",
  670. protocol: 'accessing',
  671. fn: function (){
  672. var self=this;
  673. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  674. return $core.withContext(function($ctx1) {
  675. //>>excludeEnd("ctx");
  676. return self._position();
  677. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  678. }, function($ctx1) {$ctx1.fill(self,"positionStart",{},$globals.Node)});
  679. //>>excludeEnd("ctx");
  680. },
  681. //>>excludeStart("ide", pragmas.excludeIdeData);
  682. args: [],
  683. source: "positionStart\x0a\x09^ self position",
  684. referencedClasses: [],
  685. //>>excludeEnd("ide");
  686. messageSends: ["position"]
  687. }),
  688. $globals.Node);
  689. $core.addMethod(
  690. $core.method({
  691. selector: "postCopy",
  692. protocol: 'copying',
  693. fn: function (){
  694. var self=this;
  695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  696. return $core.withContext(function($ctx1) {
  697. //>>excludeEnd("ctx");
  698. (
  699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  700. $ctx1.supercall = true,
  701. //>>excludeEnd("ctx");
  702. ($globals.Node.superclass||$boot.nilAsClass).fn.prototype._postCopy.apply($recv(self), []));
  703. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  704. $ctx1.supercall = false;
  705. //>>excludeEnd("ctx");;
  706. $recv(self._nodes())._do_((function(each){
  707. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  708. return $core.withContext(function($ctx2) {
  709. //>>excludeEnd("ctx");
  710. return $recv(each)._parent_(self);
  711. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  712. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  713. //>>excludeEnd("ctx");
  714. }));
  715. return self;
  716. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  717. }, function($ctx1) {$ctx1.fill(self,"postCopy",{},$globals.Node)});
  718. //>>excludeEnd("ctx");
  719. },
  720. //>>excludeStart("ide", pragmas.excludeIdeData);
  721. args: [],
  722. source: "postCopy\x0a\x09super postCopy.\x0a\x09self nodes do: [ :each | each parent: self ]",
  723. referencedClasses: [],
  724. //>>excludeEnd("ide");
  725. messageSends: ["postCopy", "do:", "nodes", "parent:"]
  726. }),
  727. $globals.Node);
  728. $core.addMethod(
  729. $core.method({
  730. selector: "requiresSmalltalkContext",
  731. protocol: 'testing',
  732. fn: function (){
  733. var self=this;
  734. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  735. return $core.withContext(function($ctx1) {
  736. //>>excludeEnd("ctx");
  737. return $recv($recv(self._nodes())._detect_ifNone_((function(each){
  738. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  739. return $core.withContext(function($ctx2) {
  740. //>>excludeEnd("ctx");
  741. return $recv(each)._requiresSmalltalkContext();
  742. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  743. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  744. //>>excludeEnd("ctx");
  745. }),(function(){
  746. return nil;
  747. })))._notNil();
  748. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  749. }, function($ctx1) {$ctx1.fill(self,"requiresSmalltalkContext",{},$globals.Node)});
  750. //>>excludeEnd("ctx");
  751. },
  752. //>>excludeStart("ide", pragmas.excludeIdeData);
  753. args: [],
  754. source: "requiresSmalltalkContext\x0a\x09\x22Answer true if the receiver requires a smalltalk context.\x0a\x09Only send nodes require a context.\x0a\x09\x0a\x09If no node requires a context, the method will be compiled without one.\x0a\x09See `IRJSTranslator` and `JSStream` for context creation\x22\x0a\x09\x0a\x09^ (self nodes \x0a\x09\x09detect: [ :each | each requiresSmalltalkContext ]\x0a\x09\x09ifNone: [ nil ]) notNil",
  755. referencedClasses: [],
  756. //>>excludeEnd("ide");
  757. messageSends: ["notNil", "detect:ifNone:", "nodes", "requiresSmalltalkContext"]
  758. }),
  759. $globals.Node);
  760. $core.addMethod(
  761. $core.method({
  762. selector: "shouldBeAliased",
  763. protocol: 'accessing',
  764. fn: function (){
  765. var self=this;
  766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  767. return $core.withContext(function($ctx1) {
  768. //>>excludeEnd("ctx");
  769. var $1,$receiver;
  770. $1=self["@shouldBeAliased"];
  771. if(($receiver = $1) == null || $receiver.isNil){
  772. return false;
  773. } else {
  774. return $1;
  775. };
  776. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  777. }, function($ctx1) {$ctx1.fill(self,"shouldBeAliased",{},$globals.Node)});
  778. //>>excludeEnd("ctx");
  779. },
  780. //>>excludeStart("ide", pragmas.excludeIdeData);
  781. args: [],
  782. source: "shouldBeAliased\x0a\x09^ shouldBeAliased ifNil: [ false ]",
  783. referencedClasses: [],
  784. //>>excludeEnd("ide");
  785. messageSends: ["ifNil:"]
  786. }),
  787. $globals.Node);
  788. $core.addMethod(
  789. $core.method({
  790. selector: "shouldBeAliased:",
  791. protocol: 'accessing',
  792. fn: function (aBoolean){
  793. var self=this;
  794. self["@shouldBeAliased"]=aBoolean;
  795. return self;
  796. },
  797. //>>excludeStart("ide", pragmas.excludeIdeData);
  798. args: ["aBoolean"],
  799. source: "shouldBeAliased: aBoolean\x0a\x09shouldBeAliased := aBoolean",
  800. referencedClasses: [],
  801. //>>excludeEnd("ide");
  802. messageSends: []
  803. }),
  804. $globals.Node);
  805. $core.addMethod(
  806. $core.method({
  807. selector: "size",
  808. protocol: 'accessing',
  809. fn: function (){
  810. var self=this;
  811. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  812. return $core.withContext(function($ctx1) {
  813. //>>excludeEnd("ctx");
  814. return $recv(self._source())._size();
  815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  816. }, function($ctx1) {$ctx1.fill(self,"size",{},$globals.Node)});
  817. //>>excludeEnd("ctx");
  818. },
  819. //>>excludeStart("ide", pragmas.excludeIdeData);
  820. args: [],
  821. source: "size\x0a\x09^ self source size",
  822. referencedClasses: [],
  823. //>>excludeEnd("ide");
  824. messageSends: ["size", "source"]
  825. }),
  826. $globals.Node);
  827. $core.addMethod(
  828. $core.method({
  829. selector: "source",
  830. protocol: 'accessing',
  831. fn: function (){
  832. var self=this;
  833. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  834. return $core.withContext(function($ctx1) {
  835. //>>excludeEnd("ctx");
  836. var $1,$receiver;
  837. $1=self["@source"];
  838. if(($receiver = $1) == null || $receiver.isNil){
  839. return "";
  840. } else {
  841. return $1;
  842. };
  843. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  844. }, function($ctx1) {$ctx1.fill(self,"source",{},$globals.Node)});
  845. //>>excludeEnd("ctx");
  846. },
  847. //>>excludeStart("ide", pragmas.excludeIdeData);
  848. args: [],
  849. source: "source\x0a\x09^ source ifNil: [ '' ]",
  850. referencedClasses: [],
  851. //>>excludeEnd("ide");
  852. messageSends: ["ifNil:"]
  853. }),
  854. $globals.Node);
  855. $core.addMethod(
  856. $core.method({
  857. selector: "source:",
  858. protocol: 'accessing',
  859. fn: function (aString){
  860. var self=this;
  861. self["@source"]=aString;
  862. return self;
  863. },
  864. //>>excludeStart("ide", pragmas.excludeIdeData);
  865. args: ["aString"],
  866. source: "source: aString\x0a\x09source := aString",
  867. referencedClasses: [],
  868. //>>excludeEnd("ide");
  869. messageSends: []
  870. }),
  871. $globals.Node);
  872. $core.addClass('AssignmentNode', $globals.Node, ['left', 'right'], 'Compiler-AST');
  873. //>>excludeStart("ide", pragmas.excludeIdeData);
  874. $globals.AssignmentNode.comment="I represent an assignment node.";
  875. //>>excludeEnd("ide");
  876. $core.addMethod(
  877. $core.method({
  878. selector: "accept:",
  879. protocol: 'visiting',
  880. fn: function (aVisitor){
  881. var self=this;
  882. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  883. return $core.withContext(function($ctx1) {
  884. //>>excludeEnd("ctx");
  885. return $recv(aVisitor)._visitAssignmentNode_(self);
  886. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  887. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.AssignmentNode)});
  888. //>>excludeEnd("ctx");
  889. },
  890. //>>excludeStart("ide", pragmas.excludeIdeData);
  891. args: ["aVisitor"],
  892. source: "accept: aVisitor\x0a\x09^ aVisitor visitAssignmentNode: self",
  893. referencedClasses: [],
  894. //>>excludeEnd("ide");
  895. messageSends: ["visitAssignmentNode:"]
  896. }),
  897. $globals.AssignmentNode);
  898. $core.addMethod(
  899. $core.method({
  900. selector: "isAssignmentNode",
  901. protocol: 'testing',
  902. fn: function (){
  903. var self=this;
  904. return true;
  905. },
  906. //>>excludeStart("ide", pragmas.excludeIdeData);
  907. args: [],
  908. source: "isAssignmentNode\x0a\x09^ true",
  909. referencedClasses: [],
  910. //>>excludeEnd("ide");
  911. messageSends: []
  912. }),
  913. $globals.AssignmentNode);
  914. $core.addMethod(
  915. $core.method({
  916. selector: "left",
  917. protocol: 'accessing',
  918. fn: function (){
  919. var self=this;
  920. return self["@left"];
  921. },
  922. //>>excludeStart("ide", pragmas.excludeIdeData);
  923. args: [],
  924. source: "left\x0a\x09^ left",
  925. referencedClasses: [],
  926. //>>excludeEnd("ide");
  927. messageSends: []
  928. }),
  929. $globals.AssignmentNode);
  930. $core.addMethod(
  931. $core.method({
  932. selector: "left:",
  933. protocol: 'accessing',
  934. fn: function (aNode){
  935. var self=this;
  936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  937. return $core.withContext(function($ctx1) {
  938. //>>excludeEnd("ctx");
  939. self["@left"]=aNode;
  940. $recv(aNode)._parent_(self);
  941. return self;
  942. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  943. }, function($ctx1) {$ctx1.fill(self,"left:",{aNode:aNode},$globals.AssignmentNode)});
  944. //>>excludeEnd("ctx");
  945. },
  946. //>>excludeStart("ide", pragmas.excludeIdeData);
  947. args: ["aNode"],
  948. source: "left: aNode\x0a\x09left := aNode.\x0a\x09aNode parent: self",
  949. referencedClasses: [],
  950. //>>excludeEnd("ide");
  951. messageSends: ["parent:"]
  952. }),
  953. $globals.AssignmentNode);
  954. $core.addMethod(
  955. $core.method({
  956. selector: "nodes",
  957. protocol: 'accessing',
  958. fn: function (){
  959. var self=this;
  960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  961. return $core.withContext(function($ctx1) {
  962. //>>excludeEnd("ctx");
  963. return $recv($globals.Array)._with_with_(self._left(),self._right());
  964. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  965. }, function($ctx1) {$ctx1.fill(self,"nodes",{},$globals.AssignmentNode)});
  966. //>>excludeEnd("ctx");
  967. },
  968. //>>excludeStart("ide", pragmas.excludeIdeData);
  969. args: [],
  970. source: "nodes\x0a\x09^ Array with: self left with: self right",
  971. referencedClasses: ["Array"],
  972. //>>excludeEnd("ide");
  973. messageSends: ["with:with:", "left", "right"]
  974. }),
  975. $globals.AssignmentNode);
  976. $core.addMethod(
  977. $core.method({
  978. selector: "right",
  979. protocol: 'accessing',
  980. fn: function (){
  981. var self=this;
  982. return self["@right"];
  983. },
  984. //>>excludeStart("ide", pragmas.excludeIdeData);
  985. args: [],
  986. source: "right\x0a\x09^ right",
  987. referencedClasses: [],
  988. //>>excludeEnd("ide");
  989. messageSends: []
  990. }),
  991. $globals.AssignmentNode);
  992. $core.addMethod(
  993. $core.method({
  994. selector: "right:",
  995. protocol: 'accessing',
  996. fn: function (aNode){
  997. var self=this;
  998. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  999. return $core.withContext(function($ctx1) {
  1000. //>>excludeEnd("ctx");
  1001. self["@right"]=aNode;
  1002. $recv(aNode)._parent_(self);
  1003. return self;
  1004. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1005. }, function($ctx1) {$ctx1.fill(self,"right:",{aNode:aNode},$globals.AssignmentNode)});
  1006. //>>excludeEnd("ctx");
  1007. },
  1008. //>>excludeStart("ide", pragmas.excludeIdeData);
  1009. args: ["aNode"],
  1010. source: "right: aNode\x0a\x09right := aNode.\x0a\x09aNode parent: self",
  1011. referencedClasses: [],
  1012. //>>excludeEnd("ide");
  1013. messageSends: ["parent:"]
  1014. }),
  1015. $globals.AssignmentNode);
  1016. $core.addClass('BlockNode', $globals.Node, ['parameters', 'scope'], 'Compiler-AST');
  1017. //>>excludeStart("ide", pragmas.excludeIdeData);
  1018. $globals.BlockNode.comment="I represent an block closure node.";
  1019. //>>excludeEnd("ide");
  1020. $core.addMethod(
  1021. $core.method({
  1022. selector: "accept:",
  1023. protocol: 'visiting',
  1024. fn: function (aVisitor){
  1025. var self=this;
  1026. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1027. return $core.withContext(function($ctx1) {
  1028. //>>excludeEnd("ctx");
  1029. return $recv(aVisitor)._visitBlockNode_(self);
  1030. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1031. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.BlockNode)});
  1032. //>>excludeEnd("ctx");
  1033. },
  1034. //>>excludeStart("ide", pragmas.excludeIdeData);
  1035. args: ["aVisitor"],
  1036. source: "accept: aVisitor\x0a\x09^ aVisitor visitBlockNode: self",
  1037. referencedClasses: [],
  1038. //>>excludeEnd("ide");
  1039. messageSends: ["visitBlockNode:"]
  1040. }),
  1041. $globals.BlockNode);
  1042. $core.addMethod(
  1043. $core.method({
  1044. selector: "isBlockNode",
  1045. protocol: 'testing',
  1046. fn: function (){
  1047. var self=this;
  1048. return true;
  1049. },
  1050. //>>excludeStart("ide", pragmas.excludeIdeData);
  1051. args: [],
  1052. source: "isBlockNode\x0a\x09^ true",
  1053. referencedClasses: [],
  1054. //>>excludeEnd("ide");
  1055. messageSends: []
  1056. }),
  1057. $globals.BlockNode);
  1058. $core.addMethod(
  1059. $core.method({
  1060. selector: "parameters",
  1061. protocol: 'accessing',
  1062. fn: function (){
  1063. var self=this;
  1064. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1065. return $core.withContext(function($ctx1) {
  1066. //>>excludeEnd("ctx");
  1067. var $1,$receiver;
  1068. $1=self["@parameters"];
  1069. if(($receiver = $1) == null || $receiver.isNil){
  1070. self["@parameters"]=$recv($globals.Array)._new();
  1071. return self["@parameters"];
  1072. } else {
  1073. return $1;
  1074. };
  1075. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1076. }, function($ctx1) {$ctx1.fill(self,"parameters",{},$globals.BlockNode)});
  1077. //>>excludeEnd("ctx");
  1078. },
  1079. //>>excludeStart("ide", pragmas.excludeIdeData);
  1080. args: [],
  1081. source: "parameters\x0a\x09^ parameters ifNil: [ parameters := Array new ]",
  1082. referencedClasses: ["Array"],
  1083. //>>excludeEnd("ide");
  1084. messageSends: ["ifNil:", "new"]
  1085. }),
  1086. $globals.BlockNode);
  1087. $core.addMethod(
  1088. $core.method({
  1089. selector: "parameters:",
  1090. protocol: 'accessing',
  1091. fn: function (aCollection){
  1092. var self=this;
  1093. self["@parameters"]=aCollection;
  1094. return self;
  1095. },
  1096. //>>excludeStart("ide", pragmas.excludeIdeData);
  1097. args: ["aCollection"],
  1098. source: "parameters: aCollection\x0a\x09parameters := aCollection",
  1099. referencedClasses: [],
  1100. //>>excludeEnd("ide");
  1101. messageSends: []
  1102. }),
  1103. $globals.BlockNode);
  1104. $core.addMethod(
  1105. $core.method({
  1106. selector: "scope",
  1107. protocol: 'accessing',
  1108. fn: function (){
  1109. var self=this;
  1110. return self["@scope"];
  1111. },
  1112. //>>excludeStart("ide", pragmas.excludeIdeData);
  1113. args: [],
  1114. source: "scope\x0a\x09^ scope",
  1115. referencedClasses: [],
  1116. //>>excludeEnd("ide");
  1117. messageSends: []
  1118. }),
  1119. $globals.BlockNode);
  1120. $core.addMethod(
  1121. $core.method({
  1122. selector: "scope:",
  1123. protocol: 'accessing',
  1124. fn: function (aLexicalScope){
  1125. var self=this;
  1126. self["@scope"]=aLexicalScope;
  1127. return self;
  1128. },
  1129. //>>excludeStart("ide", pragmas.excludeIdeData);
  1130. args: ["aLexicalScope"],
  1131. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  1132. referencedClasses: [],
  1133. //>>excludeEnd("ide");
  1134. messageSends: []
  1135. }),
  1136. $globals.BlockNode);
  1137. $core.addClass('CascadeNode', $globals.Node, ['receiver'], 'Compiler-AST');
  1138. //>>excludeStart("ide", pragmas.excludeIdeData);
  1139. $globals.CascadeNode.comment="I represent an cascade node.";
  1140. //>>excludeEnd("ide");
  1141. $core.addMethod(
  1142. $core.method({
  1143. selector: "accept:",
  1144. protocol: 'visiting',
  1145. fn: function (aVisitor){
  1146. var self=this;
  1147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1148. return $core.withContext(function($ctx1) {
  1149. //>>excludeEnd("ctx");
  1150. return $recv(aVisitor)._visitCascadeNode_(self);
  1151. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1152. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.CascadeNode)});
  1153. //>>excludeEnd("ctx");
  1154. },
  1155. //>>excludeStart("ide", pragmas.excludeIdeData);
  1156. args: ["aVisitor"],
  1157. source: "accept: aVisitor\x0a\x09^ aVisitor visitCascadeNode: self",
  1158. referencedClasses: [],
  1159. //>>excludeEnd("ide");
  1160. messageSends: ["visitCascadeNode:"]
  1161. }),
  1162. $globals.CascadeNode);
  1163. $core.addMethod(
  1164. $core.method({
  1165. selector: "isCascadeNode",
  1166. protocol: 'testing',
  1167. fn: function (){
  1168. var self=this;
  1169. return true;
  1170. },
  1171. //>>excludeStart("ide", pragmas.excludeIdeData);
  1172. args: [],
  1173. source: "isCascadeNode\x0a\x09^ true",
  1174. referencedClasses: [],
  1175. //>>excludeEnd("ide");
  1176. messageSends: []
  1177. }),
  1178. $globals.CascadeNode);
  1179. $core.addMethod(
  1180. $core.method({
  1181. selector: "receiver",
  1182. protocol: 'accessing',
  1183. fn: function (){
  1184. var self=this;
  1185. return self["@receiver"];
  1186. },
  1187. //>>excludeStart("ide", pragmas.excludeIdeData);
  1188. args: [],
  1189. source: "receiver\x0a\x09^ receiver",
  1190. referencedClasses: [],
  1191. //>>excludeEnd("ide");
  1192. messageSends: []
  1193. }),
  1194. $globals.CascadeNode);
  1195. $core.addMethod(
  1196. $core.method({
  1197. selector: "receiver:",
  1198. protocol: 'accessing',
  1199. fn: function (aNode){
  1200. var self=this;
  1201. self["@receiver"]=aNode;
  1202. return self;
  1203. },
  1204. //>>excludeStart("ide", pragmas.excludeIdeData);
  1205. args: ["aNode"],
  1206. source: "receiver: aNode\x0a\x09receiver := aNode",
  1207. referencedClasses: [],
  1208. //>>excludeEnd("ide");
  1209. messageSends: []
  1210. }),
  1211. $globals.CascadeNode);
  1212. $core.addClass('DynamicArrayNode', $globals.Node, [], 'Compiler-AST');
  1213. //>>excludeStart("ide", pragmas.excludeIdeData);
  1214. $globals.DynamicArrayNode.comment="I represent an dynamic array node.";
  1215. //>>excludeEnd("ide");
  1216. $core.addMethod(
  1217. $core.method({
  1218. selector: "accept:",
  1219. protocol: 'visiting',
  1220. fn: function (aVisitor){
  1221. var self=this;
  1222. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1223. return $core.withContext(function($ctx1) {
  1224. //>>excludeEnd("ctx");
  1225. return $recv(aVisitor)._visitDynamicArrayNode_(self);
  1226. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1227. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.DynamicArrayNode)});
  1228. //>>excludeEnd("ctx");
  1229. },
  1230. //>>excludeStart("ide", pragmas.excludeIdeData);
  1231. args: ["aVisitor"],
  1232. source: "accept: aVisitor\x0a\x09^ aVisitor visitDynamicArrayNode: self",
  1233. referencedClasses: [],
  1234. //>>excludeEnd("ide");
  1235. messageSends: ["visitDynamicArrayNode:"]
  1236. }),
  1237. $globals.DynamicArrayNode);
  1238. $core.addClass('DynamicDictionaryNode', $globals.Node, [], 'Compiler-AST');
  1239. //>>excludeStart("ide", pragmas.excludeIdeData);
  1240. $globals.DynamicDictionaryNode.comment="I represent an dynamic dictionary node.";
  1241. //>>excludeEnd("ide");
  1242. $core.addMethod(
  1243. $core.method({
  1244. selector: "accept:",
  1245. protocol: 'visiting',
  1246. fn: function (aVisitor){
  1247. var self=this;
  1248. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1249. return $core.withContext(function($ctx1) {
  1250. //>>excludeEnd("ctx");
  1251. return $recv(aVisitor)._visitDynamicDictionaryNode_(self);
  1252. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1253. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.DynamicDictionaryNode)});
  1254. //>>excludeEnd("ctx");
  1255. },
  1256. //>>excludeStart("ide", pragmas.excludeIdeData);
  1257. args: ["aVisitor"],
  1258. source: "accept: aVisitor\x0a\x09^ aVisitor visitDynamicDictionaryNode: self",
  1259. referencedClasses: [],
  1260. //>>excludeEnd("ide");
  1261. messageSends: ["visitDynamicDictionaryNode:"]
  1262. }),
  1263. $globals.DynamicDictionaryNode);
  1264. $core.addClass('JSStatementNode', $globals.Node, [], 'Compiler-AST');
  1265. //>>excludeStart("ide", pragmas.excludeIdeData);
  1266. $globals.JSStatementNode.comment="I represent an JavaScript statement node.";
  1267. //>>excludeEnd("ide");
  1268. $core.addMethod(
  1269. $core.method({
  1270. selector: "accept:",
  1271. protocol: 'visiting',
  1272. fn: function (aVisitor){
  1273. var self=this;
  1274. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1275. return $core.withContext(function($ctx1) {
  1276. //>>excludeEnd("ctx");
  1277. return $recv(aVisitor)._visitJSStatementNode_(self);
  1278. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1279. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.JSStatementNode)});
  1280. //>>excludeEnd("ctx");
  1281. },
  1282. //>>excludeStart("ide", pragmas.excludeIdeData);
  1283. args: ["aVisitor"],
  1284. source: "accept: aVisitor\x0a\x09^ aVisitor visitJSStatementNode: self",
  1285. referencedClasses: [],
  1286. //>>excludeEnd("ide");
  1287. messageSends: ["visitJSStatementNode:"]
  1288. }),
  1289. $globals.JSStatementNode);
  1290. $core.addMethod(
  1291. $core.method({
  1292. selector: "isJSStatementNode",
  1293. protocol: 'testing',
  1294. fn: function (){
  1295. var self=this;
  1296. return true;
  1297. },
  1298. //>>excludeStart("ide", pragmas.excludeIdeData);
  1299. args: [],
  1300. source: "isJSStatementNode\x0a\x09^ true",
  1301. referencedClasses: [],
  1302. //>>excludeEnd("ide");
  1303. messageSends: []
  1304. }),
  1305. $globals.JSStatementNode);
  1306. $core.addMethod(
  1307. $core.method({
  1308. selector: "requiresSmalltalkContext",
  1309. protocol: 'testing',
  1310. fn: function (){
  1311. var self=this;
  1312. return true;
  1313. },
  1314. //>>excludeStart("ide", pragmas.excludeIdeData);
  1315. args: [],
  1316. source: "requiresSmalltalkContext\x0a\x09^ true",
  1317. referencedClasses: [],
  1318. //>>excludeEnd("ide");
  1319. messageSends: []
  1320. }),
  1321. $globals.JSStatementNode);
  1322. $core.addClass('MethodNode', $globals.Node, ['selector', 'arguments', 'source', 'scope', 'classReferences', 'sendIndexes'], 'Compiler-AST');
  1323. //>>excludeStart("ide", pragmas.excludeIdeData);
  1324. $globals.MethodNode.comment="I represent an method node.\x0a\x0aA method node must be the root and only method node of a valid AST.";
  1325. //>>excludeEnd("ide");
  1326. $core.addMethod(
  1327. $core.method({
  1328. selector: "accept:",
  1329. protocol: 'visiting',
  1330. fn: function (aVisitor){
  1331. var self=this;
  1332. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1333. return $core.withContext(function($ctx1) {
  1334. //>>excludeEnd("ctx");
  1335. return $recv(aVisitor)._visitMethodNode_(self);
  1336. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1337. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.MethodNode)});
  1338. //>>excludeEnd("ctx");
  1339. },
  1340. //>>excludeStart("ide", pragmas.excludeIdeData);
  1341. args: ["aVisitor"],
  1342. source: "accept: aVisitor\x0a\x09^ aVisitor visitMethodNode: self",
  1343. referencedClasses: [],
  1344. //>>excludeEnd("ide");
  1345. messageSends: ["visitMethodNode:"]
  1346. }),
  1347. $globals.MethodNode);
  1348. $core.addMethod(
  1349. $core.method({
  1350. selector: "arguments",
  1351. protocol: 'accessing',
  1352. fn: function (){
  1353. var self=this;
  1354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1355. return $core.withContext(function($ctx1) {
  1356. //>>excludeEnd("ctx");
  1357. var $1,$receiver;
  1358. $1=self["@arguments"];
  1359. if(($receiver = $1) == null || $receiver.isNil){
  1360. return [];
  1361. } else {
  1362. return $1;
  1363. };
  1364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1365. }, function($ctx1) {$ctx1.fill(self,"arguments",{},$globals.MethodNode)});
  1366. //>>excludeEnd("ctx");
  1367. },
  1368. //>>excludeStart("ide", pragmas.excludeIdeData);
  1369. args: [],
  1370. source: "arguments\x0a\x09^ arguments ifNil: [ #() ]",
  1371. referencedClasses: [],
  1372. //>>excludeEnd("ide");
  1373. messageSends: ["ifNil:"]
  1374. }),
  1375. $globals.MethodNode);
  1376. $core.addMethod(
  1377. $core.method({
  1378. selector: "arguments:",
  1379. protocol: 'accessing',
  1380. fn: function (aCollection){
  1381. var self=this;
  1382. self["@arguments"]=aCollection;
  1383. return self;
  1384. },
  1385. //>>excludeStart("ide", pragmas.excludeIdeData);
  1386. args: ["aCollection"],
  1387. source: "arguments: aCollection\x0a\x09arguments := aCollection",
  1388. referencedClasses: [],
  1389. //>>excludeEnd("ide");
  1390. messageSends: []
  1391. }),
  1392. $globals.MethodNode);
  1393. $core.addMethod(
  1394. $core.method({
  1395. selector: "classReferences",
  1396. protocol: 'accessing',
  1397. fn: function (){
  1398. var self=this;
  1399. return self["@classReferences"];
  1400. },
  1401. //>>excludeStart("ide", pragmas.excludeIdeData);
  1402. args: [],
  1403. source: "classReferences\x0a\x09^ classReferences",
  1404. referencedClasses: [],
  1405. //>>excludeEnd("ide");
  1406. messageSends: []
  1407. }),
  1408. $globals.MethodNode);
  1409. $core.addMethod(
  1410. $core.method({
  1411. selector: "classReferences:",
  1412. protocol: 'accessing',
  1413. fn: function (aCollection){
  1414. var self=this;
  1415. self["@classReferences"]=aCollection;
  1416. return self;
  1417. },
  1418. //>>excludeStart("ide", pragmas.excludeIdeData);
  1419. args: ["aCollection"],
  1420. source: "classReferences: aCollection\x0a\x09classReferences := aCollection",
  1421. referencedClasses: [],
  1422. //>>excludeEnd("ide");
  1423. messageSends: []
  1424. }),
  1425. $globals.MethodNode);
  1426. $core.addMethod(
  1427. $core.method({
  1428. selector: "messageSends",
  1429. protocol: 'accessing',
  1430. fn: function (){
  1431. var self=this;
  1432. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1433. return $core.withContext(function($ctx1) {
  1434. //>>excludeEnd("ctx");
  1435. return $recv(self._sendIndexes())._keys();
  1436. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1437. }, function($ctx1) {$ctx1.fill(self,"messageSends",{},$globals.MethodNode)});
  1438. //>>excludeEnd("ctx");
  1439. },
  1440. //>>excludeStart("ide", pragmas.excludeIdeData);
  1441. args: [],
  1442. source: "messageSends\x0a\x09^ self sendIndexes keys",
  1443. referencedClasses: [],
  1444. //>>excludeEnd("ide");
  1445. messageSends: ["keys", "sendIndexes"]
  1446. }),
  1447. $globals.MethodNode);
  1448. $core.addMethod(
  1449. $core.method({
  1450. selector: "method",
  1451. protocol: 'accessing',
  1452. fn: function (){
  1453. var self=this;
  1454. return self;
  1455. },
  1456. //>>excludeStart("ide", pragmas.excludeIdeData);
  1457. args: [],
  1458. source: "method\x0a\x09^ self",
  1459. referencedClasses: [],
  1460. //>>excludeEnd("ide");
  1461. messageSends: []
  1462. }),
  1463. $globals.MethodNode);
  1464. $core.addMethod(
  1465. $core.method({
  1466. selector: "scope",
  1467. protocol: 'accessing',
  1468. fn: function (){
  1469. var self=this;
  1470. return self["@scope"];
  1471. },
  1472. //>>excludeStart("ide", pragmas.excludeIdeData);
  1473. args: [],
  1474. source: "scope\x0a\x09^ scope",
  1475. referencedClasses: [],
  1476. //>>excludeEnd("ide");
  1477. messageSends: []
  1478. }),
  1479. $globals.MethodNode);
  1480. $core.addMethod(
  1481. $core.method({
  1482. selector: "scope:",
  1483. protocol: 'accessing',
  1484. fn: function (aMethodScope){
  1485. var self=this;
  1486. self["@scope"]=aMethodScope;
  1487. return self;
  1488. },
  1489. //>>excludeStart("ide", pragmas.excludeIdeData);
  1490. args: ["aMethodScope"],
  1491. source: "scope: aMethodScope\x0a\x09scope := aMethodScope",
  1492. referencedClasses: [],
  1493. //>>excludeEnd("ide");
  1494. messageSends: []
  1495. }),
  1496. $globals.MethodNode);
  1497. $core.addMethod(
  1498. $core.method({
  1499. selector: "selector",
  1500. protocol: 'accessing',
  1501. fn: function (){
  1502. var self=this;
  1503. return self["@selector"];
  1504. },
  1505. //>>excludeStart("ide", pragmas.excludeIdeData);
  1506. args: [],
  1507. source: "selector\x0a\x09^ selector",
  1508. referencedClasses: [],
  1509. //>>excludeEnd("ide");
  1510. messageSends: []
  1511. }),
  1512. $globals.MethodNode);
  1513. $core.addMethod(
  1514. $core.method({
  1515. selector: "selector:",
  1516. protocol: 'accessing',
  1517. fn: function (aString){
  1518. var self=this;
  1519. self["@selector"]=aString;
  1520. return self;
  1521. },
  1522. //>>excludeStart("ide", pragmas.excludeIdeData);
  1523. args: ["aString"],
  1524. source: "selector: aString\x0a\x09selector := aString",
  1525. referencedClasses: [],
  1526. //>>excludeEnd("ide");
  1527. messageSends: []
  1528. }),
  1529. $globals.MethodNode);
  1530. $core.addMethod(
  1531. $core.method({
  1532. selector: "sendIndexes",
  1533. protocol: 'accessing',
  1534. fn: function (){
  1535. var self=this;
  1536. return self["@sendIndexes"];
  1537. },
  1538. //>>excludeStart("ide", pragmas.excludeIdeData);
  1539. args: [],
  1540. source: "sendIndexes\x0a\x09^ sendIndexes",
  1541. referencedClasses: [],
  1542. //>>excludeEnd("ide");
  1543. messageSends: []
  1544. }),
  1545. $globals.MethodNode);
  1546. $core.addMethod(
  1547. $core.method({
  1548. selector: "sendIndexes:",
  1549. protocol: 'accessing',
  1550. fn: function (aDictionary){
  1551. var self=this;
  1552. self["@sendIndexes"]=aDictionary;
  1553. return self;
  1554. },
  1555. //>>excludeStart("ide", pragmas.excludeIdeData);
  1556. args: ["aDictionary"],
  1557. source: "sendIndexes: aDictionary\x0a\x09sendIndexes := aDictionary",
  1558. referencedClasses: [],
  1559. //>>excludeEnd("ide");
  1560. messageSends: []
  1561. }),
  1562. $globals.MethodNode);
  1563. $core.addMethod(
  1564. $core.method({
  1565. selector: "sequenceNode",
  1566. protocol: 'accessing',
  1567. fn: function (){
  1568. var self=this;
  1569. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1570. return $core.withContext(function($ctx1) {
  1571. //>>excludeEnd("ctx");
  1572. var $1;
  1573. var $early={};
  1574. try {
  1575. $recv(self._nodes())._do_((function(each){
  1576. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1577. return $core.withContext(function($ctx2) {
  1578. //>>excludeEnd("ctx");
  1579. $1=$recv(each)._isSequenceNode();
  1580. if($core.assert($1)){
  1581. throw $early=[each];
  1582. };
  1583. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1584. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1585. //>>excludeEnd("ctx");
  1586. }));
  1587. return nil;
  1588. }
  1589. catch(e) {if(e===$early)return e[0]; throw e}
  1590. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1591. }, function($ctx1) {$ctx1.fill(self,"sequenceNode",{},$globals.MethodNode)});
  1592. //>>excludeEnd("ctx");
  1593. },
  1594. //>>excludeStart("ide", pragmas.excludeIdeData);
  1595. args: [],
  1596. source: "sequenceNode\x0a\x09self nodes do: [ :each |\x0a\x09\x09each isSequenceNode ifTrue: [ ^ each ] ].\x0a\x09\x09\x0a\x09^ nil",
  1597. referencedClasses: [],
  1598. //>>excludeEnd("ide");
  1599. messageSends: ["do:", "nodes", "ifTrue:", "isSequenceNode"]
  1600. }),
  1601. $globals.MethodNode);
  1602. $core.addMethod(
  1603. $core.method({
  1604. selector: "source",
  1605. protocol: 'accessing',
  1606. fn: function (){
  1607. var self=this;
  1608. return self["@source"];
  1609. },
  1610. //>>excludeStart("ide", pragmas.excludeIdeData);
  1611. args: [],
  1612. source: "source\x0a\x09^ source",
  1613. referencedClasses: [],
  1614. //>>excludeEnd("ide");
  1615. messageSends: []
  1616. }),
  1617. $globals.MethodNode);
  1618. $core.addMethod(
  1619. $core.method({
  1620. selector: "source:",
  1621. protocol: 'accessing',
  1622. fn: function (aString){
  1623. var self=this;
  1624. self["@source"]=aString;
  1625. return self;
  1626. },
  1627. //>>excludeStart("ide", pragmas.excludeIdeData);
  1628. args: ["aString"],
  1629. source: "source: aString\x0a\x09source := aString",
  1630. referencedClasses: [],
  1631. //>>excludeEnd("ide");
  1632. messageSends: []
  1633. }),
  1634. $globals.MethodNode);
  1635. $core.addClass('ReturnNode', $globals.Node, ['scope'], 'Compiler-AST');
  1636. //>>excludeStart("ide", pragmas.excludeIdeData);
  1637. $globals.ReturnNode.comment="I represent an return node. At the AST level, there is not difference between a local return or non-local return.";
  1638. //>>excludeEnd("ide");
  1639. $core.addMethod(
  1640. $core.method({
  1641. selector: "accept:",
  1642. protocol: 'visiting',
  1643. fn: function (aVisitor){
  1644. var self=this;
  1645. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1646. return $core.withContext(function($ctx1) {
  1647. //>>excludeEnd("ctx");
  1648. return $recv(aVisitor)._visitReturnNode_(self);
  1649. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1650. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.ReturnNode)});
  1651. //>>excludeEnd("ctx");
  1652. },
  1653. //>>excludeStart("ide", pragmas.excludeIdeData);
  1654. args: ["aVisitor"],
  1655. source: "accept: aVisitor\x0a\x09^ aVisitor visitReturnNode: self",
  1656. referencedClasses: [],
  1657. //>>excludeEnd("ide");
  1658. messageSends: ["visitReturnNode:"]
  1659. }),
  1660. $globals.ReturnNode);
  1661. $core.addMethod(
  1662. $core.method({
  1663. selector: "isReturnNode",
  1664. protocol: 'testing',
  1665. fn: function (){
  1666. var self=this;
  1667. return true;
  1668. },
  1669. //>>excludeStart("ide", pragmas.excludeIdeData);
  1670. args: [],
  1671. source: "isReturnNode\x0a\x09^ true",
  1672. referencedClasses: [],
  1673. //>>excludeEnd("ide");
  1674. messageSends: []
  1675. }),
  1676. $globals.ReturnNode);
  1677. $core.addMethod(
  1678. $core.method({
  1679. selector: "nonLocalReturn",
  1680. protocol: 'testing',
  1681. fn: function (){
  1682. var self=this;
  1683. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1684. return $core.withContext(function($ctx1) {
  1685. //>>excludeEnd("ctx");
  1686. return $recv($recv(self._scope())._isMethodScope())._not();
  1687. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1688. }, function($ctx1) {$ctx1.fill(self,"nonLocalReturn",{},$globals.ReturnNode)});
  1689. //>>excludeEnd("ctx");
  1690. },
  1691. //>>excludeStart("ide", pragmas.excludeIdeData);
  1692. args: [],
  1693. source: "nonLocalReturn\x0a\x09^ self scope isMethodScope not",
  1694. referencedClasses: [],
  1695. //>>excludeEnd("ide");
  1696. messageSends: ["not", "isMethodScope", "scope"]
  1697. }),
  1698. $globals.ReturnNode);
  1699. $core.addMethod(
  1700. $core.method({
  1701. selector: "scope",
  1702. protocol: 'accessing',
  1703. fn: function (){
  1704. var self=this;
  1705. return self["@scope"];
  1706. },
  1707. //>>excludeStart("ide", pragmas.excludeIdeData);
  1708. args: [],
  1709. source: "scope\x0a\x09^ scope",
  1710. referencedClasses: [],
  1711. //>>excludeEnd("ide");
  1712. messageSends: []
  1713. }),
  1714. $globals.ReturnNode);
  1715. $core.addMethod(
  1716. $core.method({
  1717. selector: "scope:",
  1718. protocol: 'accessing',
  1719. fn: function (aLexicalScope){
  1720. var self=this;
  1721. self["@scope"]=aLexicalScope;
  1722. return self;
  1723. },
  1724. //>>excludeStart("ide", pragmas.excludeIdeData);
  1725. args: ["aLexicalScope"],
  1726. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  1727. referencedClasses: [],
  1728. //>>excludeEnd("ide");
  1729. messageSends: []
  1730. }),
  1731. $globals.ReturnNode);
  1732. $core.addClass('SendNode', $globals.Node, ['selector', 'arguments', 'receiver', 'index', 'shouldBeInlined'], 'Compiler-AST');
  1733. //>>excludeStart("ide", pragmas.excludeIdeData);
  1734. $globals.SendNode.comment="I represent an message send node.";
  1735. //>>excludeEnd("ide");
  1736. $core.addMethod(
  1737. $core.method({
  1738. selector: "accept:",
  1739. protocol: 'visiting',
  1740. fn: function (aVisitor){
  1741. var self=this;
  1742. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1743. return $core.withContext(function($ctx1) {
  1744. //>>excludeEnd("ctx");
  1745. return $recv(aVisitor)._visitSendNode_(self);
  1746. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1747. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.SendNode)});
  1748. //>>excludeEnd("ctx");
  1749. },
  1750. //>>excludeStart("ide", pragmas.excludeIdeData);
  1751. args: ["aVisitor"],
  1752. source: "accept: aVisitor\x0a\x09^ aVisitor visitSendNode: self",
  1753. referencedClasses: [],
  1754. //>>excludeEnd("ide");
  1755. messageSends: ["visitSendNode:"]
  1756. }),
  1757. $globals.SendNode);
  1758. $core.addMethod(
  1759. $core.method({
  1760. selector: "arguments",
  1761. protocol: 'accessing',
  1762. fn: function (){
  1763. var self=this;
  1764. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1765. return $core.withContext(function($ctx1) {
  1766. //>>excludeEnd("ctx");
  1767. var $1,$receiver;
  1768. $1=self["@arguments"];
  1769. if(($receiver = $1) == null || $receiver.isNil){
  1770. self["@arguments"]=[];
  1771. return self["@arguments"];
  1772. } else {
  1773. return $1;
  1774. };
  1775. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1776. }, function($ctx1) {$ctx1.fill(self,"arguments",{},$globals.SendNode)});
  1777. //>>excludeEnd("ctx");
  1778. },
  1779. //>>excludeStart("ide", pragmas.excludeIdeData);
  1780. args: [],
  1781. source: "arguments\x0a\x09^ arguments ifNil: [ arguments := #() ]",
  1782. referencedClasses: [],
  1783. //>>excludeEnd("ide");
  1784. messageSends: ["ifNil:"]
  1785. }),
  1786. $globals.SendNode);
  1787. $core.addMethod(
  1788. $core.method({
  1789. selector: "arguments:",
  1790. protocol: 'accessing',
  1791. fn: function (aCollection){
  1792. var self=this;
  1793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1794. return $core.withContext(function($ctx1) {
  1795. //>>excludeEnd("ctx");
  1796. self["@arguments"]=aCollection;
  1797. $recv(aCollection)._do_((function(each){
  1798. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1799. return $core.withContext(function($ctx2) {
  1800. //>>excludeEnd("ctx");
  1801. return $recv(each)._parent_(self);
  1802. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1803. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1804. //>>excludeEnd("ctx");
  1805. }));
  1806. return self;
  1807. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1808. }, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection},$globals.SendNode)});
  1809. //>>excludeEnd("ctx");
  1810. },
  1811. //>>excludeStart("ide", pragmas.excludeIdeData);
  1812. args: ["aCollection"],
  1813. source: "arguments: aCollection\x0a\x09arguments := aCollection.\x0a\x09aCollection do: [ :each | each parent: self ]",
  1814. referencedClasses: [],
  1815. //>>excludeEnd("ide");
  1816. messageSends: ["do:", "parent:"]
  1817. }),
  1818. $globals.SendNode);
  1819. $core.addMethod(
  1820. $core.method({
  1821. selector: "cascadeNodeWithMessages:",
  1822. protocol: 'accessing',
  1823. fn: function (aCollection){
  1824. var self=this;
  1825. var first;
  1826. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1827. return $core.withContext(function($ctx1) {
  1828. //>>excludeEnd("ctx");
  1829. var $1,$2,$3;
  1830. $1=$recv($globals.SendNode)._new();
  1831. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1832. $ctx1.sendIdx["new"]=1;
  1833. //>>excludeEnd("ctx");
  1834. $recv($1)._selector_(self._selector());
  1835. $recv($1)._arguments_(self._arguments());
  1836. $2=$recv($1)._yourself();
  1837. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1838. $ctx1.sendIdx["yourself"]=1;
  1839. //>>excludeEnd("ctx");
  1840. first=$2;
  1841. $3=$recv($globals.CascadeNode)._new();
  1842. $recv($3)._receiver_(self._receiver());
  1843. $recv($3)._nodes_($recv($recv($globals.Array)._with_(first)).__comma(aCollection));
  1844. return $recv($3)._yourself();
  1845. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1846. }, function($ctx1) {$ctx1.fill(self,"cascadeNodeWithMessages:",{aCollection:aCollection,first:first},$globals.SendNode)});
  1847. //>>excludeEnd("ctx");
  1848. },
  1849. //>>excludeStart("ide", pragmas.excludeIdeData);
  1850. args: ["aCollection"],
  1851. source: "cascadeNodeWithMessages: aCollection\x0a\x09| first |\x0a\x09first := SendNode new\x0a\x09\x09selector: self selector;\x0a\x09\x09arguments: self arguments;\x0a\x09\x09yourself.\x0a\x09^ CascadeNode new\x0a\x09\x09receiver: self receiver;\x0a\x09\x09nodes: (Array with: first), aCollection;\x0a\x09\x09yourself",
  1852. referencedClasses: ["SendNode", "CascadeNode", "Array"],
  1853. //>>excludeEnd("ide");
  1854. messageSends: ["selector:", "new", "selector", "arguments:", "arguments", "yourself", "receiver:", "receiver", "nodes:", ",", "with:"]
  1855. }),
  1856. $globals.SendNode);
  1857. $core.addMethod(
  1858. $core.method({
  1859. selector: "index",
  1860. protocol: 'accessing',
  1861. fn: function (){
  1862. var self=this;
  1863. return self["@index"];
  1864. },
  1865. //>>excludeStart("ide", pragmas.excludeIdeData);
  1866. args: [],
  1867. source: "index\x0a\x09^ index",
  1868. referencedClasses: [],
  1869. //>>excludeEnd("ide");
  1870. messageSends: []
  1871. }),
  1872. $globals.SendNode);
  1873. $core.addMethod(
  1874. $core.method({
  1875. selector: "index:",
  1876. protocol: 'accessing',
  1877. fn: function (anInteger){
  1878. var self=this;
  1879. self["@index"]=anInteger;
  1880. return self;
  1881. },
  1882. //>>excludeStart("ide", pragmas.excludeIdeData);
  1883. args: ["anInteger"],
  1884. source: "index: anInteger\x0a\x09index := anInteger",
  1885. referencedClasses: [],
  1886. //>>excludeEnd("ide");
  1887. messageSends: []
  1888. }),
  1889. $globals.SendNode);
  1890. $core.addMethod(
  1891. $core.method({
  1892. selector: "isNavigationNode",
  1893. protocol: 'testing',
  1894. fn: function (){
  1895. var self=this;
  1896. return true;
  1897. },
  1898. //>>excludeStart("ide", pragmas.excludeIdeData);
  1899. args: [],
  1900. source: "isNavigationNode\x0a\x09^ true",
  1901. referencedClasses: [],
  1902. //>>excludeEnd("ide");
  1903. messageSends: []
  1904. }),
  1905. $globals.SendNode);
  1906. $core.addMethod(
  1907. $core.method({
  1908. selector: "isSendNode",
  1909. protocol: 'testing',
  1910. fn: function (){
  1911. var self=this;
  1912. return true;
  1913. },
  1914. //>>excludeStart("ide", pragmas.excludeIdeData);
  1915. args: [],
  1916. source: "isSendNode\x0a\x09^ true",
  1917. referencedClasses: [],
  1918. //>>excludeEnd("ide");
  1919. messageSends: []
  1920. }),
  1921. $globals.SendNode);
  1922. $core.addMethod(
  1923. $core.method({
  1924. selector: "navigationLink",
  1925. protocol: 'accessing',
  1926. fn: function (){
  1927. var self=this;
  1928. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1929. return $core.withContext(function($ctx1) {
  1930. //>>excludeEnd("ctx");
  1931. return self._selector();
  1932. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1933. }, function($ctx1) {$ctx1.fill(self,"navigationLink",{},$globals.SendNode)});
  1934. //>>excludeEnd("ctx");
  1935. },
  1936. //>>excludeStart("ide", pragmas.excludeIdeData);
  1937. args: [],
  1938. source: "navigationLink\x0a\x09^ self selector",
  1939. referencedClasses: [],
  1940. //>>excludeEnd("ide");
  1941. messageSends: ["selector"]
  1942. }),
  1943. $globals.SendNode);
  1944. $core.addMethod(
  1945. $core.method({
  1946. selector: "nodes",
  1947. protocol: 'accessing',
  1948. fn: function (){
  1949. var self=this;
  1950. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1951. return $core.withContext(function($ctx1) {
  1952. //>>excludeEnd("ctx");
  1953. var $1,$2,$3,$receiver;
  1954. $1=self._receiver();
  1955. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1956. $ctx1.sendIdx["receiver"]=1;
  1957. //>>excludeEnd("ctx");
  1958. if(($receiver = $1) == null || $receiver.isNil){
  1959. $2=self._arguments();
  1960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1961. $ctx1.sendIdx["arguments"]=1;
  1962. //>>excludeEnd("ctx");
  1963. return $recv($2)._copy();
  1964. } else {
  1965. $1;
  1966. };
  1967. $3=$recv($globals.Array)._with_(self._receiver());
  1968. $recv($3)._addAll_(self._arguments());
  1969. return $recv($3)._yourself();
  1970. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1971. }, function($ctx1) {$ctx1.fill(self,"nodes",{},$globals.SendNode)});
  1972. //>>excludeEnd("ctx");
  1973. },
  1974. //>>excludeStart("ide", pragmas.excludeIdeData);
  1975. args: [],
  1976. source: "nodes\x0a\x09self receiver ifNil: [ ^ self arguments copy ].\x0a\x09\x0a\x09^ (Array with: self receiver)\x0a\x09\x09addAll: self arguments;\x0a\x09\x09yourself",
  1977. referencedClasses: ["Array"],
  1978. //>>excludeEnd("ide");
  1979. messageSends: ["ifNil:", "receiver", "copy", "arguments", "addAll:", "with:", "yourself"]
  1980. }),
  1981. $globals.SendNode);
  1982. $core.addMethod(
  1983. $core.method({
  1984. selector: "receiver",
  1985. protocol: 'accessing',
  1986. fn: function (){
  1987. var self=this;
  1988. return self["@receiver"];
  1989. },
  1990. //>>excludeStart("ide", pragmas.excludeIdeData);
  1991. args: [],
  1992. source: "receiver\x0a\x09^ receiver",
  1993. referencedClasses: [],
  1994. //>>excludeEnd("ide");
  1995. messageSends: []
  1996. }),
  1997. $globals.SendNode);
  1998. $core.addMethod(
  1999. $core.method({
  2000. selector: "receiver:",
  2001. protocol: 'accessing',
  2002. fn: function (aNode){
  2003. var self=this;
  2004. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2005. return $core.withContext(function($ctx1) {
  2006. //>>excludeEnd("ctx");
  2007. var $1;
  2008. self["@receiver"]=aNode;
  2009. $1=$recv(aNode)._isNode();
  2010. if($core.assert($1)){
  2011. $recv(aNode)._parent_(self);
  2012. };
  2013. return self;
  2014. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2015. }, function($ctx1) {$ctx1.fill(self,"receiver:",{aNode:aNode},$globals.SendNode)});
  2016. //>>excludeEnd("ctx");
  2017. },
  2018. //>>excludeStart("ide", pragmas.excludeIdeData);
  2019. args: ["aNode"],
  2020. source: "receiver: aNode\x0a\x09receiver := aNode.\x0a\x09aNode isNode ifTrue: [\x0a\x09\x09aNode parent: self ]",
  2021. referencedClasses: [],
  2022. //>>excludeEnd("ide");
  2023. messageSends: ["ifTrue:", "isNode", "parent:"]
  2024. }),
  2025. $globals.SendNode);
  2026. $core.addMethod(
  2027. $core.method({
  2028. selector: "requiresSmalltalkContext",
  2029. protocol: 'testing',
  2030. fn: function (){
  2031. var self=this;
  2032. return true;
  2033. },
  2034. //>>excludeStart("ide", pragmas.excludeIdeData);
  2035. args: [],
  2036. source: "requiresSmalltalkContext\x0a\x09^ true",
  2037. referencedClasses: [],
  2038. //>>excludeEnd("ide");
  2039. messageSends: []
  2040. }),
  2041. $globals.SendNode);
  2042. $core.addMethod(
  2043. $core.method({
  2044. selector: "selector",
  2045. protocol: 'accessing',
  2046. fn: function (){
  2047. var self=this;
  2048. return self["@selector"];
  2049. },
  2050. //>>excludeStart("ide", pragmas.excludeIdeData);
  2051. args: [],
  2052. source: "selector\x0a\x09^ selector",
  2053. referencedClasses: [],
  2054. //>>excludeEnd("ide");
  2055. messageSends: []
  2056. }),
  2057. $globals.SendNode);
  2058. $core.addMethod(
  2059. $core.method({
  2060. selector: "selector:",
  2061. protocol: 'accessing',
  2062. fn: function (aString){
  2063. var self=this;
  2064. self["@selector"]=aString;
  2065. return self;
  2066. },
  2067. //>>excludeStart("ide", pragmas.excludeIdeData);
  2068. args: ["aString"],
  2069. source: "selector: aString\x0a\x09selector := aString",
  2070. referencedClasses: [],
  2071. //>>excludeEnd("ide");
  2072. messageSends: []
  2073. }),
  2074. $globals.SendNode);
  2075. $core.addMethod(
  2076. $core.method({
  2077. selector: "shouldBeInlined",
  2078. protocol: 'accessing',
  2079. fn: function (){
  2080. var self=this;
  2081. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2082. return $core.withContext(function($ctx1) {
  2083. //>>excludeEnd("ctx");
  2084. var $1,$receiver;
  2085. $1=self["@shouldBeInlined"];
  2086. if(($receiver = $1) == null || $receiver.isNil){
  2087. return false;
  2088. } else {
  2089. return $1;
  2090. };
  2091. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2092. }, function($ctx1) {$ctx1.fill(self,"shouldBeInlined",{},$globals.SendNode)});
  2093. //>>excludeEnd("ctx");
  2094. },
  2095. //>>excludeStart("ide", pragmas.excludeIdeData);
  2096. args: [],
  2097. source: "shouldBeInlined\x0a\x09^ shouldBeInlined ifNil: [ false ]",
  2098. referencedClasses: [],
  2099. //>>excludeEnd("ide");
  2100. messageSends: ["ifNil:"]
  2101. }),
  2102. $globals.SendNode);
  2103. $core.addMethod(
  2104. $core.method({
  2105. selector: "shouldBeInlined:",
  2106. protocol: 'accessing',
  2107. fn: function (aBoolean){
  2108. var self=this;
  2109. self["@shouldBeInlined"]=aBoolean;
  2110. return self;
  2111. },
  2112. //>>excludeStart("ide", pragmas.excludeIdeData);
  2113. args: ["aBoolean"],
  2114. source: "shouldBeInlined: aBoolean\x0a\x09shouldBeInlined := aBoolean",
  2115. referencedClasses: [],
  2116. //>>excludeEnd("ide");
  2117. messageSends: []
  2118. }),
  2119. $globals.SendNode);
  2120. $core.addMethod(
  2121. $core.method({
  2122. selector: "superSend",
  2123. protocol: 'accessing',
  2124. fn: function (){
  2125. var self=this;
  2126. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2127. return $core.withContext(function($ctx1) {
  2128. //>>excludeEnd("ctx");
  2129. var $2,$1;
  2130. $2=self._receiver();
  2131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2132. $ctx1.sendIdx["receiver"]=1;
  2133. //>>excludeEnd("ctx");
  2134. $1=$recv($2)._notNil();
  2135. return $recv($1)._and_((function(){
  2136. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2137. return $core.withContext(function($ctx2) {
  2138. //>>excludeEnd("ctx");
  2139. return $recv(self._receiver())._isSuperKeyword();
  2140. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2141. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2142. //>>excludeEnd("ctx");
  2143. }));
  2144. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2145. }, function($ctx1) {$ctx1.fill(self,"superSend",{},$globals.SendNode)});
  2146. //>>excludeEnd("ctx");
  2147. },
  2148. //>>excludeStart("ide", pragmas.excludeIdeData);
  2149. args: [],
  2150. source: "superSend\x0a\x09^ self receiver notNil and: [ self receiver isSuperKeyword ]",
  2151. referencedClasses: [],
  2152. //>>excludeEnd("ide");
  2153. messageSends: ["and:", "notNil", "receiver", "isSuperKeyword"]
  2154. }),
  2155. $globals.SendNode);
  2156. $core.addMethod(
  2157. $core.method({
  2158. selector: "valueForReceiver:",
  2159. protocol: 'building',
  2160. fn: function (anObject){
  2161. var self=this;
  2162. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2163. return $core.withContext(function($ctx1) {
  2164. //>>excludeEnd("ctx");
  2165. var $1,$3,$2,$receiver;
  2166. $1=$recv($globals.SendNode)._new();
  2167. $recv($1)._position_(self._position());
  2168. $recv($1)._source_(self._source());
  2169. $3=self._receiver();
  2170. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2171. $ctx1.sendIdx["receiver"]=1;
  2172. //>>excludeEnd("ctx");
  2173. if(($receiver = $3) == null || $receiver.isNil){
  2174. $2=anObject;
  2175. } else {
  2176. $2=$recv(self._receiver())._valueForReceiver_(anObject);
  2177. };
  2178. $recv($1)._receiver_($2);
  2179. $recv($1)._selector_(self._selector());
  2180. $recv($1)._arguments_(self._arguments());
  2181. return $recv($1)._yourself();
  2182. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2183. }, function($ctx1) {$ctx1.fill(self,"valueForReceiver:",{anObject:anObject},$globals.SendNode)});
  2184. //>>excludeEnd("ctx");
  2185. },
  2186. //>>excludeStart("ide", pragmas.excludeIdeData);
  2187. args: ["anObject"],
  2188. source: "valueForReceiver: anObject\x0a\x09^ SendNode new\x0a\x09\x09position: self position;\x0a\x09\x09source: self source;\x0a\x09\x09receiver: (self receiver\x0a\x09\x09ifNil: [ anObject ] \x0a\x09\x09ifNotNil: [ self receiver valueForReceiver: anObject ]);\x0a\x09\x09selector: self selector;\x0a\x09\x09arguments: self arguments;\x0a\x09\x09yourself",
  2189. referencedClasses: ["SendNode"],
  2190. //>>excludeEnd("ide");
  2191. messageSends: ["position:", "new", "position", "source:", "source", "receiver:", "ifNil:ifNotNil:", "receiver", "valueForReceiver:", "selector:", "selector", "arguments:", "arguments", "yourself"]
  2192. }),
  2193. $globals.SendNode);
  2194. $core.addClass('SequenceNode', $globals.Node, ['temps', 'scope'], 'Compiler-AST');
  2195. //>>excludeStart("ide", pragmas.excludeIdeData);
  2196. $globals.SequenceNode.comment="I represent an sequence node. A sequence represent a set of instructions inside the same scope (the method scope or a block scope).";
  2197. //>>excludeEnd("ide");
  2198. $core.addMethod(
  2199. $core.method({
  2200. selector: "accept:",
  2201. protocol: 'visiting',
  2202. fn: function (aVisitor){
  2203. var self=this;
  2204. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2205. return $core.withContext(function($ctx1) {
  2206. //>>excludeEnd("ctx");
  2207. return $recv(aVisitor)._visitSequenceNode_(self);
  2208. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2209. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.SequenceNode)});
  2210. //>>excludeEnd("ctx");
  2211. },
  2212. //>>excludeStart("ide", pragmas.excludeIdeData);
  2213. args: ["aVisitor"],
  2214. source: "accept: aVisitor\x0a\x09^ aVisitor visitSequenceNode: self",
  2215. referencedClasses: [],
  2216. //>>excludeEnd("ide");
  2217. messageSends: ["visitSequenceNode:"]
  2218. }),
  2219. $globals.SequenceNode);
  2220. $core.addMethod(
  2221. $core.method({
  2222. selector: "asBlockSequenceNode",
  2223. protocol: 'building',
  2224. fn: function (){
  2225. var self=this;
  2226. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2227. return $core.withContext(function($ctx1) {
  2228. //>>excludeEnd("ctx");
  2229. var $1;
  2230. $1=$recv($globals.BlockSequenceNode)._new();
  2231. $recv($1)._position_(self._position());
  2232. $recv($1)._source_(self._source());
  2233. $recv($1)._nodes_(self._nodes());
  2234. $recv($1)._temps_(self._temps());
  2235. return $recv($1)._yourself();
  2236. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2237. }, function($ctx1) {$ctx1.fill(self,"asBlockSequenceNode",{},$globals.SequenceNode)});
  2238. //>>excludeEnd("ctx");
  2239. },
  2240. //>>excludeStart("ide", pragmas.excludeIdeData);
  2241. args: [],
  2242. source: "asBlockSequenceNode\x0a\x09^ BlockSequenceNode new\x0a\x09\x09position: self position;\x0a\x09\x09source: self source;\x0a\x09\x09nodes: self nodes;\x0a\x09\x09temps: self temps;\x0a\x09\x09yourself",
  2243. referencedClasses: ["BlockSequenceNode"],
  2244. //>>excludeEnd("ide");
  2245. messageSends: ["position:", "new", "position", "source:", "source", "nodes:", "nodes", "temps:", "temps", "yourself"]
  2246. }),
  2247. $globals.SequenceNode);
  2248. $core.addMethod(
  2249. $core.method({
  2250. selector: "isSequenceNode",
  2251. protocol: 'testing',
  2252. fn: function (){
  2253. var self=this;
  2254. return true;
  2255. },
  2256. //>>excludeStart("ide", pragmas.excludeIdeData);
  2257. args: [],
  2258. source: "isSequenceNode\x0a\x09^ true",
  2259. referencedClasses: [],
  2260. //>>excludeEnd("ide");
  2261. messageSends: []
  2262. }),
  2263. $globals.SequenceNode);
  2264. $core.addMethod(
  2265. $core.method({
  2266. selector: "scope",
  2267. protocol: 'accessing',
  2268. fn: function (){
  2269. var self=this;
  2270. return self["@scope"];
  2271. },
  2272. //>>excludeStart("ide", pragmas.excludeIdeData);
  2273. args: [],
  2274. source: "scope\x0a\x09^ scope",
  2275. referencedClasses: [],
  2276. //>>excludeEnd("ide");
  2277. messageSends: []
  2278. }),
  2279. $globals.SequenceNode);
  2280. $core.addMethod(
  2281. $core.method({
  2282. selector: "scope:",
  2283. protocol: 'accessing',
  2284. fn: function (aLexicalScope){
  2285. var self=this;
  2286. self["@scope"]=aLexicalScope;
  2287. return self;
  2288. },
  2289. //>>excludeStart("ide", pragmas.excludeIdeData);
  2290. args: ["aLexicalScope"],
  2291. source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
  2292. referencedClasses: [],
  2293. //>>excludeEnd("ide");
  2294. messageSends: []
  2295. }),
  2296. $globals.SequenceNode);
  2297. $core.addMethod(
  2298. $core.method({
  2299. selector: "temps",
  2300. protocol: 'accessing',
  2301. fn: function (){
  2302. var self=this;
  2303. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2304. return $core.withContext(function($ctx1) {
  2305. //>>excludeEnd("ctx");
  2306. var $1,$receiver;
  2307. $1=self["@temps"];
  2308. if(($receiver = $1) == null || $receiver.isNil){
  2309. return [];
  2310. } else {
  2311. return $1;
  2312. };
  2313. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2314. }, function($ctx1) {$ctx1.fill(self,"temps",{},$globals.SequenceNode)});
  2315. //>>excludeEnd("ctx");
  2316. },
  2317. //>>excludeStart("ide", pragmas.excludeIdeData);
  2318. args: [],
  2319. source: "temps\x0a\x09^ temps ifNil: [ #() ]",
  2320. referencedClasses: [],
  2321. //>>excludeEnd("ide");
  2322. messageSends: ["ifNil:"]
  2323. }),
  2324. $globals.SequenceNode);
  2325. $core.addMethod(
  2326. $core.method({
  2327. selector: "temps:",
  2328. protocol: 'accessing',
  2329. fn: function (aCollection){
  2330. var self=this;
  2331. self["@temps"]=aCollection;
  2332. return self;
  2333. },
  2334. //>>excludeStart("ide", pragmas.excludeIdeData);
  2335. args: ["aCollection"],
  2336. source: "temps: aCollection\x0a\x09temps := aCollection",
  2337. referencedClasses: [],
  2338. //>>excludeEnd("ide");
  2339. messageSends: []
  2340. }),
  2341. $globals.SequenceNode);
  2342. $core.addClass('BlockSequenceNode', $globals.SequenceNode, [], 'Compiler-AST');
  2343. //>>excludeStart("ide", pragmas.excludeIdeData);
  2344. $globals.BlockSequenceNode.comment="I represent an special sequence node for block scopes.";
  2345. //>>excludeEnd("ide");
  2346. $core.addMethod(
  2347. $core.method({
  2348. selector: "accept:",
  2349. protocol: 'visiting',
  2350. fn: function (aVisitor){
  2351. var self=this;
  2352. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2353. return $core.withContext(function($ctx1) {
  2354. //>>excludeEnd("ctx");
  2355. return $recv(aVisitor)._visitBlockSequenceNode_(self);
  2356. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2357. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.BlockSequenceNode)});
  2358. //>>excludeEnd("ctx");
  2359. },
  2360. //>>excludeStart("ide", pragmas.excludeIdeData);
  2361. args: ["aVisitor"],
  2362. source: "accept: aVisitor\x0a\x09^ aVisitor visitBlockSequenceNode: self",
  2363. referencedClasses: [],
  2364. //>>excludeEnd("ide");
  2365. messageSends: ["visitBlockSequenceNode:"]
  2366. }),
  2367. $globals.BlockSequenceNode);
  2368. $core.addMethod(
  2369. $core.method({
  2370. selector: "isBlockSequenceNode",
  2371. protocol: 'testing',
  2372. fn: function (){
  2373. var self=this;
  2374. return true;
  2375. },
  2376. //>>excludeStart("ide", pragmas.excludeIdeData);
  2377. args: [],
  2378. source: "isBlockSequenceNode\x0a\x09^ true",
  2379. referencedClasses: [],
  2380. //>>excludeEnd("ide");
  2381. messageSends: []
  2382. }),
  2383. $globals.BlockSequenceNode);
  2384. $core.addClass('ValueNode', $globals.Node, ['value'], 'Compiler-AST');
  2385. //>>excludeStart("ide", pragmas.excludeIdeData);
  2386. $globals.ValueNode.comment="I represent a value node.";
  2387. //>>excludeEnd("ide");
  2388. $core.addMethod(
  2389. $core.method({
  2390. selector: "accept:",
  2391. protocol: 'visiting',
  2392. fn: function (aVisitor){
  2393. var self=this;
  2394. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2395. return $core.withContext(function($ctx1) {
  2396. //>>excludeEnd("ctx");
  2397. return $recv(aVisitor)._visitValueNode_(self);
  2398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2399. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.ValueNode)});
  2400. //>>excludeEnd("ctx");
  2401. },
  2402. //>>excludeStart("ide", pragmas.excludeIdeData);
  2403. args: ["aVisitor"],
  2404. source: "accept: aVisitor\x0a\x09^ aVisitor visitValueNode: self",
  2405. referencedClasses: [],
  2406. //>>excludeEnd("ide");
  2407. messageSends: ["visitValueNode:"]
  2408. }),
  2409. $globals.ValueNode);
  2410. $core.addMethod(
  2411. $core.method({
  2412. selector: "isImmutable",
  2413. protocol: 'testing',
  2414. fn: function (){
  2415. var self=this;
  2416. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2417. return $core.withContext(function($ctx1) {
  2418. //>>excludeEnd("ctx");
  2419. return $recv(self._value())._isImmutable();
  2420. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2421. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},$globals.ValueNode)});
  2422. //>>excludeEnd("ctx");
  2423. },
  2424. //>>excludeStart("ide", pragmas.excludeIdeData);
  2425. args: [],
  2426. source: "isImmutable\x0a\x09^ self value isImmutable",
  2427. referencedClasses: [],
  2428. //>>excludeEnd("ide");
  2429. messageSends: ["isImmutable", "value"]
  2430. }),
  2431. $globals.ValueNode);
  2432. $core.addMethod(
  2433. $core.method({
  2434. selector: "isValueNode",
  2435. protocol: 'testing',
  2436. fn: function (){
  2437. var self=this;
  2438. return true;
  2439. },
  2440. //>>excludeStart("ide", pragmas.excludeIdeData);
  2441. args: [],
  2442. source: "isValueNode\x0a\x09^ true",
  2443. referencedClasses: [],
  2444. //>>excludeEnd("ide");
  2445. messageSends: []
  2446. }),
  2447. $globals.ValueNode);
  2448. $core.addMethod(
  2449. $core.method({
  2450. selector: "value",
  2451. protocol: 'accessing',
  2452. fn: function (){
  2453. var self=this;
  2454. return self["@value"];
  2455. },
  2456. //>>excludeStart("ide", pragmas.excludeIdeData);
  2457. args: [],
  2458. source: "value\x0a\x09^ value",
  2459. referencedClasses: [],
  2460. //>>excludeEnd("ide");
  2461. messageSends: []
  2462. }),
  2463. $globals.ValueNode);
  2464. $core.addMethod(
  2465. $core.method({
  2466. selector: "value:",
  2467. protocol: 'accessing',
  2468. fn: function (anObject){
  2469. var self=this;
  2470. self["@value"]=anObject;
  2471. return self;
  2472. },
  2473. //>>excludeStart("ide", pragmas.excludeIdeData);
  2474. args: ["anObject"],
  2475. source: "value: anObject\x0a\x09value := anObject",
  2476. referencedClasses: [],
  2477. //>>excludeEnd("ide");
  2478. messageSends: []
  2479. }),
  2480. $globals.ValueNode);
  2481. $core.addClass('VariableNode', $globals.ValueNode, ['assigned', 'binding'], 'Compiler-AST');
  2482. //>>excludeStart("ide", pragmas.excludeIdeData);
  2483. $globals.VariableNode.comment="I represent an variable node.";
  2484. //>>excludeEnd("ide");
  2485. $core.addMethod(
  2486. $core.method({
  2487. selector: "accept:",
  2488. protocol: 'visiting',
  2489. fn: function (aVisitor){
  2490. var self=this;
  2491. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2492. return $core.withContext(function($ctx1) {
  2493. //>>excludeEnd("ctx");
  2494. return $recv(aVisitor)._visitVariableNode_(self);
  2495. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2496. }, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor},$globals.VariableNode)});
  2497. //>>excludeEnd("ctx");
  2498. },
  2499. //>>excludeStart("ide", pragmas.excludeIdeData);
  2500. args: ["aVisitor"],
  2501. source: "accept: aVisitor\x0a\x09^ aVisitor visitVariableNode: self",
  2502. referencedClasses: [],
  2503. //>>excludeEnd("ide");
  2504. messageSends: ["visitVariableNode:"]
  2505. }),
  2506. $globals.VariableNode);
  2507. $core.addMethod(
  2508. $core.method({
  2509. selector: "alias",
  2510. protocol: 'accessing',
  2511. fn: function (){
  2512. var self=this;
  2513. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2514. return $core.withContext(function($ctx1) {
  2515. //>>excludeEnd("ctx");
  2516. return $recv(self._binding())._alias();
  2517. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2518. }, function($ctx1) {$ctx1.fill(self,"alias",{},$globals.VariableNode)});
  2519. //>>excludeEnd("ctx");
  2520. },
  2521. //>>excludeStart("ide", pragmas.excludeIdeData);
  2522. args: [],
  2523. source: "alias\x0a\x09^ self binding alias",
  2524. referencedClasses: [],
  2525. //>>excludeEnd("ide");
  2526. messageSends: ["alias", "binding"]
  2527. }),
  2528. $globals.VariableNode);
  2529. $core.addMethod(
  2530. $core.method({
  2531. selector: "assigned",
  2532. protocol: 'accessing',
  2533. fn: function (){
  2534. var self=this;
  2535. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2536. return $core.withContext(function($ctx1) {
  2537. //>>excludeEnd("ctx");
  2538. var $1,$receiver;
  2539. $1=self["@assigned"];
  2540. if(($receiver = $1) == null || $receiver.isNil){
  2541. return false;
  2542. } else {
  2543. return $1;
  2544. };
  2545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2546. }, function($ctx1) {$ctx1.fill(self,"assigned",{},$globals.VariableNode)});
  2547. //>>excludeEnd("ctx");
  2548. },
  2549. //>>excludeStart("ide", pragmas.excludeIdeData);
  2550. args: [],
  2551. source: "assigned\x0a\x09^ assigned ifNil: [ false ]",
  2552. referencedClasses: [],
  2553. //>>excludeEnd("ide");
  2554. messageSends: ["ifNil:"]
  2555. }),
  2556. $globals.VariableNode);
  2557. $core.addMethod(
  2558. $core.method({
  2559. selector: "assigned:",
  2560. protocol: 'accessing',
  2561. fn: function (aBoolean){
  2562. var self=this;
  2563. self["@assigned"]=aBoolean;
  2564. return self;
  2565. },
  2566. //>>excludeStart("ide", pragmas.excludeIdeData);
  2567. args: ["aBoolean"],
  2568. source: "assigned: aBoolean\x0a\x09assigned := aBoolean",
  2569. referencedClasses: [],
  2570. //>>excludeEnd("ide");
  2571. messageSends: []
  2572. }),
  2573. $globals.VariableNode);
  2574. $core.addMethod(
  2575. $core.method({
  2576. selector: "beAssigned",
  2577. protocol: 'accessing',
  2578. fn: function (){
  2579. var self=this;
  2580. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2581. return $core.withContext(function($ctx1) {
  2582. //>>excludeEnd("ctx");
  2583. $recv(self._binding())._validateAssignment();
  2584. self["@assigned"]=true;
  2585. return self;
  2586. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2587. }, function($ctx1) {$ctx1.fill(self,"beAssigned",{},$globals.VariableNode)});
  2588. //>>excludeEnd("ctx");
  2589. },
  2590. //>>excludeStart("ide", pragmas.excludeIdeData);
  2591. args: [],
  2592. source: "beAssigned\x0a\x09self binding validateAssignment.\x0a\x09assigned := true",
  2593. referencedClasses: [],
  2594. //>>excludeEnd("ide");
  2595. messageSends: ["validateAssignment", "binding"]
  2596. }),
  2597. $globals.VariableNode);
  2598. $core.addMethod(
  2599. $core.method({
  2600. selector: "binding",
  2601. protocol: 'accessing',
  2602. fn: function (){
  2603. var self=this;
  2604. return self["@binding"];
  2605. },
  2606. //>>excludeStart("ide", pragmas.excludeIdeData);
  2607. args: [],
  2608. source: "binding\x0a\x09^ binding",
  2609. referencedClasses: [],
  2610. //>>excludeEnd("ide");
  2611. messageSends: []
  2612. }),
  2613. $globals.VariableNode);
  2614. $core.addMethod(
  2615. $core.method({
  2616. selector: "binding:",
  2617. protocol: 'accessing',
  2618. fn: function (aScopeVar){
  2619. var self=this;
  2620. self["@binding"]=aScopeVar;
  2621. return self;
  2622. },
  2623. //>>excludeStart("ide", pragmas.excludeIdeData);
  2624. args: ["aScopeVar"],
  2625. source: "binding: aScopeVar\x0a\x09binding := aScopeVar",
  2626. referencedClasses: [],
  2627. //>>excludeEnd("ide");
  2628. messageSends: []
  2629. }),
  2630. $globals.VariableNode);
  2631. $core.addMethod(
  2632. $core.method({
  2633. selector: "isArgument",
  2634. protocol: 'testing',
  2635. fn: function (){
  2636. var self=this;
  2637. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2638. return $core.withContext(function($ctx1) {
  2639. //>>excludeEnd("ctx");
  2640. return $recv(self._binding())._isArgVar();
  2641. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2642. }, function($ctx1) {$ctx1.fill(self,"isArgument",{},$globals.VariableNode)});
  2643. //>>excludeEnd("ctx");
  2644. },
  2645. //>>excludeStart("ide", pragmas.excludeIdeData);
  2646. args: [],
  2647. source: "isArgument\x0a\x09^ self binding isArgVar",
  2648. referencedClasses: [],
  2649. //>>excludeEnd("ide");
  2650. messageSends: ["isArgVar", "binding"]
  2651. }),
  2652. $globals.VariableNode);
  2653. $core.addMethod(
  2654. $core.method({
  2655. selector: "isImmutable",
  2656. protocol: 'testing',
  2657. fn: function (){
  2658. var self=this;
  2659. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2660. return $core.withContext(function($ctx1) {
  2661. //>>excludeEnd("ctx");
  2662. return $recv(self._binding())._isImmutable();
  2663. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2664. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},$globals.VariableNode)});
  2665. //>>excludeEnd("ctx");
  2666. },
  2667. //>>excludeStart("ide", pragmas.excludeIdeData);
  2668. args: [],
  2669. source: "isImmutable\x0a\x09^ self binding isImmutable",
  2670. referencedClasses: [],
  2671. //>>excludeEnd("ide");
  2672. messageSends: ["isImmutable", "binding"]
  2673. }),
  2674. $globals.VariableNode);
  2675. $core.addMethod(
  2676. $core.method({
  2677. selector: "isNavigationNode",
  2678. protocol: 'testing',
  2679. fn: function (){
  2680. var self=this;
  2681. return true;
  2682. },
  2683. //>>excludeStart("ide", pragmas.excludeIdeData);
  2684. args: [],
  2685. source: "isNavigationNode\x0a\x09^ true",
  2686. referencedClasses: [],
  2687. //>>excludeEnd("ide");
  2688. messageSends: []
  2689. }),
  2690. $globals.VariableNode);
  2691. $core.addMethod(
  2692. $core.method({
  2693. selector: "isSuperKeyword",
  2694. protocol: 'testing',
  2695. fn: function (){
  2696. var self=this;
  2697. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2698. return $core.withContext(function($ctx1) {
  2699. //>>excludeEnd("ctx");
  2700. return $recv(self._value()).__eq("super");
  2701. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2702. }, function($ctx1) {$ctx1.fill(self,"isSuperKeyword",{},$globals.VariableNode)});
  2703. //>>excludeEnd("ctx");
  2704. },
  2705. //>>excludeStart("ide", pragmas.excludeIdeData);
  2706. args: [],
  2707. source: "isSuperKeyword\x0a\x09^ self value = 'super'",
  2708. referencedClasses: [],
  2709. //>>excludeEnd("ide");
  2710. messageSends: ["=", "value"]
  2711. }),
  2712. $globals.VariableNode);
  2713. $core.addMethod(
  2714. $core.method({
  2715. selector: "isVariableNode",
  2716. protocol: 'testing',
  2717. fn: function (){
  2718. var self=this;
  2719. return true;
  2720. },
  2721. //>>excludeStart("ide", pragmas.excludeIdeData);
  2722. args: [],
  2723. source: "isVariableNode\x0a\x09^ true",
  2724. referencedClasses: [],
  2725. //>>excludeEnd("ide");
  2726. messageSends: []
  2727. }),
  2728. $globals.VariableNode);
  2729. $core.addMethod(
  2730. $core.method({
  2731. selector: "navigationLink",
  2732. protocol: 'accessing',
  2733. fn: function (){
  2734. var self=this;
  2735. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2736. return $core.withContext(function($ctx1) {
  2737. //>>excludeEnd("ctx");
  2738. return self._value();
  2739. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2740. }, function($ctx1) {$ctx1.fill(self,"navigationLink",{},$globals.VariableNode)});
  2741. //>>excludeEnd("ctx");
  2742. },
  2743. //>>excludeStart("ide", pragmas.excludeIdeData);
  2744. args: [],
  2745. source: "navigationLink\x0a\x09^ self value",
  2746. referencedClasses: [],
  2747. //>>excludeEnd("ide");
  2748. messageSends: ["value"]
  2749. }),
  2750. $globals.VariableNode);
  2751. $core.addClass('NodeVisitor', $globals.Object, [], 'Compiler-AST');
  2752. //>>excludeStart("ide", pragmas.excludeIdeData);
  2753. $globals.NodeVisitor.comment="I am the abstract super class of all AST node visitors.";
  2754. //>>excludeEnd("ide");
  2755. $core.addMethod(
  2756. $core.method({
  2757. selector: "visit:",
  2758. protocol: 'visiting',
  2759. fn: function (aNode){
  2760. var self=this;
  2761. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2762. return $core.withContext(function($ctx1) {
  2763. //>>excludeEnd("ctx");
  2764. return $recv(aNode)._accept_(self);
  2765. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2766. }, function($ctx1) {$ctx1.fill(self,"visit:",{aNode:aNode},$globals.NodeVisitor)});
  2767. //>>excludeEnd("ctx");
  2768. },
  2769. //>>excludeStart("ide", pragmas.excludeIdeData);
  2770. args: ["aNode"],
  2771. source: "visit: aNode\x0a\x09^ aNode accept: self",
  2772. referencedClasses: [],
  2773. //>>excludeEnd("ide");
  2774. messageSends: ["accept:"]
  2775. }),
  2776. $globals.NodeVisitor);
  2777. $core.addMethod(
  2778. $core.method({
  2779. selector: "visitAll:",
  2780. protocol: 'visiting',
  2781. fn: function (aCollection){
  2782. var self=this;
  2783. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2784. return $core.withContext(function($ctx1) {
  2785. //>>excludeEnd("ctx");
  2786. return $recv(aCollection)._collect_((function(each){
  2787. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2788. return $core.withContext(function($ctx2) {
  2789. //>>excludeEnd("ctx");
  2790. return self._visit_(each);
  2791. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2792. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  2793. //>>excludeEnd("ctx");
  2794. }));
  2795. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2796. }, function($ctx1) {$ctx1.fill(self,"visitAll:",{aCollection:aCollection},$globals.NodeVisitor)});
  2797. //>>excludeEnd("ctx");
  2798. },
  2799. //>>excludeStart("ide", pragmas.excludeIdeData);
  2800. args: ["aCollection"],
  2801. source: "visitAll: aCollection\x0a\x09^ aCollection collect: [ :each | self visit: each ]",
  2802. referencedClasses: [],
  2803. //>>excludeEnd("ide");
  2804. messageSends: ["collect:", "visit:"]
  2805. }),
  2806. $globals.NodeVisitor);
  2807. $core.addMethod(
  2808. $core.method({
  2809. selector: "visitAssignmentNode:",
  2810. protocol: 'visiting',
  2811. fn: function (aNode){
  2812. var self=this;
  2813. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2814. return $core.withContext(function($ctx1) {
  2815. //>>excludeEnd("ctx");
  2816. return self._visitNode_(aNode);
  2817. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2818. }, function($ctx1) {$ctx1.fill(self,"visitAssignmentNode:",{aNode:aNode},$globals.NodeVisitor)});
  2819. //>>excludeEnd("ctx");
  2820. },
  2821. //>>excludeStart("ide", pragmas.excludeIdeData);
  2822. args: ["aNode"],
  2823. source: "visitAssignmentNode: aNode\x0a\x09^ self visitNode: aNode",
  2824. referencedClasses: [],
  2825. //>>excludeEnd("ide");
  2826. messageSends: ["visitNode:"]
  2827. }),
  2828. $globals.NodeVisitor);
  2829. $core.addMethod(
  2830. $core.method({
  2831. selector: "visitBlockNode:",
  2832. protocol: 'visiting',
  2833. fn: function (aNode){
  2834. var self=this;
  2835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2836. return $core.withContext(function($ctx1) {
  2837. //>>excludeEnd("ctx");
  2838. return self._visitNode_(aNode);
  2839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2840. }, function($ctx1) {$ctx1.fill(self,"visitBlockNode:",{aNode:aNode},$globals.NodeVisitor)});
  2841. //>>excludeEnd("ctx");
  2842. },
  2843. //>>excludeStart("ide", pragmas.excludeIdeData);
  2844. args: ["aNode"],
  2845. source: "visitBlockNode: aNode\x0a\x09^ self visitNode: aNode",
  2846. referencedClasses: [],
  2847. //>>excludeEnd("ide");
  2848. messageSends: ["visitNode:"]
  2849. }),
  2850. $globals.NodeVisitor);
  2851. $core.addMethod(
  2852. $core.method({
  2853. selector: "visitBlockSequenceNode:",
  2854. protocol: 'visiting',
  2855. fn: function (aNode){
  2856. var self=this;
  2857. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2858. return $core.withContext(function($ctx1) {
  2859. //>>excludeEnd("ctx");
  2860. return self._visitSequenceNode_(aNode);
  2861. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2862. }, function($ctx1) {$ctx1.fill(self,"visitBlockSequenceNode:",{aNode:aNode},$globals.NodeVisitor)});
  2863. //>>excludeEnd("ctx");
  2864. },
  2865. //>>excludeStart("ide", pragmas.excludeIdeData);
  2866. args: ["aNode"],
  2867. source: "visitBlockSequenceNode: aNode\x0a\x09^ self visitSequenceNode: aNode",
  2868. referencedClasses: [],
  2869. //>>excludeEnd("ide");
  2870. messageSends: ["visitSequenceNode:"]
  2871. }),
  2872. $globals.NodeVisitor);
  2873. $core.addMethod(
  2874. $core.method({
  2875. selector: "visitCascadeNode:",
  2876. protocol: 'visiting',
  2877. fn: function (aNode){
  2878. var self=this;
  2879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2880. return $core.withContext(function($ctx1) {
  2881. //>>excludeEnd("ctx");
  2882. return self._visitNode_(aNode);
  2883. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2884. }, function($ctx1) {$ctx1.fill(self,"visitCascadeNode:",{aNode:aNode},$globals.NodeVisitor)});
  2885. //>>excludeEnd("ctx");
  2886. },
  2887. //>>excludeStart("ide", pragmas.excludeIdeData);
  2888. args: ["aNode"],
  2889. source: "visitCascadeNode: aNode\x0a\x09^ self visitNode: aNode",
  2890. referencedClasses: [],
  2891. //>>excludeEnd("ide");
  2892. messageSends: ["visitNode:"]
  2893. }),
  2894. $globals.NodeVisitor);
  2895. $core.addMethod(
  2896. $core.method({
  2897. selector: "visitDynamicArrayNode:",
  2898. protocol: 'visiting',
  2899. fn: function (aNode){
  2900. var self=this;
  2901. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2902. return $core.withContext(function($ctx1) {
  2903. //>>excludeEnd("ctx");
  2904. return self._visitNode_(aNode);
  2905. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2906. }, function($ctx1) {$ctx1.fill(self,"visitDynamicArrayNode:",{aNode:aNode},$globals.NodeVisitor)});
  2907. //>>excludeEnd("ctx");
  2908. },
  2909. //>>excludeStart("ide", pragmas.excludeIdeData);
  2910. args: ["aNode"],
  2911. source: "visitDynamicArrayNode: aNode\x0a\x09^ self visitNode: aNode",
  2912. referencedClasses: [],
  2913. //>>excludeEnd("ide");
  2914. messageSends: ["visitNode:"]
  2915. }),
  2916. $globals.NodeVisitor);
  2917. $core.addMethod(
  2918. $core.method({
  2919. selector: "visitDynamicDictionaryNode:",
  2920. protocol: 'visiting',
  2921. fn: function (aNode){
  2922. var self=this;
  2923. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2924. return $core.withContext(function($ctx1) {
  2925. //>>excludeEnd("ctx");
  2926. return self._visitNode_(aNode);
  2927. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2928. }, function($ctx1) {$ctx1.fill(self,"visitDynamicDictionaryNode:",{aNode:aNode},$globals.NodeVisitor)});
  2929. //>>excludeEnd("ctx");
  2930. },
  2931. //>>excludeStart("ide", pragmas.excludeIdeData);
  2932. args: ["aNode"],
  2933. source: "visitDynamicDictionaryNode: aNode\x0a\x09^ self visitNode: aNode",
  2934. referencedClasses: [],
  2935. //>>excludeEnd("ide");
  2936. messageSends: ["visitNode:"]
  2937. }),
  2938. $globals.NodeVisitor);
  2939. $core.addMethod(
  2940. $core.method({
  2941. selector: "visitJSStatementNode:",
  2942. protocol: 'visiting',
  2943. fn: function (aNode){
  2944. var self=this;
  2945. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2946. return $core.withContext(function($ctx1) {
  2947. //>>excludeEnd("ctx");
  2948. return self._visitNode_(aNode);
  2949. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2950. }, function($ctx1) {$ctx1.fill(self,"visitJSStatementNode:",{aNode:aNode},$globals.NodeVisitor)});
  2951. //>>excludeEnd("ctx");
  2952. },
  2953. //>>excludeStart("ide", pragmas.excludeIdeData);
  2954. args: ["aNode"],
  2955. source: "visitJSStatementNode: aNode\x0a\x09^ self visitNode: aNode",
  2956. referencedClasses: [],
  2957. //>>excludeEnd("ide");
  2958. messageSends: ["visitNode:"]
  2959. }),
  2960. $globals.NodeVisitor);
  2961. $core.addMethod(
  2962. $core.method({
  2963. selector: "visitMethodNode:",
  2964. protocol: 'visiting',
  2965. fn: function (aNode){
  2966. var self=this;
  2967. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2968. return $core.withContext(function($ctx1) {
  2969. //>>excludeEnd("ctx");
  2970. return self._visitNode_(aNode);
  2971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2972. }, function($ctx1) {$ctx1.fill(self,"visitMethodNode:",{aNode:aNode},$globals.NodeVisitor)});
  2973. //>>excludeEnd("ctx");
  2974. },
  2975. //>>excludeStart("ide", pragmas.excludeIdeData);
  2976. args: ["aNode"],
  2977. source: "visitMethodNode: aNode\x0a\x09^ self visitNode: aNode",
  2978. referencedClasses: [],
  2979. //>>excludeEnd("ide");
  2980. messageSends: ["visitNode:"]
  2981. }),
  2982. $globals.NodeVisitor);
  2983. $core.addMethod(
  2984. $core.method({
  2985. selector: "visitNode:",
  2986. protocol: 'visiting',
  2987. fn: function (aNode){
  2988. var self=this;
  2989. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2990. return $core.withContext(function($ctx1) {
  2991. //>>excludeEnd("ctx");
  2992. self._visitAll_($recv(aNode)._nodes());
  2993. return aNode;
  2994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2995. }, function($ctx1) {$ctx1.fill(self,"visitNode:",{aNode:aNode},$globals.NodeVisitor)});
  2996. //>>excludeEnd("ctx");
  2997. },
  2998. //>>excludeStart("ide", pragmas.excludeIdeData);
  2999. args: ["aNode"],
  3000. source: "visitNode: aNode\x0a\x09self visitAll: aNode nodes.\x0a\x09^ aNode",
  3001. referencedClasses: [],
  3002. //>>excludeEnd("ide");
  3003. messageSends: ["visitAll:", "nodes"]
  3004. }),
  3005. $globals.NodeVisitor);
  3006. $core.addMethod(
  3007. $core.method({
  3008. selector: "visitReturnNode:",
  3009. protocol: 'visiting',
  3010. fn: function (aNode){
  3011. var self=this;
  3012. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3013. return $core.withContext(function($ctx1) {
  3014. //>>excludeEnd("ctx");
  3015. return self._visitNode_(aNode);
  3016. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3017. }, function($ctx1) {$ctx1.fill(self,"visitReturnNode:",{aNode:aNode},$globals.NodeVisitor)});
  3018. //>>excludeEnd("ctx");
  3019. },
  3020. //>>excludeStart("ide", pragmas.excludeIdeData);
  3021. args: ["aNode"],
  3022. source: "visitReturnNode: aNode\x0a\x09^ self visitNode: aNode",
  3023. referencedClasses: [],
  3024. //>>excludeEnd("ide");
  3025. messageSends: ["visitNode:"]
  3026. }),
  3027. $globals.NodeVisitor);
  3028. $core.addMethod(
  3029. $core.method({
  3030. selector: "visitSendNode:",
  3031. protocol: 'visiting',
  3032. fn: function (aNode){
  3033. var self=this;
  3034. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3035. return $core.withContext(function($ctx1) {
  3036. //>>excludeEnd("ctx");
  3037. return self._visitNode_(aNode);
  3038. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3039. }, function($ctx1) {$ctx1.fill(self,"visitSendNode:",{aNode:aNode},$globals.NodeVisitor)});
  3040. //>>excludeEnd("ctx");
  3041. },
  3042. //>>excludeStart("ide", pragmas.excludeIdeData);
  3043. args: ["aNode"],
  3044. source: "visitSendNode: aNode\x0a\x09^ self visitNode: aNode",
  3045. referencedClasses: [],
  3046. //>>excludeEnd("ide");
  3047. messageSends: ["visitNode:"]
  3048. }),
  3049. $globals.NodeVisitor);
  3050. $core.addMethod(
  3051. $core.method({
  3052. selector: "visitSequenceNode:",
  3053. protocol: 'visiting',
  3054. fn: function (aNode){
  3055. var self=this;
  3056. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3057. return $core.withContext(function($ctx1) {
  3058. //>>excludeEnd("ctx");
  3059. return self._visitNode_(aNode);
  3060. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3061. }, function($ctx1) {$ctx1.fill(self,"visitSequenceNode:",{aNode:aNode},$globals.NodeVisitor)});
  3062. //>>excludeEnd("ctx");
  3063. },
  3064. //>>excludeStart("ide", pragmas.excludeIdeData);
  3065. args: ["aNode"],
  3066. source: "visitSequenceNode: aNode\x0a\x09^ self visitNode: aNode",
  3067. referencedClasses: [],
  3068. //>>excludeEnd("ide");
  3069. messageSends: ["visitNode:"]
  3070. }),
  3071. $globals.NodeVisitor);
  3072. $core.addMethod(
  3073. $core.method({
  3074. selector: "visitValueNode:",
  3075. protocol: 'visiting',
  3076. fn: function (aNode){
  3077. var self=this;
  3078. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3079. return $core.withContext(function($ctx1) {
  3080. //>>excludeEnd("ctx");
  3081. return self._visitNode_(aNode);
  3082. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3083. }, function($ctx1) {$ctx1.fill(self,"visitValueNode:",{aNode:aNode},$globals.NodeVisitor)});
  3084. //>>excludeEnd("ctx");
  3085. },
  3086. //>>excludeStart("ide", pragmas.excludeIdeData);
  3087. args: ["aNode"],
  3088. source: "visitValueNode: aNode\x0a\x09^ self visitNode: aNode",
  3089. referencedClasses: [],
  3090. //>>excludeEnd("ide");
  3091. messageSends: ["visitNode:"]
  3092. }),
  3093. $globals.NodeVisitor);
  3094. $core.addMethod(
  3095. $core.method({
  3096. selector: "visitVariableNode:",
  3097. protocol: 'visiting',
  3098. fn: function (aNode){
  3099. var self=this;
  3100. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3101. return $core.withContext(function($ctx1) {
  3102. //>>excludeEnd("ctx");
  3103. return self._visitNode_(aNode);
  3104. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3105. }, function($ctx1) {$ctx1.fill(self,"visitVariableNode:",{aNode:aNode},$globals.NodeVisitor)});
  3106. //>>excludeEnd("ctx");
  3107. },
  3108. //>>excludeStart("ide", pragmas.excludeIdeData);
  3109. args: ["aNode"],
  3110. source: "visitVariableNode: aNode\x0a\x09^ self visitNode: aNode",
  3111. referencedClasses: [],
  3112. //>>excludeEnd("ide");
  3113. messageSends: ["visitNode:"]
  3114. }),
  3115. $globals.NodeVisitor);
  3116. $core.addMethod(
  3117. $core.method({
  3118. selector: "ast",
  3119. protocol: '*Compiler-AST',
  3120. fn: function (){
  3121. var self=this;
  3122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3123. return $core.withContext(function($ctx1) {
  3124. //>>excludeEnd("ctx");
  3125. var $1;
  3126. $1=self._source();
  3127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3128. $ctx1.sendIdx["source"]=1;
  3129. //>>excludeEnd("ctx");
  3130. $recv($1)._ifEmpty_((function(){
  3131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3132. return $core.withContext(function($ctx2) {
  3133. //>>excludeEnd("ctx");
  3134. return self._error_("Method source is empty");
  3135. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3136. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3137. //>>excludeEnd("ctx");
  3138. }));
  3139. return $recv($globals.Smalltalk)._parse_(self._source());
  3140. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3141. }, function($ctx1) {$ctx1.fill(self,"ast",{},$globals.CompiledMethod)});
  3142. //>>excludeEnd("ctx");
  3143. },
  3144. //>>excludeStart("ide", pragmas.excludeIdeData);
  3145. args: [],
  3146. source: "ast\x0a\x09self source ifEmpty: [ self error: 'Method source is empty' ].\x0a\x09\x0a\x09^ Smalltalk parse: self source",
  3147. referencedClasses: ["Smalltalk"],
  3148. //>>excludeEnd("ide");
  3149. messageSends: ["ifEmpty:", "source", "error:", "parse:"]
  3150. }),
  3151. $globals.CompiledMethod);
  3152. $core.addMethod(
  3153. $core.method({
  3154. selector: "isNode",
  3155. protocol: '*Compiler-AST',
  3156. fn: function (){
  3157. var self=this;
  3158. return false;
  3159. },
  3160. //>>excludeStart("ide", pragmas.excludeIdeData);
  3161. args: [],
  3162. source: "isNode\x0a\x09^ false",
  3163. referencedClasses: [],
  3164. //>>excludeEnd("ide");
  3165. messageSends: []
  3166. }),
  3167. $globals.Object);
  3168. });