Lively Kernel canvas
null
0.1
60
160.17863106730476
-2.474348879500666
null
null
null
null
src=newFileDirectory(URL.source.getDirectory()).fileContent('rk_st2jsFileout.cs');//--1--adaptclassdefinitionssrc=src.replace(/\n\tcategory.*/g,'!');//--2a--findclassinstvardefinitionsandaddtheseintotheclassdefslines=src.split('\n');clsWithClassInstVars=lines.inject([],function(found,line,i){varclassDef=line.match(/^([a-zA-Z0-9]*)class$/);if(!classDef)returnfound;varclsName=classDef[1];varclsInstVars=lines[i+1].match(/'.*'/)[0];//lookinnextlinefound.push({klass:clsName,clsInstVars:clsInstVars});returnfound});clsWithClassInstVars.each(function(ea){ea.regExp=newRegExp('.*subclass:#'+ea.klass)}).each(function(ea){src=src.replace(ea.regExp,'$0'+'\n\tclassInstanceVariableNames:'+ea.clsInstVars)});//--2b--removeclassclassdefsfindInstVarDefs=/(.*)class\n\tinstanceVariableNames\:(.*)!/g;src=src.replace(/.*class\n\tinstanceVariableNames\:.*!/g,'');//--3--replacemethoddefinitionheaderwithjusttheclassnamesrc=src.replace(/!(.*)methodsFor\:.*!/g,'!$1!');//--4a--getallmethoddefinitionheadersmethodDefs=src.match(/![a-zA-Z0-9]+(class)?!/g).uniq();//--4b--removeallbutthefirstmethoddefinitionheader(assumption:methodsofoneclassarelistednexttoeachother)methodDefs.each(function(ea){varlen=ea.length;while(src.indexOf(ea)!==src.lastIndexOf(ea)){varlastIdx=src.lastIndexOf(ea);src=src.substring(0,lastIdx)+src.substring(lastIdx+len+1,src.length);}});//--5--methoddefinitionheader,makeallmethodspublicsrc=src.replace(/(![a-zA-Z0-9]+(?:class)?)(!)/g,'$1publicMethods$2');//--6--removeall'!!',leaveitjustinthoseplaceswhereanewchunkbegins('!!'followedby'!')src=src.replace(/!!(\n+[a-zA-Z0-9])/g,'!$1');//newFileDirectory(URL.source.getDirectory()).writeFileNamed('rk_st2jsFileoutResult.cs',src);
6
253
false
null
1844
null
null
null
null
ThisscriptissupposedtobeabletoconvertthechunkformatofSqueakfileoutsintoacompatibleversionforVisualAge
134
true
null
122
null
null
1226662014284
275460
1
21
null
1226662014
null