% % stack: js-code % count ^"codein " &" " log)( % % make sure execute action is based on app object % and has a space before it % "app.executeAction" found? not { "executeAction" "app.executeAction" replall } if "app.executeAction" " app.executeAction" replall % % isolate all descriptor, reference, and list objects % empty !objlist "ActionDescriptor()" *jspmanlj "ActionReference()" *jspmanlj "ActionList()" *jspmanlj !code empty !presect empty !duplicates "jspmanlm" look_ "anla " log)( countup { "metha " log)( pop "methb " log)( !putmeth { % % stack: [ put-method . . . ] % empty !builder _code _putmeth ^"." &"(" slice % % add the left of the method call to builder % exch % % the first three characters determine the object type the put method % is attached to % dup " " Str.RevRight dup !obj 3 left !objtype ^_builder !builder % % stack: [ put-method . . . ] right-of-func-name % isnull ? selected !\ _obj _\ make !\ _putmeth "put" empty replall newchild _\ !putnode +ident "Identifier" \! % % this put method detected, process the parameters % *jspmanlc % % stack: [ put-method . . . ] right-of % % describe the object type as comment at end of code line % "); //" _obj 3 left & ^ ^_builder !code selected !\ } loop pop % % put back the original put method name % _code "|*|" _putmeth replall !code } for selected !\ _objlist "Objects" \! _presect "Defines" \! _code "{" slice exch &"{" &; &_presect ^ dup "_test.txt" ofbin write % % stack: mod-code % count ^"codeout " &" " log)(