Quellcode durchsuchen

Fixed Trapped class >> parse:

Herbert Vojčík vor 11 Jahren
Ursprung
Commit
3708d2f72c
3 geänderte Dateien mit 8 neuen und 6 gelöschten Zeilen
  1. 3 2
      lib/js/Trapped-Frontend.deploy.js
  2. 4 3
      lib/js/Trapped-Frontend.js
  3. 1 1
      lib/st/Trapped-Frontend.st

+ 3 - 2
lib/js/Trapped-Frontend.deploy.js

@@ -401,7 +401,8 @@ var self=this;
 return smalltalk.withContext(function($ctx1) { 
var $2,$3,$1;
 $1=_st(anArray)._collect_((function(each){
 var asNum;
-return smalltalk.withContext(function($ctx2) {
_st(asNum).__eq(_st(each)._asNumber());
+return smalltalk.withContext(function($ctx2) {
asNum=_st(each)._asNumber();
+asNum;
 $2=_st(asNum).__eq(asNum);
 if(smalltalk.assert($2)){
 return asNum;
@@ -416,7 +417,7 @@ return each;
 }, function($ctx2) {$ctx2.fillBlock({each:each,asNum:asNum},$ctx1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"parse:",{anArray:anArray},smalltalk.Trapped.klass)})},
-messageSends: ["collect:", "=", "asNumber", "ifTrue:ifFalse:", "asSymbol", "allButFirst", "first"]}),
+messageSends: ["collect:", "asNumber", "ifTrue:ifFalse:", "asSymbol", "allButFirst", "=", "first"]}),
 smalltalk.Trapped.klass);
 
 

+ 4 - 3
lib/js/Trapped-Frontend.js

@@ -508,7 +508,8 @@ var self=this;
 return smalltalk.withContext(function($ctx1) { 
var $2,$3,$1;
 $1=_st(anArray)._collect_((function(each){
 var asNum;
-return smalltalk.withContext(function($ctx2) {
_st(asNum).__eq(_st(each)._asNumber());
+return smalltalk.withContext(function($ctx2) {
asNum=_st(each)._asNumber();
+asNum;
 $2=_st(asNum).__eq(asNum);
 if(smalltalk.assert($2)){
 return asNum;
@@ -524,8 +525,8 @@ return each;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"parse:",{anArray:anArray},smalltalk.Trapped.klass)})},
 args: ["anArray"],
-source: "parse: anArray\x0a\x09^anArray collect: [ :each |\x0a    \x09| asNum |\x0a       \x09asNum = each asNumber.\x0a        asNum = asNum ifTrue: [ asNum ] ifFalse: [\x0a\x09\x09\x09each first = '#' ifTrue: [ each allButFirst asSymbol ] ifFalse: [ each ]]]",
-messageSends: ["collect:", "=", "asNumber", "ifTrue:ifFalse:", "asSymbol", "allButFirst", "first"],
+source: "parse: anArray\x0a\x09^anArray collect: [ :each |\x0a    \x09| asNum |\x0a       \x09asNum := each asNumber.\x0a        asNum = asNum ifTrue: [ asNum ] ifFalse: [\x0a\x09\x09\x09each first = '#' ifTrue: [ each allButFirst asSymbol ] ifFalse: [ each ]]]",
+messageSends: ["collect:", "asNumber", "ifTrue:ifFalse:", "asSymbol", "allButFirst", "=", "first"],
 referencedClasses: []
 }),
 smalltalk.Trapped.klass);

+ 1 - 1
lib/st/Trapped-Frontend.st

@@ -174,7 +174,7 @@ initialize
 parse: anArray
 	^anArray collect: [ :each |
     	| asNum |
-       	asNum = each asNumber.
+       	asNum := each asNumber.
         asNum = asNum ifTrue: [ asNum ] ifFalse: [
 			each first = '#' ifTrue: [ each allButFirst asSymbol ] ifFalse: [ each ]]]
 ! !