mdbe 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/LICENSE.txt +21 -0
- data/README.md +53 -0
- data/app.rb +182 -0
- data/bin/mdbe +5 -0
- data/config.ru +2 -0
- data/environment.rb +8 -0
- data/lib/mdbe.rb +39 -0
- data/lib/mdbe/action_controller_debug_patch.rb +12 -0
- data/lib/mdbe/code_evaluation.rb +46 -0
- data/lib/mdbe/database_views.rb +24 -0
- data/lib/mdbe/database_views/abstract_dictionary.rb +69 -0
- data/lib/mdbe/database_views/abstract_exception.rb +25 -0
- data/lib/mdbe/database_views/array.rb +28 -0
- data/lib/mdbe/database_views/boolean.rb +12 -0
- data/lib/mdbe/database_views/class.rb +46 -0
- data/lib/mdbe/database_views/exception.rb +3 -0
- data/lib/mdbe/database_views/execblock.rb +5 -0
- data/lib/mdbe/database_views/fixnum.rb +5 -0
- data/lib/mdbe/database_views/float.rb +5 -0
- data/lib/mdbe/database_views/globals.rb +2 -0
- data/lib/mdbe/database_views/gsnmethod.rb +29 -0
- data/lib/mdbe/database_views/hash.rb +5 -0
- data/lib/mdbe/database_views/maglev_record.rb +42 -0
- data/lib/mdbe/database_views/module.rb +103 -0
- data/lib/mdbe/database_views/nilclass.rb +5 -0
- data/lib/mdbe/database_views/object.rb +80 -0
- data/lib/mdbe/database_views/proc.rb +3 -0
- data/lib/mdbe/database_views/repository.rb +3 -0
- data/lib/mdbe/database_views/ruby_workspace.rb +5 -0
- data/lib/mdbe/database_views/smalltalk_classes.rb +34 -0
- data/lib/mdbe/database_views/smalltalk_classes.st +60 -0
- data/lib/mdbe/database_views/string.rb +31 -0
- data/lib/mdbe/database_views/symbol.rb +32 -0
- data/lib/mdbe/database_views/system.rb +61 -0
- data/lib/mdbe/database_views/thread.rb +101 -0
- data/lib/mdbe/debug_server.rb +22 -0
- data/lib/mdbe/halt.rb +42 -0
- data/lib/mdbe/ruby_workspace.rb +29 -0
- data/lib/mdbe/version.rb +3 -0
- data/lib/tasks/maglev-database-explorer_tasks.rake +4 -0
- data/public/LICENSE +35 -0
- data/public/amber/CHANGELOG +65 -0
- data/public/amber/LICENSE +22 -0
- data/public/amber/Makefile +53 -0
- data/public/amber/README.md +30 -0
- data/public/amber/bin/amber +3 -0
- data/public/amber/bin/amberc +352 -0
- data/public/amber/bin/nodecompile.js +33 -0
- data/public/amber/bin/server +3 -0
- data/public/amber/bin/server.bat +3 -0
- data/public/amber/css/amber-normalize.css +468 -0
- data/public/amber/css/amber-normalize.less +501 -0
- data/public/amber/css/amber.css +539 -0
- data/public/amber/css/documentation.css +84 -0
- data/public/amber/css/profstef.css +75 -0
- data/public/amber/css/style.css +313 -0
- data/public/amber/documentation.html +37 -0
- data/public/amber/examples/Makefile +23 -0
- data/public/amber/examples/README +4 -0
- data/public/amber/examples/android/helloamber/AndroidManifest.xml +19 -0
- data/public/amber/examples/android/helloamber/HelloAmber.st +13 -0
- data/public/amber/examples/android/helloamber/Makefile +56 -0
- data/public/amber/examples/android/helloamber/README.md +80 -0
- data/public/amber/examples/android/helloamber/ant.properties +17 -0
- data/public/amber/examples/android/helloamber/assets/index.html +15 -0
- data/public/amber/examples/android/helloamber/assets/jquery-1.7.2.min.js +4 -0
- data/public/amber/examples/android/helloamber/build.xml +83 -0
- data/public/amber/examples/android/helloamber/local.properties +10 -0
- data/public/amber/examples/android/helloamber/proguard-project.txt +20 -0
- data/public/amber/examples/android/helloamber/project.properties +14 -0
- data/public/amber/examples/android/helloamber/res/layout/main.xml +6 -0
- data/public/amber/examples/android/helloamber/res/values/strings.xml +4 -0
- data/public/amber/examples/android/helloamber/src/org/amberlang/android/helloamber/HelloAmber.java +59 -0
- data/public/amber/examples/myproject/index.html +16 -0
- data/public/amber/examples/nodejs/README +9 -0
- data/public/amber/examples/nodejs/benchfib/Benchfib.st +124 -0
- data/public/amber/examples/nodejs/benchfib/Makefile +8 -0
- data/public/amber/examples/nodejs/benchfib/benchfib +1 -0
- data/public/amber/examples/nodejs/hello/Hello.st +9 -0
- data/public/amber/examples/nodejs/hello/Makefile +8 -0
- data/public/amber/examples/nodejs/hello/README +13 -0
- data/public/amber/examples/nodejs/hello/hello +1 -0
- data/public/amber/examples/nodejs/meta/Makefile +8 -0
- data/public/amber/examples/nodejs/meta/MyScript.st +27 -0
- data/public/amber/examples/nodejs/meta/meta +1 -0
- data/public/amber/examples/nodejs/pystone/Makefile +8 -0
- data/public/amber/examples/nodejs/pystone/Pystone.st +306 -0
- data/public/amber/examples/nodejs/pystone/pystone +1 -0
- data/public/amber/examples/nodejs/trivialserver/Makefile +8 -0
- data/public/amber/examples/nodejs/trivialserver/TrivialServer.st +51 -0
- data/public/amber/examples/nodejs/trivialserver/trivial +1 -0
- data/public/amber/examples/presentation/esug2011/images/asterix.png +0 -0
- data/public/amber/examples/presentation/esug2011/images/background_box.png +0 -0
- data/public/amber/examples/presentation/esug2011/images/background_header.png +0 -0
- data/public/amber/examples/presentation/esug2011/images/balloon.jpg +0 -0
- data/public/amber/examples/presentation/esug2011/images/balloon_header.png +0 -0
- data/public/amber/examples/presentation/esug2011/images/devices.jpg +0 -0
- data/public/amber/examples/presentation/esug2011/images/enyo.png +0 -0
- data/public/amber/examples/presentation/esug2011/images/ide_star_wars.png +0 -0
- data/public/amber/examples/presentation/esug2011/images/nodejs.png +0 -0
- data/public/amber/examples/presentation/esug2011/images/terminal.png +0 -0
- data/public/amber/examples/presentation/esug2011/images/webos.png +0 -0
- data/public/amber/examples/presentation/fosdem2012/images/amber.png +0 -0
- data/public/amber/examples/presentation/fosdem2012/images/ambrhino.jpg +0 -0
- data/public/amber/examples/presentation/fosdem2012/images/nodejs.png +0 -0
- data/public/amber/examples/presentation/fosdem2012/images/pharo.png +0 -0
- data/public/amber/examples/presentation/fosdem2012/images/php.gif +0 -0
- data/public/amber/examples/presentation/fosdem2012/images/rails.png +0 -0
- data/public/amber/examples/presentation/fosdem2012/lib/booklet/images/arrow-next.png +0 -0
- data/public/amber/examples/presentation/fosdem2012/lib/booklet/images/arrow-prev.png +0 -0
- data/public/amber/examples/presentation/fosdem2012/lib/booklet/images/closedhand.cur +0 -0
- data/public/amber/examples/presentation/fosdem2012/lib/booklet/images/openhand.cur +0 -0
- data/public/amber/examples/presentation/fosdem2012/lib/booklet/images/shadow-top-back.png +0 -0
- data/public/amber/examples/presentation/fosdem2012/lib/booklet/images/shadow-top-forward.png +0 -0
- data/public/amber/examples/presentation/fosdem2012/lib/booklet/images/shadow.png +0 -0
- data/public/amber/examples/presentation/fosdem2012/lib/booklet/jquery.booklet.1.2.0.css +100 -0
- data/public/amber/examples/presentation/fosdem2012/lib/booklet/jquery.booklet.1.2.0.js +1232 -0
- data/public/amber/examples/presentation/fosdem2012/lib/booklet/jquery.booklet.1.2.0.min.js +13 -0
- data/public/amber/examples/presentation/fosdem2012/lib/booklet/jquery.easing.1.3.js +38 -0
- data/public/amber/examples/presentation/index.html +17 -0
- data/public/amber/examples/presentation/js/Presentation.deploy.js +1922 -0
- data/public/amber/examples/presentation/js/Presentation.js +2712 -0
- data/public/amber/examples/presentation/st/Presentation.st +1996 -0
- data/public/amber/examples/trysmalltalk/index.html +18 -0
- data/public/amber/examples/trysmalltalk/js/TrySmalltalk.deploy.js +837 -0
- data/public/amber/examples/trysmalltalk/js/TrySmalltalk.js +1206 -0
- data/public/amber/examples/trysmalltalk/st/TrySmalltalk.st +964 -0
- data/public/amber/examples/twitterwall/css/twitterwall.css +19 -0
- data/public/amber/examples/twitterwall/index.html +35 -0
- data/public/amber/examples/twitterwall/js/TwitterWall.deploy.js +116 -0
- data/public/amber/examples/twitterwall/js/TwitterWall.js +146 -0
- data/public/amber/examples/twitterwall/st/TwitterWall.st +91 -0
- data/public/amber/examples/webos/README +11 -0
- data/public/amber/examples/webos/eris/DuckQwaq.wav +0 -0
- data/public/amber/examples/webos/eris/EnyoAmber.st +36 -0
- data/public/amber/examples/webos/eris/Eris.css +0 -0
- data/public/amber/examples/webos/eris/Eris.st +86 -0
- data/public/amber/examples/webos/eris/Makefile +37 -0
- data/public/amber/examples/webos/eris/README +3 -0
- data/public/amber/examples/webos/eris/appinfo.json +10 -0
- data/public/amber/examples/webos/eris/index.html +12 -0
- data/public/amber/examples/webos/helloamber/EnyoAmber.st +36 -0
- data/public/amber/examples/webos/helloamber/HelloAmber.st +86 -0
- data/public/amber/examples/webos/helloamber/Makefile +38 -0
- data/public/amber/examples/webos/helloamber/README +5 -0
- data/public/amber/examples/webos/helloamber/appinfo.json +10 -0
- data/public/amber/examples/webos/helloamber/index.html +12 -0
- data/public/amber/favicon.ico +0 -0
- data/public/amber/images/amber.png +0 -0
- data/public/amber/images/amber.svg +706 -0
- data/public/amber/images/amber_small.png +0 -0
- data/public/amber/images/off.amber.png +0 -0
- data/public/amber/images/off.png +0 -0
- data/public/amber/images/offHover.amber.png +0 -0
- data/public/amber/images/offHover.png +0 -0
- data/public/amber/images/presentation.png +0 -0
- data/public/amber/images/profstef.png +0 -0
- data/public/amber/images/sprite.amber.png +0 -0
- data/public/amber/images/sprite.png +0 -0
- data/public/amber/images/tinylogo.amber.png +0 -0
- data/public/amber/images/tinylogo.png +0 -0
- data/public/amber/images/twitterwall.png +0 -0
- data/public/amber/index.html +55 -0
- data/public/amber/js/Additional-Examples.deploy.js +15 -0
- data/public/amber/js/Additional-Examples.js +21 -0
- data/public/amber/js/Benchfib.deploy.js +132 -0
- data/public/amber/js/Benchfib.js +167 -0
- data/public/amber/js/Canvas.deploy.js +2446 -0
- data/public/amber/js/Canvas.js +3547 -0
- data/public/amber/js/Compiler-Tests.deploy.js +97 -0
- data/public/amber/js/Compiler-Tests.js +137 -0
- data/public/amber/js/Compiler.deploy.js +1877 -0
- data/public/amber/js/Compiler.js +2622 -0
- data/public/amber/js/Documentation.deploy.js +961 -0
- data/public/amber/js/Documentation.js +1376 -0
- data/public/amber/js/Examples.deploy.js +53 -0
- data/public/amber/js/Examples.js +73 -0
- data/public/amber/js/IDE.deploy.js +3557 -0
- data/public/amber/js/IDE.js +5002 -0
- data/public/amber/js/Kernel-Announcements.deploy.js +107 -0
- data/public/amber/js/Kernel-Announcements.js +152 -0
- data/public/amber/js/Kernel-Classes.deploy.js +774 -0
- data/public/amber/js/Kernel-Classes.js +1095 -0
- data/public/amber/js/Kernel-Collections.deploy.js +3121 -0
- data/public/amber/js/Kernel-Collections.js +4427 -0
- data/public/amber/js/Kernel-Exceptions.deploy.js +244 -0
- data/public/amber/js/Kernel-Exceptions.js +349 -0
- data/public/amber/js/Kernel-Methods.deploy.js +573 -0
- data/public/amber/js/Kernel-Methods.js +807 -0
- data/public/amber/js/Kernel-Objects.deploy.js +2877 -0
- data/public/amber/js/Kernel-Objects.js +4107 -0
- data/public/amber/js/Kernel-Tests.deploy.js +1513 -0
- data/public/amber/js/Kernel-Tests.js +2053 -0
- data/public/amber/js/Kernel-Transcript.deploy.js +142 -0
- data/public/amber/js/Kernel-Transcript.js +202 -0
- data/public/amber/js/Maglev-Core.deploy.js +2996 -0
- data/public/amber/js/Maglev-Core.js +4246 -0
- data/public/amber/js/Maglev-Database-Explorer.deploy.js +4476 -0
- data/public/amber/js/Maglev-Database-Explorer.js +6232 -0
- data/public/amber/js/Maglev-Vendor.deploy.js +350 -0
- data/public/amber/js/Maglev-Vendor.js +465 -0
- data/public/amber/js/README.md +5 -0
- data/public/amber/js/SUnit.deploy.js +351 -0
- data/public/amber/js/SUnit.js +501 -0
- data/public/amber/js/amber.js +273 -0
- data/public/amber/js/boot.js +602 -0
- data/public/amber/js/compat.js +22 -0
- data/public/amber/js/init.js +9 -0
- data/public/amber/js/lib/CodeMirror/LICENSE +19 -0
- data/public/amber/js/lib/CodeMirror/active-line.js +39 -0
- data/public/amber/js/lib/CodeMirror/amber.css +21 -0
- data/public/amber/js/lib/CodeMirror/codemirror.css +67 -0
- data/public/amber/js/lib/CodeMirror/codemirror.js +2144 -0
- data/public/amber/js/lib/CodeMirror/smalltalk.js +134 -0
- data/public/amber/js/lib/jQuery/jquery-1.4.4.min.js +167 -0
- data/public/amber/js/lib/jQuery/jquery-1.6.4.min.js +4 -0
- data/public/amber/js/lib/jQuery/jquery-ui-1.8.16.custom.min.js +791 -0
- data/public/amber/js/lib/jQuery/jquery.textarea.js +267 -0
- data/public/amber/js/lib/peg-0.6.2.min.js +2 -0
- data/public/amber/js/lib/showdown.js +419 -0
- data/public/amber/js/parser.js +4222 -0
- data/public/amber/js/parser.pegjs +223 -0
- data/public/amber/learn.html +40 -0
- data/public/amber/repl/Makefile +8 -0
- data/public/amber/repl/REPL.js +124 -0
- data/public/amber/repl/REPL.st +56 -0
- data/public/amber/repl/amber.js +18085 -0
- data/public/amber/server/FileServer.st +576 -0
- data/public/amber/server/Makefile +8 -0
- data/public/amber/server/server.js +13049 -0
- data/public/amber/st/Benchfib.js +297 -0
- data/public/amber/st/Benchfib.st +124 -0
- data/public/amber/st/Canvas.st +968 -0
- data/public/amber/st/Compiler-Tests.st +471 -0
- data/public/amber/st/Compiler.st +1445 -0
- data/public/amber/st/Documentation.st +758 -0
- data/public/amber/st/Examples.js +100 -0
- data/public/amber/st/Examples.st +38 -0
- data/public/amber/st/IDE.st +2404 -0
- data/public/amber/st/Kernel-Announcements.st +61 -0
- data/public/amber/st/Kernel-Classes.st +462 -0
- data/public/amber/st/Kernel-Collections.st +1611 -0
- data/public/amber/st/Kernel-Exceptions.st +124 -0
- data/public/amber/st/Kernel-Methods.st +291 -0
- data/public/amber/st/Kernel-Objects.st +1587 -0
- data/public/amber/st/Kernel-Tests.st +953 -0
- data/public/amber/st/Kernel-Transcript.st +70 -0
- data/public/amber/st/Maglev-Core.st +1694 -0
- data/public/amber/st/Maglev-Database-Explorer.st +3148 -0
- data/public/amber/st/Maglev-Vendor.st +151 -0
- data/public/amber/st/Makefile +104 -0
- data/public/amber/st/README.md +4 -0
- data/public/amber/st/SUnit.st +172 -0
- data/public/css/bootstrap-combined.no-icons.min.css +731 -0
- data/public/css/bootstrap.css +6811 -0
- data/public/css/images/animated-overlay.gif +0 -0
- data/public/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/public/css/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/public/css/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/public/css/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/public/css/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/public/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/public/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/public/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/public/css/images/ui-icons_222222_256x240.png +0 -0
- data/public/css/images/ui-icons_228ef1_256x240.png +0 -0
- data/public/css/images/ui-icons_ef8c08_256x240.png +0 -0
- data/public/css/images/ui-icons_ffd27a_256x240.png +0 -0
- data/public/css/images/ui-icons_ffffff_256x240.png +0 -0
- data/public/css/jquery-ui.min.css +5 -0
- data/public/css/smalltalk_code.css +42 -0
- data/public/css/style.css +210 -0
- data/public/images/bg_tile.png +0 -0
- data/public/images/maglev-logo.gif +0 -0
- data/public/images/mchammer.gif +0 -0
- data/public/images/rails_tiny.png +0 -0
- data/public/images/ruby.png +0 -0
- data/public/images/ruby_smalltalk_bridge.png +0 -0
- data/public/images/smalltalk.png +0 -0
- data/public/img/glyphicons-halflings.png +0 -0
- data/public/index.html +118 -0
- data/public/libs/bootstrap.min.js +7 -0
- data/public/libs/codemirror/CONTRIBUTING.md +72 -0
- data/public/libs/codemirror/LICENSE +23 -0
- data/public/libs/codemirror/README.md +11 -0
- data/public/libs/codemirror/addon/dialog/dialog.css +32 -0
- data/public/libs/codemirror/addon/dialog/dialog.js +80 -0
- data/public/libs/codemirror/addon/display/placeholder.js +54 -0
- data/public/libs/codemirror/addon/edit/closebrackets.js +54 -0
- data/public/libs/codemirror/addon/edit/closetag.js +86 -0
- data/public/libs/codemirror/addon/edit/continuecomment.js +44 -0
- data/public/libs/codemirror/addon/edit/continuelist.js +25 -0
- data/public/libs/codemirror/addon/edit/matchbrackets.js +82 -0
- data/public/libs/codemirror/addon/fold/brace-fold.js +31 -0
- data/public/libs/codemirror/addon/fold/foldcode.js +32 -0
- data/public/libs/codemirror/addon/fold/indent-fold.js +11 -0
- data/public/libs/codemirror/addon/fold/xml-fold.js +64 -0
- data/public/libs/codemirror/addon/hint/html-hint.js +582 -0
- data/public/libs/codemirror/addon/hint/javascript-hint.js +142 -0
- data/public/libs/codemirror/addon/hint/pig-hint.js +117 -0
- data/public/libs/codemirror/addon/hint/python-hint.js +93 -0
- data/public/libs/codemirror/addon/hint/show-hint.css +38 -0
- data/public/libs/codemirror/addon/hint/show-hint.js +180 -0
- data/public/libs/codemirror/addon/hint/xml-hint.js +118 -0
- data/public/libs/codemirror/addon/lint/javascript-lint.js +127 -0
- data/public/libs/codemirror/addon/lint/json-lint.js +14 -0
- data/public/libs/codemirror/addon/lint/lint.css +96 -0
- data/public/libs/codemirror/addon/lint/lint.js +197 -0
- data/public/libs/codemirror/addon/mode/loadmode.js +51 -0
- data/public/libs/codemirror/addon/mode/multiplex.js +95 -0
- data/public/libs/codemirror/addon/mode/overlay.js +59 -0
- data/public/libs/codemirror/addon/runmode/colorize.js +29 -0
- data/public/libs/codemirror/addon/runmode/runmode-standalone.js +130 -0
- data/public/libs/codemirror/addon/runmode/runmode.js +52 -0
- data/public/libs/codemirror/addon/runmode/runmode.node.js +89 -0
- data/public/libs/codemirror/addon/search/match-highlighter.js +60 -0
- data/public/libs/codemirror/addon/search/search.js +131 -0
- data/public/libs/codemirror/addon/search/searchcursor.js +133 -0
- data/public/libs/codemirror/addon/selection/active-line.js +39 -0
- data/public/libs/codemirror/addon/selection/mark-selection.js +34 -0
- data/public/libs/codemirror/bin/compress +91 -0
- data/public/libs/codemirror/bin/lint +11 -0
- data/public/libs/codemirror/demo/activeline.html +70 -0
- data/public/libs/codemirror/demo/bidi.html +61 -0
- data/public/libs/codemirror/demo/btree.html +87 -0
- data/public/libs/codemirror/demo/buffers.html +98 -0
- data/public/libs/codemirror/demo/changemode.html +50 -0
- data/public/libs/codemirror/demo/closebrackets.html +63 -0
- data/public/libs/codemirror/demo/closetag.html +37 -0
- data/public/libs/codemirror/demo/complete.html +70 -0
- data/public/libs/codemirror/demo/emacs.html +60 -0
- data/public/libs/codemirror/demo/folding.html +69 -0
- data/public/libs/codemirror/demo/fullscreen.html +147 -0
- data/public/libs/codemirror/demo/html5complete.html +92 -0
- data/public/libs/codemirror/demo/indentwrap.html +49 -0
- data/public/libs/codemirror/demo/lint.html +90 -0
- data/public/libs/codemirror/demo/loadmode.html +40 -0
- data/public/libs/codemirror/demo/marker.html +59 -0
- data/public/libs/codemirror/demo/markselection.html +36 -0
- data/public/libs/codemirror/demo/matchhighlighter.html +38 -0
- data/public/libs/codemirror/demo/multiplex.html +60 -0
- data/public/libs/codemirror/demo/mustache.html +59 -0
- data/public/libs/codemirror/demo/placeholder.html +36 -0
- data/public/libs/codemirror/demo/preview.html +76 -0
- data/public/libs/codemirror/demo/resize.html +49 -0
- data/public/libs/codemirror/demo/runmode.html +50 -0
- data/public/libs/codemirror/demo/search.html +85 -0
- data/public/libs/codemirror/demo/spanaffectswrapping_shim.html +73 -0
- data/public/libs/codemirror/demo/theme.html +89 -0
- data/public/libs/codemirror/demo/variableheight.html +52 -0
- data/public/libs/codemirror/demo/vim.html +65 -0
- data/public/libs/codemirror/demo/visibletabs.html +53 -0
- data/public/libs/codemirror/demo/widget.html +74 -0
- data/public/libs/codemirror/demo/xmlcomplete.html +81 -0
- data/public/libs/codemirror/index.html +487 -0
- data/public/libs/codemirror/keymap/emacs.js +30 -0
- data/public/libs/codemirror/keymap/vim.js +3044 -0
- data/public/libs/codemirror/lib/codemirror.css +253 -0
- data/public/libs/codemirror/lib/codemirror.js +5585 -0
- data/public/libs/codemirror/mode/apl/apl.js +160 -0
- data/public/libs/codemirror/mode/apl/index.html +61 -0
- data/public/libs/codemirror/mode/asterisk/asterisk.js +183 -0
- data/public/libs/codemirror/mode/asterisk/index.html +142 -0
- data/public/libs/codemirror/mode/clike/clike.js +302 -0
- data/public/libs/codemirror/mode/clike/index.html +103 -0
- data/public/libs/codemirror/mode/clike/scala.html +767 -0
- data/public/libs/codemirror/mode/clojure/clojure.js +222 -0
- data/public/libs/codemirror/mode/clojure/index.html +76 -0
- data/public/libs/codemirror/mode/coffeescript/LICENSE +22 -0
- data/public/libs/codemirror/mode/coffeescript/coffeescript.js +346 -0
- data/public/libs/codemirror/mode/coffeescript/index.html +728 -0
- data/public/libs/codemirror/mode/commonlisp/commonlisp.js +101 -0
- data/public/libs/codemirror/mode/commonlisp/index.html +165 -0
- data/public/libs/codemirror/mode/css/css.js +567 -0
- data/public/libs/codemirror/mode/css/index.html +58 -0
- data/public/libs/codemirror/mode/css/scss.html +145 -0
- data/public/libs/codemirror/mode/css/scss_test.js +80 -0
- data/public/libs/codemirror/mode/css/test.js +113 -0
- data/public/libs/codemirror/mode/d/d.js +205 -0
- data/public/libs/codemirror/mode/d/index.html +262 -0
- data/public/libs/codemirror/mode/diff/diff.js +32 -0
- data/public/libs/codemirror/mode/diff/index.html +105 -0
- data/public/libs/codemirror/mode/ecl/ecl.js +192 -0
- data/public/libs/codemirror/mode/ecl/index.html +39 -0
- data/public/libs/codemirror/mode/erlang/erlang.js +463 -0
- data/public/libs/codemirror/mode/erlang/index.html +64 -0
- data/public/libs/codemirror/mode/gas/gas.js +326 -0
- data/public/libs/codemirror/mode/gas/index.html +57 -0
- data/public/libs/codemirror/mode/gfm/gfm.js +96 -0
- data/public/libs/codemirror/mode/gfm/index.html +74 -0
- data/public/libs/codemirror/mode/gfm/test.js +112 -0
- data/public/libs/codemirror/mode/go/go.js +165 -0
- data/public/libs/codemirror/mode/go/index.html +74 -0
- data/public/libs/codemirror/mode/groovy/groovy.js +210 -0
- data/public/libs/codemirror/mode/groovy/index.html +73 -0
- data/public/libs/codemirror/mode/haskell/haskell.js +242 -0
- data/public/libs/codemirror/mode/haskell/index.html +62 -0
- data/public/libs/codemirror/mode/haxe/haxe.js +429 -0
- data/public/libs/codemirror/mode/haxe/index.html +90 -0
- data/public/libs/codemirror/mode/htmlembedded/htmlembedded.js +73 -0
- data/public/libs/codemirror/mode/htmlembedded/index.html +49 -0
- data/public/libs/codemirror/mode/htmlmixed/htmlmixed.js +104 -0
- data/public/libs/codemirror/mode/htmlmixed/index.html +73 -0
- data/public/libs/codemirror/mode/http/http.js +98 -0
- data/public/libs/codemirror/mode/http/index.html +32 -0
- data/public/libs/codemirror/mode/javascript/index.html +92 -0
- data/public/libs/codemirror/mode/javascript/javascript.js +467 -0
- data/public/libs/codemirror/mode/javascript/typescript.html +48 -0
- data/public/libs/codemirror/mode/jinja2/index.html +38 -0
- data/public/libs/codemirror/mode/jinja2/jinja2.js +42 -0
- data/public/libs/codemirror/mode/less/index.html +741 -0
- data/public/libs/codemirror/mode/less/less.js +266 -0
- data/public/libs/codemirror/mode/livescript/LICENSE +23 -0
- data/public/libs/codemirror/mode/livescript/index.html +446 -0
- data/public/libs/codemirror/mode/livescript/livescript.js +267 -0
- data/public/libs/codemirror/mode/livescript/livescript.ls +266 -0
- data/public/libs/codemirror/mode/lua/index.html +74 -0
- data/public/libs/codemirror/mode/lua/lua.js +140 -0
- data/public/libs/codemirror/mode/markdown/index.html +344 -0
- data/public/libs/codemirror/mode/markdown/markdown.js +526 -0
- data/public/libs/codemirror/mode/markdown/test.js +636 -0
- data/public/libs/codemirror/mode/meta.js +75 -0
- data/public/libs/codemirror/mode/mirc/index.html +149 -0
- data/public/libs/codemirror/mode/mirc/mirc.js +177 -0
- data/public/libs/codemirror/mode/ntriples/index.html +33 -0
- data/public/libs/codemirror/mode/ntriples/ntriples.js +170 -0
- data/public/libs/codemirror/mode/ocaml/index.html +131 -0
- data/public/libs/codemirror/mode/ocaml/ocaml.js +113 -0
- data/public/libs/codemirror/mode/pascal/LICENSE +7 -0
- data/public/libs/codemirror/mode/pascal/index.html +48 -0
- data/public/libs/codemirror/mode/pascal/pascal.js +94 -0
- data/public/libs/codemirror/mode/perl/LICENSE +19 -0
- data/public/libs/codemirror/mode/perl/index.html +62 -0
- data/public/libs/codemirror/mode/perl/perl.js +816 -0
- data/public/libs/codemirror/mode/php/index.html +51 -0
- data/public/libs/codemirror/mode/php/php.js +129 -0
- data/public/libs/codemirror/mode/pig/index.html +42 -0
- data/public/libs/codemirror/mode/pig/pig.js +171 -0
- data/public/libs/codemirror/mode/properties/index.html +41 -0
- data/public/libs/codemirror/mode/properties/properties.js +63 -0
- data/public/libs/codemirror/mode/python/LICENSE.txt +21 -0
- data/public/libs/codemirror/mode/python/index.html +135 -0
- data/public/libs/codemirror/mode/python/python.js +340 -0
- data/public/libs/codemirror/mode/q/index.html +131 -0
- data/public/libs/codemirror/mode/q/q.js +124 -0
- data/public/libs/codemirror/mode/r/LICENSE +24 -0
- data/public/libs/codemirror/mode/r/index.html +74 -0
- data/public/libs/codemirror/mode/r/r.js +141 -0
- data/public/libs/codemirror/mode/rpm/changes/changes.js +19 -0
- data/public/libs/codemirror/mode/rpm/changes/index.html +53 -0
- data/public/libs/codemirror/mode/rpm/spec/index.html +99 -0
- data/public/libs/codemirror/mode/rpm/spec/spec.css +5 -0
- data/public/libs/codemirror/mode/rpm/spec/spec.js +66 -0
- data/public/libs/codemirror/mode/rst/LICENSE.txt +21 -0
- data/public/libs/codemirror/mode/rst/index.html +524 -0
- data/public/libs/codemirror/mode/rst/rst.js +550 -0
- data/public/libs/codemirror/mode/ruby/LICENSE +24 -0
- data/public/libs/codemirror/mode/ruby/index.html +173 -0
- data/public/libs/codemirror/mode/ruby/ruby.js +197 -0
- data/public/libs/codemirror/mode/rust/index.html +48 -0
- data/public/libs/codemirror/mode/rust/rust.js +432 -0
- data/public/libs/codemirror/mode/sass/index.html +54 -0
- data/public/libs/codemirror/mode/sass/sass.js +349 -0
- data/public/libs/codemirror/mode/scheme/index.html +65 -0
- data/public/libs/codemirror/mode/scheme/scheme.js +230 -0
- data/public/libs/codemirror/mode/shell/index.html +51 -0
- data/public/libs/codemirror/mode/shell/shell.js +118 -0
- data/public/libs/codemirror/mode/sieve/LICENSE +19 -0
- data/public/libs/codemirror/mode/sieve/index.html +81 -0
- data/public/libs/codemirror/mode/sieve/sieve.js +183 -0
- data/public/libs/codemirror/mode/smalltalk/index.html +57 -0
- data/public/libs/codemirror/mode/smalltalk/smalltalk.js +141 -0
- data/public/libs/codemirror/mode/smarty/index.html +83 -0
- data/public/libs/codemirror/mode/smarty/smarty.js +148 -0
- data/public/libs/codemirror/mode/sparql/index.html +42 -0
- data/public/libs/codemirror/mode/sparql/sparql.js +143 -0
- data/public/libs/codemirror/mode/sql/index.html +68 -0
- data/public/libs/codemirror/mode/sql/sql.js +268 -0
- data/public/libs/codemirror/mode/stex/index.html +98 -0
- data/public/libs/codemirror/mode/stex/stex.js +246 -0
- data/public/libs/codemirror/mode/stex/test.js +117 -0
- data/public/libs/codemirror/mode/tcl/index.html +129 -0
- data/public/libs/codemirror/mode/tcl/tcl.js +131 -0
- data/public/libs/codemirror/mode/tiddlywiki/index.html +142 -0
- data/public/libs/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
- data/public/libs/codemirror/mode/tiddlywiki/tiddlywiki.js +353 -0
- data/public/libs/codemirror/mode/tiki/index.html +81 -0
- data/public/libs/codemirror/mode/tiki/tiki.css +26 -0
- data/public/libs/codemirror/mode/tiki/tiki.js +308 -0
- data/public/libs/codemirror/mode/turtle/index.html +39 -0
- data/public/libs/codemirror/mode/turtle/turtle.js +145 -0
- data/public/libs/codemirror/mode/vb/LICENSE.txt +21 -0
- data/public/libs/codemirror/mode/vb/index.html +88 -0
- data/public/libs/codemirror/mode/vb/vb.js +259 -0
- data/public/libs/codemirror/mode/vbscript/index.html +42 -0
- data/public/libs/codemirror/mode/vbscript/vbscript.js +26 -0
- data/public/libs/codemirror/mode/velocity/index.html +103 -0
- data/public/libs/codemirror/mode/velocity/velocity.js +144 -0
- data/public/libs/codemirror/mode/verilog/index.html +121 -0
- data/public/libs/codemirror/mode/verilog/verilog.js +182 -0
- data/public/libs/codemirror/mode/xml/index.html +45 -0
- data/public/libs/codemirror/mode/xml/xml.js +328 -0
- data/public/libs/codemirror/mode/xquery/LICENSE +20 -0
- data/public/libs/codemirror/mode/xquery/index.html +221 -0
- data/public/libs/codemirror/mode/xquery/test.js +64 -0
- data/public/libs/codemirror/mode/xquery/xquery.js +450 -0
- data/public/libs/codemirror/mode/yaml/index.html +68 -0
- data/public/libs/codemirror/mode/yaml/yaml.js +95 -0
- data/public/libs/codemirror/mode/z80/index.html +39 -0
- data/public/libs/codemirror/mode/z80/z80.js +85 -0
- data/public/libs/codemirror/package.json +21 -0
- data/public/libs/codemirror/test/doc_test.js +329 -0
- data/public/libs/codemirror/test/driver.js +138 -0
- data/public/libs/codemirror/test/index.html +182 -0
- data/public/libs/codemirror/test/lint/acorn.js +1593 -0
- data/public/libs/codemirror/test/lint/lint.js +112 -0
- data/public/libs/codemirror/test/lint/parse-js.js +1372 -0
- data/public/libs/codemirror/test/lint/walk.js +216 -0
- data/public/libs/codemirror/test/mode_test.css +10 -0
- data/public/libs/codemirror/test/mode_test.js +192 -0
- data/public/libs/codemirror/test/phantom_driver.js +31 -0
- data/public/libs/codemirror/test/run.js +33 -0
- data/public/libs/codemirror/test/test.js +1400 -0
- data/public/libs/codemirror/test/vim_test.js +1688 -0
- data/public/libs/codemirror/theme/ambiance-mobile.css +5 -0
- data/public/libs/codemirror/theme/ambiance.css +75 -0
- data/public/libs/codemirror/theme/blackboard.css +25 -0
- data/public/libs/codemirror/theme/cobalt.css +18 -0
- data/public/libs/codemirror/theme/eclipse.css +25 -0
- data/public/libs/codemirror/theme/elegant.css +10 -0
- data/public/libs/codemirror/theme/erlang-dark.css +21 -0
- data/public/libs/codemirror/theme/lesser-dark.css +44 -0
- data/public/libs/codemirror/theme/midnight.css +52 -0
- data/public/libs/codemirror/theme/monokai.css +28 -0
- data/public/libs/codemirror/theme/neat.css +9 -0
- data/public/libs/codemirror/theme/night.css +21 -0
- data/public/libs/codemirror/theme/rubyblue.css +21 -0
- data/public/libs/codemirror/theme/solarized.css +207 -0
- data/public/libs/codemirror/theme/twilight.css +26 -0
- data/public/libs/codemirror/theme/vibrant-ink.css +27 -0
- data/public/libs/codemirror/theme/xq-dark.css +46 -0
- data/public/libs/codemirror/theme/xq-light.css +43 -0
- data/public/libs/font-awesome/css/font-awesome-ie7.css +983 -0
- data/public/libs/font-awesome/css/font-awesome-ie7.min.css +24 -0
- data/public/libs/font-awesome/css/font-awesome.css +1268 -0
- data/public/libs/font-awesome/css/font-awesome.min.css +24 -0
- data/public/libs/font-awesome/font/FontAwesome.otf +0 -0
- data/public/libs/font-awesome/font/fontawesome-webfont.eot +0 -0
- data/public/libs/font-awesome/font/fontawesome-webfont.svg +339 -0
- data/public/libs/font-awesome/font/fontawesome-webfont.ttf +0 -0
- data/public/libs/font-awesome/font/fontawesome-webfont.woff +0 -0
- data/public/libs/font-awesome/less/bootstrap.less +78 -0
- data/public/libs/font-awesome/less/core.less +132 -0
- data/public/libs/font-awesome/less/extras.less +79 -0
- data/public/libs/font-awesome/less/font-awesome-ie7.less +413 -0
- data/public/libs/font-awesome/less/font-awesome.less +32 -0
- data/public/libs/font-awesome/less/icons.less +330 -0
- data/public/libs/font-awesome/less/mixins.less +34 -0
- data/public/libs/font-awesome/less/path.less +15 -0
- data/public/libs/font-awesome/less/variables.less +9 -0
- data/public/libs/jquery-1.10.0.min.js +6 -0
- data/public/libs/jquery-ui.min.js +12 -0
- data/public/libs/jquery.jsPlumb-1.4.0-all.js +9571 -0
- data/public/libs/jquery.livequery.js +226 -0
- data/public/libs/jsPlumbInitializer.js +72 -0
- data/public/libs/jstree/README.txt +10 -0
- data/public/libs/jstree/_demo/_dump.sql +20 -0
- data/public/libs/jstree/_demo/_inc/__mysql_errors.log +0 -0
- data/public/libs/jstree/_demo/_inc/class._database.php +146 -0
- data/public/libs/jstree/_demo/_inc/class._database_i.php +152 -0
- data/public/libs/jstree/_demo/_inc/class.tree.php +602 -0
- data/public/libs/jstree/_demo/_install.txt +6 -0
- data/public/libs/jstree/_demo/config.php +14 -0
- data/public/libs/jstree/_demo/file.png +0 -0
- data/public/libs/jstree/_demo/folder.png +0 -0
- data/public/libs/jstree/_demo/index.html +461 -0
- data/public/libs/jstree/_demo/root.png +0 -0
- data/public/libs/jstree/_demo/server.php +69 -0
- data/public/libs/jstree/_docs/!style.css +48 -0
- data/public/libs/jstree/_docs/_drive.png +0 -0
- data/public/libs/jstree/_docs/_html_data.html +2 -0
- data/public/libs/jstree/_docs/_json_data.json +4 -0
- data/public/libs/jstree/_docs/_search_data.json +6 -0
- data/public/libs/jstree/_docs/_search_result.json +1 -0
- data/public/libs/jstree/_docs/_xml_flat.xml +12 -0
- data/public/libs/jstree/_docs/_xml_nest.xml +18 -0
- data/public/libs/jstree/_docs/checkbox.html +171 -0
- data/public/libs/jstree/_docs/contextmenu.html +121 -0
- data/public/libs/jstree/_docs/cookies.html +97 -0
- data/public/libs/jstree/_docs/core.html +689 -0
- data/public/libs/jstree/_docs/crrm.html +316 -0
- data/public/libs/jstree/_docs/dnd.html +199 -0
- data/public/libs/jstree/_docs/hotkeys.html +82 -0
- data/public/libs/jstree/_docs/html_data.html +175 -0
- data/public/libs/jstree/_docs/index.html +86 -0
- data/public/libs/jstree/_docs/json_data.html +249 -0
- data/public/libs/jstree/_docs/languages.html +152 -0
- data/public/libs/jstree/_docs/logo.png +0 -0
- data/public/libs/jstree/_docs/search.html +153 -0
- data/public/libs/jstree/_docs/sort.html +85 -0
- data/public/libs/jstree/_docs/syntax/!script.js +2232 -0
- data/public/libs/jstree/_docs/syntax/!style.css +511 -0
- data/public/libs/jstree/_docs/syntax/clipboard.swf +0 -0
- data/public/libs/jstree/_docs/syntax/help.png +0 -0
- data/public/libs/jstree/_docs/syntax/magnifier.png +0 -0
- data/public/libs/jstree/_docs/syntax/page_white_code.png +0 -0
- data/public/libs/jstree/_docs/syntax/page_white_copy.png +0 -0
- data/public/libs/jstree/_docs/syntax/printer.png +0 -0
- data/public/libs/jstree/_docs/syntax/wrapping.png +0 -0
- data/public/libs/jstree/_docs/themeroller.html +107 -0
- data/public/libs/jstree/_docs/themes.html +127 -0
- data/public/libs/jstree/_docs/types.html +178 -0
- data/public/libs/jstree/_docs/ui.html +197 -0
- data/public/libs/jstree/_docs/unique.html +85 -0
- data/public/libs/jstree/_docs/xml_data.html +218 -0
- data/public/libs/jstree/_lib/jquery.cookie.js +96 -0
- data/public/libs/jstree/_lib/jquery.hotkeys.js +99 -0
- data/public/libs/jstree/_lib/jquery.js +5 -0
- data/public/libs/jstree/jquery.jstree.js +4564 -0
- data/public/libs/jstree/themes/apple/bg.jpg +0 -0
- data/public/libs/jstree/themes/apple/d.png +0 -0
- data/public/libs/jstree/themes/apple/dot_for_ie.gif +0 -0
- data/public/libs/jstree/themes/apple/style.css +61 -0
- data/public/libs/jstree/themes/apple/throbber.gif +0 -0
- data/public/libs/jstree/themes/classic/d.gif +0 -0
- data/public/libs/jstree/themes/classic/d.png +0 -0
- data/public/libs/jstree/themes/classic/dot_for_ie.gif +0 -0
- data/public/libs/jstree/themes/classic/style.css +77 -0
- data/public/libs/jstree/themes/classic/throbber.gif +0 -0
- data/public/libs/jstree/themes/default-rtl/d.gif +0 -0
- data/public/libs/jstree/themes/default-rtl/d.png +0 -0
- data/public/libs/jstree/themes/default-rtl/dots.gif +0 -0
- data/public/libs/jstree/themes/default-rtl/style.css +84 -0
- data/public/libs/jstree/themes/default-rtl/throbber.gif +0 -0
- data/public/libs/jstree/themes/default/d.gif +0 -0
- data/public/libs/jstree/themes/default/d.png +0 -0
- data/public/libs/jstree/themes/default/style.css +74 -0
- data/public/libs/jstree/themes/default/throbber.gif +0 -0
- data/public/themes/geo-bootstrap/README.md +25 -0
- data/public/themes/geo-bootstrap/img/flames.gif +0 -0
- data/public/themes/geo-bootstrap/img/glyphicons-halflings-white.png +0 -0
- data/public/themes/geo-bootstrap/img/glyphicons-halflings.png +0 -0
- data/public/themes/geo-bootstrap/img/microfab.gif +0 -0
- data/public/themes/geo-bootstrap/img/progress.gif +0 -0
- data/public/themes/geo-bootstrap/img/rainbow.gif +0 -0
- data/public/themes/geo-bootstrap/img/stars.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/7upspot.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/americanflag.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/community.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/computer-01.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/computer.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/construction.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/counter.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/counter2.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/divider.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/divider1.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/divider2.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/divider3.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/divider4.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/drudgesiren.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/emailme.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/funky.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/geocities.jpg +0 -0
- data/public/themes/geo-bootstrap/img/test/hacker.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/heart.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/hot.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/ie_logo.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/mailkitten.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/mchammer.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/new.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/new2.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/noframes.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/notepad.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/ns_logo.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/sign-in.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/spinningearth.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/underconstruction.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/wabwalk.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/webtrips.gif +0 -0
- data/public/themes/geo-bootstrap/img/test/yahooweek.gif +0 -0
- data/public/themes/geo-bootstrap/package.json +21 -0
- data/public/themes/geo-bootstrap/swatch/bootstrap-responsive.css +1109 -0
- data/public/themes/geo-bootstrap/swatch/bootstrap-responsive.min.css +9 -0
- data/public/themes/geo-bootstrap/swatch/bootstrap.css +6462 -0
- data/public/themes/geo-bootstrap/swatch/bootstrap.min.css +9 -0
- metadata +791 -0
@@ -0,0 +1,4427 @@
|
|
1
|
+
smalltalk.addPackage('Kernel-Collections', {});
|
2
|
+
smalltalk.addClass('Association', smalltalk.Object, ['key', 'value'], 'Kernel-Collections');
|
3
|
+
smalltalk.addMethod(
|
4
|
+
unescape('__eq'),
|
5
|
+
smalltalk.method({
|
6
|
+
selector: unescape('%3D'),
|
7
|
+
category: 'comparing',
|
8
|
+
fn: function (anAssociation){
|
9
|
+
var self=this;
|
10
|
+
return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(anAssociation, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_key", []), "__eq", [smalltalk.send(anAssociation, "_key", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_value", []), "__eq", [smalltalk.send(anAssociation, "_value", [])]);})]);})]);
|
11
|
+
return self;},
|
12
|
+
args: ["anAssociation"],
|
13
|
+
source: unescape('%3D%20anAssociation%0A%09%5Eself%20class%20%3D%20anAssociation%20class%20and%3A%20%5B%0A%09%20%20%20%20self%20key%20%3D%20anAssociation%20key%20and%3A%20%5B%0A%09%09self%20value%20%3D%20anAssociation%20value%5D%5D'),
|
14
|
+
messageSends: ["and:", unescape("%3D"), "class", "key", "value"],
|
15
|
+
referencedClasses: []
|
16
|
+
}),
|
17
|
+
smalltalk.Association);
|
18
|
+
|
19
|
+
smalltalk.addMethod(
|
20
|
+
unescape('_isAssociation'),
|
21
|
+
smalltalk.method({
|
22
|
+
selector: unescape('isAssociation'),
|
23
|
+
category: 'testing',
|
24
|
+
fn: function (){
|
25
|
+
var self=this;
|
26
|
+
return true;
|
27
|
+
return self;},
|
28
|
+
args: [],
|
29
|
+
source: unescape('isAssociation%0A%09%5E%20true'),
|
30
|
+
messageSends: [],
|
31
|
+
referencedClasses: []
|
32
|
+
}),
|
33
|
+
smalltalk.Association);
|
34
|
+
|
35
|
+
smalltalk.addMethod(
|
36
|
+
unescape('_key'),
|
37
|
+
smalltalk.method({
|
38
|
+
selector: unescape('key'),
|
39
|
+
category: 'accessing',
|
40
|
+
fn: function (){
|
41
|
+
var self=this;
|
42
|
+
return self['@key'];
|
43
|
+
return self;},
|
44
|
+
args: [],
|
45
|
+
source: unescape('key%0A%09%5Ekey'),
|
46
|
+
messageSends: [],
|
47
|
+
referencedClasses: []
|
48
|
+
}),
|
49
|
+
smalltalk.Association);
|
50
|
+
|
51
|
+
smalltalk.addMethod(
|
52
|
+
unescape('_key_'),
|
53
|
+
smalltalk.method({
|
54
|
+
selector: unescape('key%3A'),
|
55
|
+
category: 'accessing',
|
56
|
+
fn: function (aKey){
|
57
|
+
var self=this;
|
58
|
+
(self['@key']=aKey);
|
59
|
+
return self;},
|
60
|
+
args: ["aKey"],
|
61
|
+
source: unescape('key%3A%20aKey%0A%09key%20%3A%3D%20aKey'),
|
62
|
+
messageSends: [],
|
63
|
+
referencedClasses: []
|
64
|
+
}),
|
65
|
+
smalltalk.Association);
|
66
|
+
|
67
|
+
smalltalk.addMethod(
|
68
|
+
unescape('_storeOn_'),
|
69
|
+
smalltalk.method({
|
70
|
+
selector: unescape('storeOn%3A'),
|
71
|
+
category: 'comparing',
|
72
|
+
fn: function (aStream){
|
73
|
+
var self=this;
|
74
|
+
smalltalk.send(self['@key'], "_storeOn_", [aStream]);
|
75
|
+
smalltalk.send(aStream, "_nextPutAll_", [unescape("-%3E")]);
|
76
|
+
smalltalk.send(self['@value'], "_storeOn_", [aStream]);
|
77
|
+
return self;},
|
78
|
+
args: ["aStream"],
|
79
|
+
source: unescape('storeOn%3A%20aStream%0A%09%22Store%20in%20the%20format%20%28key-%3Evalue%29%22%0A%0A%09%22aStream%20nextPutAll%3A%20%27%28%27.%22%0A%09key%20storeOn%3A%20aStream.%0A%09aStream%20nextPutAll%3A%20%27-%3E%27.%0A%09value%20storeOn%3A%20aStream.%0A%09%22aStream%20nextPutAll%3A%20%27%29%27%22'),
|
80
|
+
messageSends: ["storeOn:", "nextPutAll:"],
|
81
|
+
referencedClasses: []
|
82
|
+
}),
|
83
|
+
smalltalk.Association);
|
84
|
+
|
85
|
+
smalltalk.addMethod(
|
86
|
+
unescape('_value'),
|
87
|
+
smalltalk.method({
|
88
|
+
selector: unescape('value'),
|
89
|
+
category: 'accessing',
|
90
|
+
fn: function (){
|
91
|
+
var self=this;
|
92
|
+
return self['@value'];
|
93
|
+
return self;},
|
94
|
+
args: [],
|
95
|
+
source: unescape('value%0A%09%5Evalue'),
|
96
|
+
messageSends: [],
|
97
|
+
referencedClasses: []
|
98
|
+
}),
|
99
|
+
smalltalk.Association);
|
100
|
+
|
101
|
+
smalltalk.addMethod(
|
102
|
+
unescape('_value_'),
|
103
|
+
smalltalk.method({
|
104
|
+
selector: unescape('value%3A'),
|
105
|
+
category: 'accessing',
|
106
|
+
fn: function (aValue){
|
107
|
+
var self=this;
|
108
|
+
(self['@value']=aValue);
|
109
|
+
return self;},
|
110
|
+
args: ["aValue"],
|
111
|
+
source: unescape('value%3A%20aValue%0A%09value%20%3A%3D%20aValue'),
|
112
|
+
messageSends: [],
|
113
|
+
referencedClasses: []
|
114
|
+
}),
|
115
|
+
smalltalk.Association);
|
116
|
+
|
117
|
+
|
118
|
+
smalltalk.addMethod(
|
119
|
+
unescape('_key_value_'),
|
120
|
+
smalltalk.method({
|
121
|
+
selector: unescape('key%3Avalue%3A'),
|
122
|
+
category: 'instance creation',
|
123
|
+
fn: function (aKey, aValue){
|
124
|
+
var self=this;
|
125
|
+
return (function($rec){smalltalk.send($rec, "_key_", [aKey]);smalltalk.send($rec, "_value_", [aValue]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
|
126
|
+
return self;},
|
127
|
+
args: ["aKey", "aValue"],
|
128
|
+
source: unescape('key%3A%20aKey%20value%3A%20aValue%0A%09%20%20%20%20%5Eself%20new%0A%09%09key%3A%20aKey%3B%0A%09%09value%3A%20aValue%3B%0A%09%09yourself'),
|
129
|
+
messageSends: ["key:", "value:", "yourself", "new"],
|
130
|
+
referencedClasses: []
|
131
|
+
}),
|
132
|
+
smalltalk.Association.klass);
|
133
|
+
|
134
|
+
|
135
|
+
smalltalk.addClass('Collection', smalltalk.Object, [], 'Kernel-Collections');
|
136
|
+
smalltalk.addMethod(
|
137
|
+
unescape('__comma'),
|
138
|
+
smalltalk.method({
|
139
|
+
selector: unescape('%2C'),
|
140
|
+
category: 'copying',
|
141
|
+
fn: function (aCollection){
|
142
|
+
var self=this;
|
143
|
+
return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
|
144
|
+
return self;},
|
145
|
+
args: ["aCollection"],
|
146
|
+
source: unescape('%2C%20aCollection%0A%09%5Eself%20copy%20%0A%09%20%20%20%20addAll%3A%20aCollection%3B%20%0A%09%20%20%20%20yourself'),
|
147
|
+
messageSends: ["addAll:", "yourself", "copy"],
|
148
|
+
referencedClasses: []
|
149
|
+
}),
|
150
|
+
smalltalk.Collection);
|
151
|
+
|
152
|
+
smalltalk.addMethod(
|
153
|
+
unescape('_add_'),
|
154
|
+
smalltalk.method({
|
155
|
+
selector: unescape('add%3A'),
|
156
|
+
category: 'adding/removing',
|
157
|
+
fn: function (anObject){
|
158
|
+
var self=this;
|
159
|
+
smalltalk.send(self, "_subclassResponsibility", []);
|
160
|
+
return self;},
|
161
|
+
args: ["anObject"],
|
162
|
+
source: unescape('add%3A%20anObject%0A%09self%20subclassResponsibility'),
|
163
|
+
messageSends: ["subclassResponsibility"],
|
164
|
+
referencedClasses: []
|
165
|
+
}),
|
166
|
+
smalltalk.Collection);
|
167
|
+
|
168
|
+
smalltalk.addMethod(
|
169
|
+
unescape('_addAll_'),
|
170
|
+
smalltalk.method({
|
171
|
+
selector: unescape('addAll%3A'),
|
172
|
+
category: 'adding/removing',
|
173
|
+
fn: function (aCollection){
|
174
|
+
var self=this;
|
175
|
+
smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_add_", [each]);})]);
|
176
|
+
return aCollection;
|
177
|
+
return self;},
|
178
|
+
args: ["aCollection"],
|
179
|
+
source: unescape('addAll%3A%20aCollection%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20add%3A%20each%5D.%0A%09%5EaCollection'),
|
180
|
+
messageSends: ["do:", "add:"],
|
181
|
+
referencedClasses: []
|
182
|
+
}),
|
183
|
+
smalltalk.Collection);
|
184
|
+
|
185
|
+
smalltalk.addMethod(
|
186
|
+
unescape('_asArray'),
|
187
|
+
smalltalk.method({
|
188
|
+
selector: unescape('asArray'),
|
189
|
+
category: 'converting',
|
190
|
+
fn: function (){
|
191
|
+
var self=this;
|
192
|
+
return smalltalk.send((smalltalk.Array || Array), "_withAll_", [self]);
|
193
|
+
return self;},
|
194
|
+
args: [],
|
195
|
+
source: unescape('asArray%0A%09%5EArray%20withAll%3A%20self'),
|
196
|
+
messageSends: ["withAll:"],
|
197
|
+
referencedClasses: ["Array"]
|
198
|
+
}),
|
199
|
+
smalltalk.Collection);
|
200
|
+
|
201
|
+
smalltalk.addMethod(
|
202
|
+
unescape('_asJSON'),
|
203
|
+
smalltalk.method({
|
204
|
+
selector: unescape('asJSON'),
|
205
|
+
category: 'converting',
|
206
|
+
fn: function (){
|
207
|
+
var self=this;
|
208
|
+
return smalltalk.send(smalltalk.send(self, "_asArray", []), "_collect_", [(function(each){return smalltalk.send(each, "_asJSON", []);})]);
|
209
|
+
return self;},
|
210
|
+
args: [],
|
211
|
+
source: unescape('asJSON%0A%09%5Eself%20asArray%20collect%3A%20%5B%3Aeach%20%7C%20each%20asJSON%5D'),
|
212
|
+
messageSends: ["collect:", "asArray", "asJSON"],
|
213
|
+
referencedClasses: []
|
214
|
+
}),
|
215
|
+
smalltalk.Collection);
|
216
|
+
|
217
|
+
smalltalk.addMethod(
|
218
|
+
unescape('_asOrderedCollection'),
|
219
|
+
smalltalk.method({
|
220
|
+
selector: unescape('asOrderedCollection'),
|
221
|
+
category: 'converting',
|
222
|
+
fn: function (){
|
223
|
+
var self=this;
|
224
|
+
return smalltalk.send(self, "_asArray", []);
|
225
|
+
return self;},
|
226
|
+
args: [],
|
227
|
+
source: unescape('asOrderedCollection%0A%09%5Eself%20asArray'),
|
228
|
+
messageSends: ["asArray"],
|
229
|
+
referencedClasses: []
|
230
|
+
}),
|
231
|
+
smalltalk.Collection);
|
232
|
+
|
233
|
+
smalltalk.addMethod(
|
234
|
+
unescape('_asSet'),
|
235
|
+
smalltalk.method({
|
236
|
+
selector: unescape('asSet'),
|
237
|
+
category: 'converting',
|
238
|
+
fn: function (){
|
239
|
+
var self=this;
|
240
|
+
return smalltalk.send((smalltalk.Set || Set), "_withAll_", [self]);
|
241
|
+
return self;},
|
242
|
+
args: [],
|
243
|
+
source: unescape('asSet%0A%09%5ESet%20withAll%3A%20self'),
|
244
|
+
messageSends: ["withAll:"],
|
245
|
+
referencedClasses: ["Set"]
|
246
|
+
}),
|
247
|
+
smalltalk.Collection);
|
248
|
+
|
249
|
+
smalltalk.addMethod(
|
250
|
+
unescape('_collect_'),
|
251
|
+
smalltalk.method({
|
252
|
+
selector: unescape('collect%3A'),
|
253
|
+
category: 'enumerating',
|
254
|
+
fn: function (aBlock){
|
255
|
+
var self=this;
|
256
|
+
var newCollection=nil;
|
257
|
+
(newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
|
258
|
+
smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [smalltalk.send(aBlock, "_value_", [each])]);})]);
|
259
|
+
return newCollection;
|
260
|
+
return self;},
|
261
|
+
args: ["aBlock"],
|
262
|
+
source: unescape('collect%3A%20aBlock%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20newCollection%20add%3A%20%28aBlock%20value%3A%20each%29%5D.%0A%09%5EnewCollection'),
|
263
|
+
messageSends: ["new", "class", "do:", "add:", "value:"],
|
264
|
+
referencedClasses: []
|
265
|
+
}),
|
266
|
+
smalltalk.Collection);
|
267
|
+
|
268
|
+
smalltalk.addMethod(
|
269
|
+
unescape('_copyWith_'),
|
270
|
+
smalltalk.method({
|
271
|
+
selector: unescape('copyWith%3A'),
|
272
|
+
category: 'copying',
|
273
|
+
fn: function (anObject){
|
274
|
+
var self=this;
|
275
|
+
return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
|
276
|
+
return self;},
|
277
|
+
args: ["anObject"],
|
278
|
+
source: unescape('copyWith%3A%20anObject%0A%09%5Eself%20copy%20add%3A%20anObject%3B%20yourself'),
|
279
|
+
messageSends: ["add:", "yourself", "copy"],
|
280
|
+
referencedClasses: []
|
281
|
+
}),
|
282
|
+
smalltalk.Collection);
|
283
|
+
|
284
|
+
smalltalk.addMethod(
|
285
|
+
unescape('_copyWithAll_'),
|
286
|
+
smalltalk.method({
|
287
|
+
selector: unescape('copyWithAll%3A'),
|
288
|
+
category: 'copying',
|
289
|
+
fn: function (aCollection){
|
290
|
+
var self=this;
|
291
|
+
return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
|
292
|
+
return self;},
|
293
|
+
args: ["aCollection"],
|
294
|
+
source: unescape('copyWithAll%3A%20aCollection%0A%09%5Eself%20copy%20addAll%3A%20aCollection%3B%20yourself'),
|
295
|
+
messageSends: ["addAll:", "yourself", "copy"],
|
296
|
+
referencedClasses: []
|
297
|
+
}),
|
298
|
+
smalltalk.Collection);
|
299
|
+
|
300
|
+
smalltalk.addMethod(
|
301
|
+
unescape('_copyWithoutAll_'),
|
302
|
+
smalltalk.method({
|
303
|
+
selector: unescape('copyWithoutAll%3A'),
|
304
|
+
category: 'copying',
|
305
|
+
fn: function (aCollection){
|
306
|
+
var self=this;
|
307
|
+
return smalltalk.send(self, "_reject_", [(function(each){return smalltalk.send(aCollection, "_includes_", [each]);})]);
|
308
|
+
return self;},
|
309
|
+
args: ["aCollection"],
|
310
|
+
source: unescape('copyWithoutAll%3A%20aCollection%0A%09%22Answer%20a%20copy%20of%20the%20receiver%20that%20does%20not%20contain%20any%20elements%20%0A%09equal%20to%20those%20in%20aCollection.%22%0A%0A%09%5E%20self%20reject%3A%20%5B%3Aeach%20%7C%20aCollection%20includes%3A%20each%5D'),
|
311
|
+
messageSends: ["reject:", "includes:"],
|
312
|
+
referencedClasses: []
|
313
|
+
}),
|
314
|
+
smalltalk.Collection);
|
315
|
+
|
316
|
+
smalltalk.addMethod(
|
317
|
+
unescape('_detect_'),
|
318
|
+
smalltalk.method({
|
319
|
+
selector: unescape('detect%3A'),
|
320
|
+
category: 'enumerating',
|
321
|
+
fn: function (aBlock){
|
322
|
+
var self=this;
|
323
|
+
return smalltalk.send(self, "_detect_ifNone_", [aBlock, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
|
324
|
+
return self;},
|
325
|
+
args: ["aBlock"],
|
326
|
+
source: unescape('detect%3A%20aBlock%0A%09%5Eself%20detect%3A%20aBlock%20ifNone%3A%20%5Bself%20errorNotFound%5D'),
|
327
|
+
messageSends: ["detect:ifNone:", "errorNotFound"],
|
328
|
+
referencedClasses: []
|
329
|
+
}),
|
330
|
+
smalltalk.Collection);
|
331
|
+
|
332
|
+
smalltalk.addMethod(
|
333
|
+
unescape('_detect_ifNone_'),
|
334
|
+
smalltalk.method({
|
335
|
+
selector: unescape('detect%3AifNone%3A'),
|
336
|
+
category: 'enumerating',
|
337
|
+
fn: function (aBlock, anotherBlock){
|
338
|
+
var self=this;
|
339
|
+
|
340
|
+
for(var i = 0; i < self.length; i++)
|
341
|
+
if(aBlock(self[i]))
|
342
|
+
return self[i];
|
343
|
+
return anotherBlock();
|
344
|
+
;
|
345
|
+
return self;},
|
346
|
+
args: ["aBlock", "anotherBlock"],
|
347
|
+
source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%3C%0A%09%09for%28var%20i%20%3D%200%3B%20i%20%3C%20self.length%3B%20i++%29%0A%09%09%09if%28aBlock%28self%5Bi%5D%29%29%0A%09%09%09%09return%20self%5Bi%5D%3B%0A%09%09return%20anotherBlock%28%29%3B%0A%09%3E'),
|
348
|
+
messageSends: [],
|
349
|
+
referencedClasses: []
|
350
|
+
}),
|
351
|
+
smalltalk.Collection);
|
352
|
+
|
353
|
+
smalltalk.addMethod(
|
354
|
+
unescape('_do_'),
|
355
|
+
smalltalk.method({
|
356
|
+
selector: unescape('do%3A'),
|
357
|
+
category: 'enumerating',
|
358
|
+
fn: function (aBlock){
|
359
|
+
var self=this;
|
360
|
+
for(var i=0;i<self.length;i++){aBlock(self[i]);};
|
361
|
+
return self;},
|
362
|
+
args: ["aBlock"],
|
363
|
+
source: unescape('do%3A%20aBlock%0A%09%3Cfor%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7BaBlock%28self%5Bi%5D%29%3B%7D%3E'),
|
364
|
+
messageSends: [],
|
365
|
+
referencedClasses: []
|
366
|
+
}),
|
367
|
+
smalltalk.Collection);
|
368
|
+
|
369
|
+
smalltalk.addMethod(
|
370
|
+
unescape('_do_separatedBy_'),
|
371
|
+
smalltalk.method({
|
372
|
+
selector: unescape('do%3AseparatedBy%3A'),
|
373
|
+
category: 'enumerating',
|
374
|
+
fn: function (aBlock, anotherBlock){
|
375
|
+
var self=this;
|
376
|
+
var first=nil;
|
377
|
+
(first=true);
|
378
|
+
smalltalk.send(self, "_do_", [(function(each){((($receiver = first).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (first=false);})() : (function(){return smalltalk.send(anotherBlock, "_value", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (first=false);}), (function(){return smalltalk.send(anotherBlock, "_value", []);})]));return smalltalk.send(aBlock, "_value_", [each]);})]);
|
379
|
+
return self;},
|
380
|
+
args: ["aBlock", "anotherBlock"],
|
381
|
+
source: unescape('do%3A%20aBlock%20separatedBy%3A%20anotherBlock%0A%09%7C%20first%20%7C%0A%09first%20%3A%3D%20true.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20first%0A%09%09ifTrue%3A%20%5Bfirst%20%3A%3D%20false%5D%0A%09%09ifFalse%3A%20%5BanotherBlock%20value%5D.%0A%09%20%20%20%20aBlock%20value%3A%20each%5D'),
|
382
|
+
messageSends: ["do:", "ifTrue:ifFalse:", "value", "value:"],
|
383
|
+
referencedClasses: []
|
384
|
+
}),
|
385
|
+
smalltalk.Collection);
|
386
|
+
|
387
|
+
smalltalk.addMethod(
|
388
|
+
unescape('_errorNotFound'),
|
389
|
+
smalltalk.method({
|
390
|
+
selector: unescape('errorNotFound'),
|
391
|
+
category: 'error handling',
|
392
|
+
fn: function (){
|
393
|
+
var self=this;
|
394
|
+
smalltalk.send(self, "_error_", ["Object is not in the collection"]);
|
395
|
+
return self;},
|
396
|
+
args: [],
|
397
|
+
source: unescape('errorNotFound%0A%09self%20error%3A%20%27Object%20is%20not%20in%20the%20collection%27'),
|
398
|
+
messageSends: ["error:"],
|
399
|
+
referencedClasses: []
|
400
|
+
}),
|
401
|
+
smalltalk.Collection);
|
402
|
+
|
403
|
+
smalltalk.addMethod(
|
404
|
+
unescape('_ifEmpty_'),
|
405
|
+
smalltalk.method({
|
406
|
+
selector: unescape('ifEmpty%3A'),
|
407
|
+
category: 'testing',
|
408
|
+
fn: function (aBlock){
|
409
|
+
var self=this;
|
410
|
+
return ((($receiver = smalltalk.send(self, "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(aBlock, "_value", []);})() : (function(){return self;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(aBlock, "_value", []);}), (function(){return self;})]));
|
411
|
+
return self;},
|
412
|
+
args: ["aBlock"],
|
413
|
+
source: unescape('ifEmpty%3A%20aBlock%0A%09%22Evaluate%20the%20given%20block%20with%20the%20receiver%20as%20argument%2C%20answering%20its%20value%20if%20the%20receiver%20is%20empty%2C%20otherwise%20answer%20the%20receiver.%20Note%20that%20the%20fact%20that%20this%20method%20returns%20its%20argument%20in%20case%20the%20receiver%20is%20not%20empty%20allows%20one%20to%20write%20expressions%20like%20the%20following%20ones%3A%20self%20classifyMethodAs%3A%20%0A%09%09%28myProtocol%20ifEmpty%3A%20%5B%27As%20yet%20unclassified%27%5D%29%22%0A%09%5E%20self%20isEmpty%20%0A%09%09ifTrue%3A%20%5B%20aBlock%20value%20%5D%0A%09%09ifFalse%3A%20%5B%20self%20%5D'),
|
414
|
+
messageSends: ["ifTrue:ifFalse:", "isEmpty", "value"],
|
415
|
+
referencedClasses: []
|
416
|
+
}),
|
417
|
+
smalltalk.Collection);
|
418
|
+
|
419
|
+
smalltalk.addMethod(
|
420
|
+
unescape('_ifNotEmpty_'),
|
421
|
+
smalltalk.method({
|
422
|
+
selector: unescape('ifNotEmpty%3A'),
|
423
|
+
category: 'testing',
|
424
|
+
fn: function (aBlock){
|
425
|
+
var self=this;
|
426
|
+
smalltalk.send(smalltalk.send(self, "_notEmpty", []), "_ifTrue_", [aBlock]);
|
427
|
+
return self;},
|
428
|
+
args: ["aBlock"],
|
429
|
+
source: unescape('ifNotEmpty%3A%20aBlock%0A%09self%20notEmpty%20ifTrue%3A%20aBlock.'),
|
430
|
+
messageSends: ["ifTrue:", "notEmpty"],
|
431
|
+
referencedClasses: []
|
432
|
+
}),
|
433
|
+
smalltalk.Collection);
|
434
|
+
|
435
|
+
smalltalk.addMethod(
|
436
|
+
unescape('_includes_'),
|
437
|
+
smalltalk.method({
|
438
|
+
selector: unescape('includes%3A'),
|
439
|
+
category: 'testing',
|
440
|
+
fn: function (anObject){
|
441
|
+
var self=this;
|
442
|
+
|
443
|
+
var i = self.length;
|
444
|
+
while (i--) {
|
445
|
+
if (smalltalk.send(self[i], "__eq", [anObject])) {return true;}
|
446
|
+
}
|
447
|
+
return false
|
448
|
+
;
|
449
|
+
return self;},
|
450
|
+
args: ["anObject"],
|
451
|
+
source: unescape('includes%3A%20anObject%0A%09%3C%0A%09%09var%20i%20%3D%20self.length%3B%0A%09%09while%20%28i--%29%20%7B%0A%09%09%09if%20%28smalltalk.send%28self%5Bi%5D%2C%20%22__eq%22%2C%20%5BanObject%5D%29%29%20%7Breturn%20true%3B%7D%09%0A%09%09%7D%0A%09%09return%20false%0A%09%3E'),
|
452
|
+
messageSends: [],
|
453
|
+
referencedClasses: []
|
454
|
+
}),
|
455
|
+
smalltalk.Collection);
|
456
|
+
|
457
|
+
smalltalk.addMethod(
|
458
|
+
unescape('_inject_into_'),
|
459
|
+
smalltalk.method({
|
460
|
+
selector: unescape('inject%3Ainto%3A'),
|
461
|
+
category: 'enumerating',
|
462
|
+
fn: function (anObject, aBlock){
|
463
|
+
var self=this;
|
464
|
+
var result=nil;
|
465
|
+
(result=anObject);
|
466
|
+
smalltalk.send(self, "_do_", [(function(each){return (result=smalltalk.send(aBlock, "_value_value_", [result, each]));})]);
|
467
|
+
return result;
|
468
|
+
return self;},
|
469
|
+
args: ["anObject", "aBlock"],
|
470
|
+
source: unescape('inject%3A%20anObject%20into%3A%20aBlock%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20anObject.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%20%0A%09%20%20%20%20result%20%3A%3D%20aBlock%20value%3A%20result%20value%3A%20each%5D.%0A%09%5Eresult'),
|
471
|
+
messageSends: ["do:", "value:value:"],
|
472
|
+
referencedClasses: []
|
473
|
+
}),
|
474
|
+
smalltalk.Collection);
|
475
|
+
|
476
|
+
smalltalk.addMethod(
|
477
|
+
unescape('_isEmpty'),
|
478
|
+
smalltalk.method({
|
479
|
+
selector: unescape('isEmpty'),
|
480
|
+
category: 'testing',
|
481
|
+
fn: function (){
|
482
|
+
var self=this;
|
483
|
+
return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
|
484
|
+
return self;},
|
485
|
+
args: [],
|
486
|
+
source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
|
487
|
+
messageSends: [unescape("%3D"), "size"],
|
488
|
+
referencedClasses: []
|
489
|
+
}),
|
490
|
+
smalltalk.Collection);
|
491
|
+
|
492
|
+
smalltalk.addMethod(
|
493
|
+
unescape('_notEmpty'),
|
494
|
+
smalltalk.method({
|
495
|
+
selector: unescape('notEmpty'),
|
496
|
+
category: 'testing',
|
497
|
+
fn: function (){
|
498
|
+
var self=this;
|
499
|
+
return smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_not", []);
|
500
|
+
return self;},
|
501
|
+
args: [],
|
502
|
+
source: unescape('notEmpty%0A%09%5Eself%20isEmpty%20not'),
|
503
|
+
messageSends: ["not", "isEmpty"],
|
504
|
+
referencedClasses: []
|
505
|
+
}),
|
506
|
+
smalltalk.Collection);
|
507
|
+
|
508
|
+
smalltalk.addMethod(
|
509
|
+
unescape('_readStream'),
|
510
|
+
smalltalk.method({
|
511
|
+
selector: unescape('readStream'),
|
512
|
+
category: 'accessing',
|
513
|
+
fn: function (){
|
514
|
+
var self=this;
|
515
|
+
return smalltalk.send(self, "_stream", []);
|
516
|
+
return self;},
|
517
|
+
args: [],
|
518
|
+
source: unescape('readStream%0A%09%5Eself%20stream'),
|
519
|
+
messageSends: ["stream"],
|
520
|
+
referencedClasses: []
|
521
|
+
}),
|
522
|
+
smalltalk.Collection);
|
523
|
+
|
524
|
+
smalltalk.addMethod(
|
525
|
+
unescape('_reject_'),
|
526
|
+
smalltalk.method({
|
527
|
+
selector: unescape('reject%3A'),
|
528
|
+
category: 'enumerating',
|
529
|
+
fn: function (aBlock){
|
530
|
+
var self=this;
|
531
|
+
return smalltalk.send(self, "_select_", [(function(each){return smalltalk.send(smalltalk.send(aBlock, "_value_", [each]), "__eq", [false]);})]);
|
532
|
+
return self;},
|
533
|
+
args: ["aBlock"],
|
534
|
+
source: unescape('reject%3A%20aBlock%0A%09%5Eself%20select%3A%20%5B%3Aeach%20%7C%20%28aBlock%20value%3A%20each%29%20%3D%20false%5D'),
|
535
|
+
messageSends: ["select:", unescape("%3D"), "value:"],
|
536
|
+
referencedClasses: []
|
537
|
+
}),
|
538
|
+
smalltalk.Collection);
|
539
|
+
|
540
|
+
smalltalk.addMethod(
|
541
|
+
unescape('_remove_'),
|
542
|
+
smalltalk.method({
|
543
|
+
selector: unescape('remove%3A'),
|
544
|
+
category: 'adding/removing',
|
545
|
+
fn: function (anObject){
|
546
|
+
var self=this;
|
547
|
+
return smalltalk.send(self, "_remove_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
|
548
|
+
return self;},
|
549
|
+
args: ["anObject"],
|
550
|
+
source: unescape('remove%3A%20anObject%0A%20%20%20%20%5Eself%20remove%3A%20anObject%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
|
551
|
+
messageSends: ["remove:ifAbsent:", "errorNotFound"],
|
552
|
+
referencedClasses: []
|
553
|
+
}),
|
554
|
+
smalltalk.Collection);
|
555
|
+
|
556
|
+
smalltalk.addMethod(
|
557
|
+
unescape('_remove_ifAbsent_'),
|
558
|
+
smalltalk.method({
|
559
|
+
selector: unescape('remove%3AifAbsent%3A'),
|
560
|
+
category: 'adding/removing',
|
561
|
+
fn: function (anObject, aBlock){
|
562
|
+
var self=this;
|
563
|
+
smalltalk.send(self, "_subclassResponsibility", []);
|
564
|
+
return self;},
|
565
|
+
args: ["anObject", "aBlock"],
|
566
|
+
source: unescape('remove%3A%20anObject%20ifAbsent%3A%20aBlock%0A%20%20%20%20self%20subclassResponsibility'),
|
567
|
+
messageSends: ["subclassResponsibility"],
|
568
|
+
referencedClasses: []
|
569
|
+
}),
|
570
|
+
smalltalk.Collection);
|
571
|
+
|
572
|
+
smalltalk.addMethod(
|
573
|
+
unescape('_select_'),
|
574
|
+
smalltalk.method({
|
575
|
+
selector: unescape('select%3A'),
|
576
|
+
category: 'enumerating',
|
577
|
+
fn: function (aBlock){
|
578
|
+
var self=this;
|
579
|
+
var stream=nil;
|
580
|
+
(stream=smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_new", []), "_writeStream", []));
|
581
|
+
smalltalk.send(self, "_do_", [(function(each){return ((($receiver = smalltalk.send(aBlock, "_value_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(stream, "_nextPut_", [each]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(stream, "_nextPut_", [each]);})]));})]);
|
582
|
+
return smalltalk.send(stream, "_contents", []);
|
583
|
+
return self;},
|
584
|
+
args: ["aBlock"],
|
585
|
+
source: unescape('select%3A%20aBlock%0A%09%7C%20stream%20%7C%0A%09stream%20%3A%3D%20self%20class%20new%20writeStream.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20%28aBlock%20value%3A%20each%29%20ifTrue%3A%20%5B%0A%09%09stream%20nextPut%3A%20each%5D%5D.%0A%09%5Estream%20contents'),
|
586
|
+
messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "value:", "nextPut:", "contents"],
|
587
|
+
referencedClasses: []
|
588
|
+
}),
|
589
|
+
smalltalk.Collection);
|
590
|
+
|
591
|
+
smalltalk.addMethod(
|
592
|
+
unescape('_size'),
|
593
|
+
smalltalk.method({
|
594
|
+
selector: unescape('size'),
|
595
|
+
category: 'accessing',
|
596
|
+
fn: function (){
|
597
|
+
var self=this;
|
598
|
+
smalltalk.send(self, "_subclassResponsibility", []);
|
599
|
+
return self;},
|
600
|
+
args: [],
|
601
|
+
source: unescape('size%0A%09self%20subclassResponsibility'),
|
602
|
+
messageSends: ["subclassResponsibility"],
|
603
|
+
referencedClasses: []
|
604
|
+
}),
|
605
|
+
smalltalk.Collection);
|
606
|
+
|
607
|
+
smalltalk.addMethod(
|
608
|
+
unescape('_stream'),
|
609
|
+
smalltalk.method({
|
610
|
+
selector: unescape('stream'),
|
611
|
+
category: 'accessing',
|
612
|
+
fn: function (){
|
613
|
+
var self=this;
|
614
|
+
return smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [self]);
|
615
|
+
return self;},
|
616
|
+
args: [],
|
617
|
+
source: unescape('stream%0A%09%5Eself%20streamClass%20on%3A%20self'),
|
618
|
+
messageSends: ["on:", "streamClass"],
|
619
|
+
referencedClasses: []
|
620
|
+
}),
|
621
|
+
smalltalk.Collection);
|
622
|
+
|
623
|
+
smalltalk.addMethod(
|
624
|
+
unescape('_streamClass'),
|
625
|
+
smalltalk.method({
|
626
|
+
selector: unescape('streamClass'),
|
627
|
+
category: 'accessing',
|
628
|
+
fn: function (){
|
629
|
+
var self=this;
|
630
|
+
return smalltalk.send(smalltalk.send(self, "_class", []), "_streamClass", []);
|
631
|
+
return self;},
|
632
|
+
args: [],
|
633
|
+
source: unescape('streamClass%0A%09%5Eself%20class%20streamClass'),
|
634
|
+
messageSends: ["streamClass", "class"],
|
635
|
+
referencedClasses: []
|
636
|
+
}),
|
637
|
+
smalltalk.Collection);
|
638
|
+
|
639
|
+
smalltalk.addMethod(
|
640
|
+
unescape('_writeStream'),
|
641
|
+
smalltalk.method({
|
642
|
+
selector: unescape('writeStream'),
|
643
|
+
category: 'accessing',
|
644
|
+
fn: function (){
|
645
|
+
var self=this;
|
646
|
+
return smalltalk.send(self, "_stream", []);
|
647
|
+
return self;},
|
648
|
+
args: [],
|
649
|
+
source: unescape('writeStream%0A%09%5Eself%20stream'),
|
650
|
+
messageSends: ["stream"],
|
651
|
+
referencedClasses: []
|
652
|
+
}),
|
653
|
+
smalltalk.Collection);
|
654
|
+
|
655
|
+
|
656
|
+
smalltalk.addMethod(
|
657
|
+
unescape('_new_'),
|
658
|
+
smalltalk.method({
|
659
|
+
selector: unescape('new%3A'),
|
660
|
+
category: 'instance creation',
|
661
|
+
fn: function (anInteger){
|
662
|
+
var self=this;
|
663
|
+
return smalltalk.send(self, "_new", []);
|
664
|
+
return self;},
|
665
|
+
args: ["anInteger"],
|
666
|
+
source: unescape('new%3A%20anInteger%0A%09%5Eself%20new'),
|
667
|
+
messageSends: ["new"],
|
668
|
+
referencedClasses: []
|
669
|
+
}),
|
670
|
+
smalltalk.Collection.klass);
|
671
|
+
|
672
|
+
smalltalk.addMethod(
|
673
|
+
unescape('_streamClass'),
|
674
|
+
smalltalk.method({
|
675
|
+
selector: unescape('streamClass'),
|
676
|
+
category: 'accessing',
|
677
|
+
fn: function (){
|
678
|
+
var self=this;
|
679
|
+
return (smalltalk.Stream || Stream);
|
680
|
+
return self;},
|
681
|
+
args: [],
|
682
|
+
source: unescape('streamClass%0A%09%20%20%20%20%5EStream'),
|
683
|
+
messageSends: [],
|
684
|
+
referencedClasses: ["Stream"]
|
685
|
+
}),
|
686
|
+
smalltalk.Collection.klass);
|
687
|
+
|
688
|
+
smalltalk.addMethod(
|
689
|
+
unescape('_with_'),
|
690
|
+
smalltalk.method({
|
691
|
+
selector: unescape('with%3A'),
|
692
|
+
category: 'instance creation',
|
693
|
+
fn: function (anObject){
|
694
|
+
var self=this;
|
695
|
+
return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
|
696
|
+
return self;},
|
697
|
+
args: ["anObject"],
|
698
|
+
source: unescape('with%3A%20anObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20anObject%3B%0A%09%09yourself'),
|
699
|
+
messageSends: ["add:", "yourself", "new"],
|
700
|
+
referencedClasses: []
|
701
|
+
}),
|
702
|
+
smalltalk.Collection.klass);
|
703
|
+
|
704
|
+
smalltalk.addMethod(
|
705
|
+
unescape('_with_with_'),
|
706
|
+
smalltalk.method({
|
707
|
+
selector: unescape('with%3Awith%3A'),
|
708
|
+
category: 'instance creation',
|
709
|
+
fn: function (anObject, anotherObject){
|
710
|
+
var self=this;
|
711
|
+
return (function($rec){smalltalk.send($rec, "_add_", [anObject]);smalltalk.send($rec, "_add_", [anotherObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
|
712
|
+
return self;},
|
713
|
+
args: ["anObject", "anotherObject"],
|
714
|
+
source: unescape('with%3A%20anObject%20with%3A%20anotherObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20anObject%3B%0A%09%09add%3A%20anotherObject%3B%0A%09%09yourself'),
|
715
|
+
messageSends: ["add:", "yourself", "new"],
|
716
|
+
referencedClasses: []
|
717
|
+
}),
|
718
|
+
smalltalk.Collection.klass);
|
719
|
+
|
720
|
+
smalltalk.addMethod(
|
721
|
+
unescape('_with_with_with_'),
|
722
|
+
smalltalk.method({
|
723
|
+
selector: unescape('with%3Awith%3Awith%3A'),
|
724
|
+
category: 'instance creation',
|
725
|
+
fn: function (firstObject, secondObject, thirdObject){
|
726
|
+
var self=this;
|
727
|
+
return (function($rec){smalltalk.send($rec, "_add_", [firstObject]);smalltalk.send($rec, "_add_", [secondObject]);smalltalk.send($rec, "_add_", [thirdObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
|
728
|
+
return self;},
|
729
|
+
args: ["firstObject", "secondObject", "thirdObject"],
|
730
|
+
source: unescape('with%3A%20firstObject%20with%3A%20secondObject%20with%3A%20thirdObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20firstObject%3B%0A%09%09add%3A%20secondObject%3B%0A%09%09add%3A%20thirdObject%3B%0A%09%09yourself'),
|
731
|
+
messageSends: ["add:", "yourself", "new"],
|
732
|
+
referencedClasses: []
|
733
|
+
}),
|
734
|
+
smalltalk.Collection.klass);
|
735
|
+
|
736
|
+
smalltalk.addMethod(
|
737
|
+
unescape('_withAll_'),
|
738
|
+
smalltalk.method({
|
739
|
+
selector: unescape('withAll%3A'),
|
740
|
+
category: 'instance creation',
|
741
|
+
fn: function (aCollection){
|
742
|
+
var self=this;
|
743
|
+
return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
|
744
|
+
return self;},
|
745
|
+
args: ["aCollection"],
|
746
|
+
source: unescape('withAll%3A%20aCollection%0A%09%20%20%20%20%5Eself%20new%0A%09%09addAll%3A%20aCollection%3B%0A%09%09yourself'),
|
747
|
+
messageSends: ["addAll:", "yourself", "new"],
|
748
|
+
referencedClasses: []
|
749
|
+
}),
|
750
|
+
smalltalk.Collection.klass);
|
751
|
+
|
752
|
+
|
753
|
+
smalltalk.addClass('HashedCollection', smalltalk.Collection, [], 'Kernel-Collections');
|
754
|
+
smalltalk.HashedCollection.comment=unescape('A%20HashedCollection%20is%20a%20traditional%20JavaScript%20object%2C%20or%20a%20Smalltalk%20Dictionary.%0A%0AUnlike%20a%20Dictionary%2C%20it%20can%20only%20have%20strings%20as%20keys.')
|
755
|
+
smalltalk.addMethod(
|
756
|
+
unescape('__comma'),
|
757
|
+
smalltalk.method({
|
758
|
+
selector: unescape('%2C'),
|
759
|
+
category: 'copying',
|
760
|
+
fn: function (aCollection){
|
761
|
+
var self=this;
|
762
|
+
smalltalk.send(self, "_shouldNotImplement", []);
|
763
|
+
return self;},
|
764
|
+
args: ["aCollection"],
|
765
|
+
source: unescape('%2C%20aCollection%0A%09self%20shouldNotImplement'),
|
766
|
+
messageSends: ["shouldNotImplement"],
|
767
|
+
referencedClasses: []
|
768
|
+
}),
|
769
|
+
smalltalk.HashedCollection);
|
770
|
+
|
771
|
+
smalltalk.addMethod(
|
772
|
+
unescape('__eq'),
|
773
|
+
smalltalk.method({
|
774
|
+
selector: unescape('%3D'),
|
775
|
+
category: 'comparing',
|
776
|
+
fn: function (aHashedCollection){
|
777
|
+
var self=this;
|
778
|
+
try{((($receiver = smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aHashedCollection, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
|
779
|
+
((($receiver = smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aHashedCollection, "_size", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
|
780
|
+
(function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return smalltalk.send(smalltalk.send(self, "_associations", []), "__eq", [smalltalk.send(aHashedCollection, "_associations", [])])}})})();
|
781
|
+
return self;
|
782
|
+
} catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
|
783
|
+
args: ["aHashedCollection"],
|
784
|
+
source: unescape('%3D%20aHashedCollection%0A%09self%20class%20%3D%20aHashedCollection%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20size%20%3D%20aHashedCollection%20size%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%5Eself%20associations%20%3D%20aHashedCollection%20associations'),
|
785
|
+
messageSends: ["ifFalse:", unescape("%3D"), "class", "size", "associations"],
|
786
|
+
referencedClasses: []
|
787
|
+
}),
|
788
|
+
smalltalk.HashedCollection);
|
789
|
+
|
790
|
+
smalltalk.addMethod(
|
791
|
+
unescape('_add_'),
|
792
|
+
smalltalk.method({
|
793
|
+
selector: unescape('add%3A'),
|
794
|
+
category: 'adding/removing',
|
795
|
+
fn: function (anAssociation){
|
796
|
+
var self=this;
|
797
|
+
smalltalk.send(self, "_at_put_", [smalltalk.send(anAssociation, "_key", []), smalltalk.send(anAssociation, "_value", [])]);
|
798
|
+
return self;},
|
799
|
+
args: ["anAssociation"],
|
800
|
+
source: unescape('add%3A%20anAssociation%0A%09self%20at%3A%20anAssociation%20key%20put%3A%20anAssociation%20value'),
|
801
|
+
messageSends: ["at:put:", "key", "value"],
|
802
|
+
referencedClasses: []
|
803
|
+
}),
|
804
|
+
smalltalk.HashedCollection);
|
805
|
+
|
806
|
+
smalltalk.addMethod(
|
807
|
+
unescape('_addAll_'),
|
808
|
+
smalltalk.method({
|
809
|
+
selector: unescape('addAll%3A'),
|
810
|
+
category: 'adding/removing',
|
811
|
+
fn: function (aHashedCollection){
|
812
|
+
var self=this;
|
813
|
+
smalltalk.send(self, "_addAll_", [smalltalk.send(aHashedCollection, "_associations", [])], smalltalk.Collection);
|
814
|
+
return aHashedCollection;
|
815
|
+
return self;},
|
816
|
+
args: ["aHashedCollection"],
|
817
|
+
source: unescape('addAll%3A%20aHashedCollection%0A%09super%20addAll%3A%20aHashedCollection%20associations.%0A%09%5EaHashedCollection'),
|
818
|
+
messageSends: ["addAll:", "associations"],
|
819
|
+
referencedClasses: []
|
820
|
+
}),
|
821
|
+
smalltalk.HashedCollection);
|
822
|
+
|
823
|
+
smalltalk.addMethod(
|
824
|
+
unescape('_asDictionary'),
|
825
|
+
smalltalk.method({
|
826
|
+
selector: unescape('asDictionary'),
|
827
|
+
category: 'converting',
|
828
|
+
fn: function (){
|
829
|
+
var self=this;
|
830
|
+
return smalltalk.send((smalltalk.Dictionary || Dictionary), "_fromPairs_", [smalltalk.send(self, "_associations", [])]);
|
831
|
+
return self;},
|
832
|
+
args: [],
|
833
|
+
source: unescape('asDictionary%0A%09%5EDictionary%20fromPairs%3A%20self%20associations'),
|
834
|
+
messageSends: ["fromPairs:", "associations"],
|
835
|
+
referencedClasses: ["Dictionary"]
|
836
|
+
}),
|
837
|
+
smalltalk.HashedCollection);
|
838
|
+
|
839
|
+
smalltalk.addMethod(
|
840
|
+
unescape('_asJSON'),
|
841
|
+
smalltalk.method({
|
842
|
+
selector: unescape('asJSON'),
|
843
|
+
category: 'converting',
|
844
|
+
fn: function (){
|
845
|
+
var self=this;
|
846
|
+
var c=nil;
|
847
|
+
(c=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
|
848
|
+
smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(c, "_at_put_", [key, smalltalk.send(value, "_asJSON", [])]);})]);
|
849
|
+
return c;
|
850
|
+
return self;},
|
851
|
+
args: [],
|
852
|
+
source: unescape('asJSON%0A%09%7C%20c%20%7C%0A%09c%20%3A%3D%20self%20class%20new.%0A%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%09c%20at%3A%20key%20put%3A%20value%20asJSON%5D.%0A%09%5Ec'),
|
853
|
+
messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "asJSON"],
|
854
|
+
referencedClasses: []
|
855
|
+
}),
|
856
|
+
smalltalk.HashedCollection);
|
857
|
+
|
858
|
+
smalltalk.addMethod(
|
859
|
+
unescape('_associations'),
|
860
|
+
smalltalk.method({
|
861
|
+
selector: unescape('associations'),
|
862
|
+
category: 'accessing',
|
863
|
+
fn: function (){
|
864
|
+
var self=this;
|
865
|
+
var associations=nil;
|
866
|
+
(associations=[]);
|
867
|
+
smalltalk.send(smalltalk.send(self, "_keys", []), "_do_", [(function(each){return smalltalk.send(associations, "_add_", [smalltalk.send((smalltalk.Association || Association), "_key_value_", [each, smalltalk.send(self, "_at_", [each])])]);})]);
|
868
|
+
return associations;
|
869
|
+
return self;},
|
870
|
+
args: [],
|
871
|
+
source: unescape('associations%0A%09%7C%20associations%20%7C%0A%09associations%20%3A%3D%20%23%28%29.%0A%09self%20keys%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20associations%20add%3A%20%28Association%20key%3A%20each%20value%3A%20%28self%20at%3A%20each%29%29%5D.%0A%09%5Eassociations'),
|
872
|
+
messageSends: ["do:", "keys", "add:", "key:value:", "at:"],
|
873
|
+
referencedClasses: ["Association"]
|
874
|
+
}),
|
875
|
+
smalltalk.HashedCollection);
|
876
|
+
|
877
|
+
smalltalk.addMethod(
|
878
|
+
unescape('_associationsDo_'),
|
879
|
+
smalltalk.method({
|
880
|
+
selector: unescape('associationsDo%3A'),
|
881
|
+
category: 'enumerating',
|
882
|
+
fn: function (aBlock){
|
883
|
+
var self=this;
|
884
|
+
smalltalk.send(smalltalk.send(self, "_associations", []), "_do_", [aBlock]);
|
885
|
+
return self;},
|
886
|
+
args: ["aBlock"],
|
887
|
+
source: unescape('associationsDo%3A%20aBlock%0A%09self%20associations%20do%3A%20aBlock'),
|
888
|
+
messageSends: ["do:", "associations"],
|
889
|
+
referencedClasses: []
|
890
|
+
}),
|
891
|
+
smalltalk.HashedCollection);
|
892
|
+
|
893
|
+
smalltalk.addMethod(
|
894
|
+
unescape('_at_'),
|
895
|
+
smalltalk.method({
|
896
|
+
selector: unescape('at%3A'),
|
897
|
+
category: 'accessing',
|
898
|
+
fn: function (aKey){
|
899
|
+
var self=this;
|
900
|
+
return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
|
901
|
+
return self;},
|
902
|
+
args: ["aKey"],
|
903
|
+
source: unescape('at%3A%20aKey%0A%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
|
904
|
+
messageSends: ["at:ifAbsent:", "errorNotFound"],
|
905
|
+
referencedClasses: []
|
906
|
+
}),
|
907
|
+
smalltalk.HashedCollection);
|
908
|
+
|
909
|
+
smalltalk.addMethod(
|
910
|
+
unescape('_at_ifAbsent_'),
|
911
|
+
smalltalk.method({
|
912
|
+
selector: unescape('at%3AifAbsent%3A'),
|
913
|
+
category: 'accessing',
|
914
|
+
fn: function (aKey, aBlock){
|
915
|
+
var self=this;
|
916
|
+
return smalltalk.send(smalltalk.send(self, "_includesKey_", [aKey]), "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_basicAt_", [aKey]);}), aBlock]);
|
917
|
+
return self;},
|
918
|
+
args: ["aKey", "aBlock"],
|
919
|
+
source: unescape('at%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%5E%28self%20includesKey%3A%20aKey%29%0A%09%09ifTrue%3A%20%5Bself%20basicAt%3A%20aKey%5D%0A%09%09ifFalse%3A%20aBlock'),
|
920
|
+
messageSends: ["ifTrue:ifFalse:", "includesKey:", "basicAt:"],
|
921
|
+
referencedClasses: []
|
922
|
+
}),
|
923
|
+
smalltalk.HashedCollection);
|
924
|
+
|
925
|
+
smalltalk.addMethod(
|
926
|
+
unescape('_at_ifAbsentPut_'),
|
927
|
+
smalltalk.method({
|
928
|
+
selector: unescape('at%3AifAbsentPut%3A'),
|
929
|
+
category: 'accessing',
|
930
|
+
fn: function (aKey, aBlock){
|
931
|
+
var self=this;
|
932
|
+
return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_at_put_", [aKey, smalltalk.send(aBlock, "_value", [])]);})]);
|
933
|
+
return self;},
|
934
|
+
args: ["aKey", "aBlock"],
|
935
|
+
source: unescape('at%3A%20aKey%20ifAbsentPut%3A%20aBlock%0A%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5B%0A%09%20%20%20%20self%20at%3A%20aKey%20put%3A%20aBlock%20value%5D'),
|
936
|
+
messageSends: ["at:ifAbsent:", "at:put:", "value"],
|
937
|
+
referencedClasses: []
|
938
|
+
}),
|
939
|
+
smalltalk.HashedCollection);
|
940
|
+
|
941
|
+
smalltalk.addMethod(
|
942
|
+
unescape('_at_ifPresent_'),
|
943
|
+
smalltalk.method({
|
944
|
+
selector: unescape('at%3AifPresent%3A'),
|
945
|
+
category: 'accessing',
|
946
|
+
fn: function (aKey, aBlock){
|
947
|
+
var self=this;
|
948
|
+
return (($receiver = smalltalk.send(self, "_basicAt_", [aKey])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})() : nil;
|
949
|
+
return self;},
|
950
|
+
args: ["aKey", "aBlock"],
|
951
|
+
source: unescape('at%3A%20aKey%20ifPresent%3A%20aBlock%0A%09%5E%28self%20basicAt%3A%20aKey%29%20ifNotNil%3A%20%5BaBlock%20value%3A%20%28self%20at%3A%20aKey%29%5D'),
|
952
|
+
messageSends: ["ifNotNil:", "basicAt:", "value:", "at:"],
|
953
|
+
referencedClasses: []
|
954
|
+
}),
|
955
|
+
smalltalk.HashedCollection);
|
956
|
+
|
957
|
+
smalltalk.addMethod(
|
958
|
+
unescape('_at_ifPresent_ifAbsent_'),
|
959
|
+
smalltalk.method({
|
960
|
+
selector: unescape('at%3AifPresent%3AifAbsent%3A'),
|
961
|
+
category: 'accessing',
|
962
|
+
fn: function (aKey, aBlock, anotherBlock){
|
963
|
+
var self=this;
|
964
|
+
return smalltalk.send(smalltalk.send(self, "_basicAt_", [aKey]), "_ifNil_ifNotNil_", [anotherBlock, (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})]);
|
965
|
+
return self;},
|
966
|
+
args: ["aKey", "aBlock", "anotherBlock"],
|
967
|
+
source: unescape('at%3A%20aKey%20ifPresent%3A%20aBlock%20ifAbsent%3A%20anotherBlock%0A%09%5E%28self%20basicAt%3A%20aKey%29%0A%09%20%20%20%20ifNil%3A%20anotherBlock%0A%09%20%20%20%20ifNotNil%3A%20%5BaBlock%20value%3A%20%28self%20at%3A%20aKey%29%5D'),
|
968
|
+
messageSends: ["ifNil:ifNotNil:", "basicAt:", "value:", "at:"],
|
969
|
+
referencedClasses: []
|
970
|
+
}),
|
971
|
+
smalltalk.HashedCollection);
|
972
|
+
|
973
|
+
smalltalk.addMethod(
|
974
|
+
unescape('_at_put_'),
|
975
|
+
smalltalk.method({
|
976
|
+
selector: unescape('at%3Aput%3A'),
|
977
|
+
category: 'accessing',
|
978
|
+
fn: function (aKey, aValue){
|
979
|
+
var self=this;
|
980
|
+
return smalltalk.send(self, "_basicAt_put_", [aKey, aValue]);
|
981
|
+
return self;},
|
982
|
+
args: ["aKey", "aValue"],
|
983
|
+
source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%09%5Eself%20basicAt%3A%20aKey%20put%3A%20aValue'),
|
984
|
+
messageSends: ["basicAt:put:"],
|
985
|
+
referencedClasses: []
|
986
|
+
}),
|
987
|
+
smalltalk.HashedCollection);
|
988
|
+
|
989
|
+
smalltalk.addMethod(
|
990
|
+
unescape('_collect_'),
|
991
|
+
smalltalk.method({
|
992
|
+
selector: unescape('collect%3A'),
|
993
|
+
category: 'enumerating',
|
994
|
+
fn: function (aBlock){
|
995
|
+
var self=this;
|
996
|
+
var newDict=nil;
|
997
|
+
(newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
|
998
|
+
smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(newDict, "_at_put_", [key, smalltalk.send(aBlock, "_value_", [value])]);})]);
|
999
|
+
return newDict;
|
1000
|
+
return self;},
|
1001
|
+
args: ["aBlock"],
|
1002
|
+
source: unescape('collect%3A%20aBlock%0A%09%7C%20newDict%20%7C%0A%09newDict%20%3A%3D%20self%20class%20new.%0A%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%20%20%20%20newDict%20at%3A%20key%20put%3A%20%28aBlock%20value%3A%20value%29%5D.%0A%09%5EnewDict'),
|
1003
|
+
messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "value:"],
|
1004
|
+
referencedClasses: []
|
1005
|
+
}),
|
1006
|
+
smalltalk.HashedCollection);
|
1007
|
+
|
1008
|
+
smalltalk.addMethod(
|
1009
|
+
unescape('_copyFrom_to_'),
|
1010
|
+
smalltalk.method({
|
1011
|
+
selector: unescape('copyFrom%3Ato%3A'),
|
1012
|
+
category: 'copying',
|
1013
|
+
fn: function (anIndex, anotherIndex){
|
1014
|
+
var self=this;
|
1015
|
+
smalltalk.send(self, "_shouldNotImplement", []);
|
1016
|
+
return self;},
|
1017
|
+
args: ["anIndex", "anotherIndex"],
|
1018
|
+
source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09self%20shouldNotImplement'),
|
1019
|
+
messageSends: ["shouldNotImplement"],
|
1020
|
+
referencedClasses: []
|
1021
|
+
}),
|
1022
|
+
smalltalk.HashedCollection);
|
1023
|
+
|
1024
|
+
smalltalk.addMethod(
|
1025
|
+
unescape('_deepCopy'),
|
1026
|
+
smalltalk.method({
|
1027
|
+
selector: unescape('deepCopy'),
|
1028
|
+
category: 'copying',
|
1029
|
+
fn: function (){
|
1030
|
+
var self=this;
|
1031
|
+
var copy=nil;
|
1032
|
+
(copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
|
1033
|
+
smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(copy, "_at_put_", [smalltalk.send(each, "_key", []), smalltalk.send(smalltalk.send(each, "_value", []), "_deepCopy", [])]);})]);
|
1034
|
+
return copy;
|
1035
|
+
return self;},
|
1036
|
+
args: [],
|
1037
|
+
source: unescape('deepCopy%0A%09%7C%20copy%20%7C%0A%09copy%20%3A%3D%20self%20class%20new.%0A%09self%20associationsDo%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20copy%20at%3A%20each%20key%20%20put%3A%20each%20value%20deepCopy%5D.%0A%09%5Ecopy'),
|
1038
|
+
messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "deepCopy", "value"],
|
1039
|
+
referencedClasses: []
|
1040
|
+
}),
|
1041
|
+
smalltalk.HashedCollection);
|
1042
|
+
|
1043
|
+
smalltalk.addMethod(
|
1044
|
+
unescape('_detect_ifNone_'),
|
1045
|
+
smalltalk.method({
|
1046
|
+
selector: unescape('detect%3AifNone%3A'),
|
1047
|
+
category: 'enumerating',
|
1048
|
+
fn: function (aBlock, anotherBlock){
|
1049
|
+
var self=this;
|
1050
|
+
return smalltalk.send(smalltalk.send(self, "_values", []), "_detect_ifNone_", [aBlock, anotherBlock]);
|
1051
|
+
return self;},
|
1052
|
+
args: ["aBlock", "anotherBlock"],
|
1053
|
+
source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eself%20values%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
|
1054
|
+
messageSends: ["detect:ifNone:", "values"],
|
1055
|
+
referencedClasses: []
|
1056
|
+
}),
|
1057
|
+
smalltalk.HashedCollection);
|
1058
|
+
|
1059
|
+
smalltalk.addMethod(
|
1060
|
+
unescape('_do_'),
|
1061
|
+
smalltalk.method({
|
1062
|
+
selector: unescape('do%3A'),
|
1063
|
+
category: 'enumerating',
|
1064
|
+
fn: function (aBlock){
|
1065
|
+
var self=this;
|
1066
|
+
smalltalk.send(smalltalk.send(self, "_values", []), "_do_", [aBlock]);
|
1067
|
+
return self;},
|
1068
|
+
args: ["aBlock"],
|
1069
|
+
source: unescape('do%3A%20aBlock%0A%09self%20values%20do%3A%20aBlock'),
|
1070
|
+
messageSends: ["do:", "values"],
|
1071
|
+
referencedClasses: []
|
1072
|
+
}),
|
1073
|
+
smalltalk.HashedCollection);
|
1074
|
+
|
1075
|
+
smalltalk.addMethod(
|
1076
|
+
unescape('_includes_'),
|
1077
|
+
smalltalk.method({
|
1078
|
+
selector: unescape('includes%3A'),
|
1079
|
+
category: 'enumerating',
|
1080
|
+
fn: function (anObject){
|
1081
|
+
var self=this;
|
1082
|
+
return smalltalk.send(smalltalk.send(self, "_values", []), "_includes_", [anObject]);
|
1083
|
+
return self;},
|
1084
|
+
args: ["anObject"],
|
1085
|
+
source: unescape('includes%3A%20anObject%0A%09%5Eself%20values%20includes%3A%20anObject'),
|
1086
|
+
messageSends: ["includes:", "values"],
|
1087
|
+
referencedClasses: []
|
1088
|
+
}),
|
1089
|
+
smalltalk.HashedCollection);
|
1090
|
+
|
1091
|
+
smalltalk.addMethod(
|
1092
|
+
unescape('_includesKey_'),
|
1093
|
+
smalltalk.method({
|
1094
|
+
selector: unescape('includesKey%3A'),
|
1095
|
+
category: 'testing',
|
1096
|
+
fn: function (aKey){
|
1097
|
+
var self=this;
|
1098
|
+
return self.hasOwnProperty(aKey);
|
1099
|
+
return self;},
|
1100
|
+
args: ["aKey"],
|
1101
|
+
source: unescape('includesKey%3A%20aKey%0A%09%3Creturn%20self.hasOwnProperty%28aKey%29%3E'),
|
1102
|
+
messageSends: [],
|
1103
|
+
referencedClasses: []
|
1104
|
+
}),
|
1105
|
+
smalltalk.HashedCollection);
|
1106
|
+
|
1107
|
+
smalltalk.addMethod(
|
1108
|
+
unescape('_keys'),
|
1109
|
+
smalltalk.method({
|
1110
|
+
selector: unescape('keys'),
|
1111
|
+
category: 'accessing',
|
1112
|
+
fn: function (){
|
1113
|
+
var self=this;
|
1114
|
+
|
1115
|
+
var keys = [];
|
1116
|
+
for(var i in self) {
|
1117
|
+
if(self.hasOwnProperty(i)) {
|
1118
|
+
keys.push(i);
|
1119
|
+
}
|
1120
|
+
};
|
1121
|
+
return keys;
|
1122
|
+
;
|
1123
|
+
return self;},
|
1124
|
+
args: [],
|
1125
|
+
source: unescape('keys%0A%09%3C%0A%09%09var%20keys%20%3D%20%5B%5D%3B%0A%09%09for%28var%20i%20in%20self%29%20%7B%0A%09%09%09if%28self.hasOwnProperty%28i%29%29%20%7B%0A%09%09%09%09keys.push%28i%29%3B%0A%09%09%09%7D%0A%09%09%7D%3B%0A%09%09return%20keys%3B%0A%09%3E'),
|
1126
|
+
messageSends: [],
|
1127
|
+
referencedClasses: []
|
1128
|
+
}),
|
1129
|
+
smalltalk.HashedCollection);
|
1130
|
+
|
1131
|
+
smalltalk.addMethod(
|
1132
|
+
unescape('_keysAndValuesDo_'),
|
1133
|
+
smalltalk.method({
|
1134
|
+
selector: unescape('keysAndValuesDo%3A'),
|
1135
|
+
category: 'enumerating',
|
1136
|
+
fn: function (aBlock){
|
1137
|
+
var self=this;
|
1138
|
+
smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(aBlock, "_value_value_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
|
1139
|
+
return self;},
|
1140
|
+
args: ["aBlock"],
|
1141
|
+
source: unescape('keysAndValuesDo%3A%20aBlock%0A%09self%20associationsDo%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20aBlock%20value%3A%20each%20key%20value%3A%20each%20value%5D'),
|
1142
|
+
messageSends: ["associationsDo:", "value:value:", "key", "value"],
|
1143
|
+
referencedClasses: []
|
1144
|
+
}),
|
1145
|
+
smalltalk.HashedCollection);
|
1146
|
+
|
1147
|
+
smalltalk.addMethod(
|
1148
|
+
unescape('_printString'),
|
1149
|
+
smalltalk.method({
|
1150
|
+
selector: unescape('printString'),
|
1151
|
+
category: 'printing',
|
1152
|
+
fn: function (){
|
1153
|
+
var self=this;
|
1154
|
+
return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(aStream){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Collection)]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%28")]);})(aStream);smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(anAssociation){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_key", []), "_printString", [])]);smalltalk.send($rec, "_nextPutAll_", [unescape("%20-%3E%20")]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_value", []), "_printString", [])]);})(aStream);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [unescape("%20%2C%20")]);})]);return smalltalk.send(aStream, "_nextPutAll_", [unescape("%29")]);})]);
|
1155
|
+
return self;},
|
1156
|
+
args: [],
|
1157
|
+
source: unescape('printString%0A%09%5EString%20streamContents%3A%20%5B%3AaStream%7C%20%20%0A%09%09aStream%20%0A%09%09%09nextPutAll%3A%20super%20printString%3B%0A%09%09%09nextPutAll%3A%20%27%28%27.%0A%09%09%09%09self%20associations%20%0A%09%09%09%09%09do%3A%20%5B%3AanAssociation%7C%20%20%0A%09%09%09%09%09%09aStream%20%0A%09%09%09%09%09%09%09nextPutAll%3A%20anAssociation%20key%20printString%3B%0A%09%09%09%09%09%09%09%09nextPutAll%3A%20%27%20-%3E%20%27%3B%0A%09%09%09%09%09%09%09%09nextPutAll%3A%20anAssociation%20value%20printString%5D%0A%09%09%09%09%09%09%09separatedBy%3A%20%5BaStream%20nextPutAll%3A%20%27%20%2C%20%27%5D.%0A%09%09%09%09%09%09aStream%20nextPutAll%3A%20%27%29%27%5D'),
|
1158
|
+
messageSends: ["streamContents:", "nextPutAll:", "printString", "do:separatedBy:", "associations", "key", "value"],
|
1159
|
+
referencedClasses: ["String"]
|
1160
|
+
}),
|
1161
|
+
smalltalk.HashedCollection);
|
1162
|
+
|
1163
|
+
smalltalk.addMethod(
|
1164
|
+
unescape('_remove_ifAbsent_'),
|
1165
|
+
smalltalk.method({
|
1166
|
+
selector: unescape('remove%3AifAbsent%3A'),
|
1167
|
+
category: 'adding/removing',
|
1168
|
+
fn: function (aKey, aBlock){
|
1169
|
+
var self=this;
|
1170
|
+
return smalltalk.send(self, "_removeKey_ifAbsent_", [aKey, aBlock]);
|
1171
|
+
return self;},
|
1172
|
+
args: ["aKey", "aBlock"],
|
1173
|
+
source: unescape('remove%3A%20aKey%20ifAbsent%3A%20aBlock%0A%20%20%20%20%5Eself%20removeKey%3A%20aKey%20ifAbsent%3A%20aBlock'),
|
1174
|
+
messageSends: ["removeKey:ifAbsent:"],
|
1175
|
+
referencedClasses: []
|
1176
|
+
}),
|
1177
|
+
smalltalk.HashedCollection);
|
1178
|
+
|
1179
|
+
smalltalk.addMethod(
|
1180
|
+
unescape('_removeKey_'),
|
1181
|
+
smalltalk.method({
|
1182
|
+
selector: unescape('removeKey%3A'),
|
1183
|
+
category: 'adding/removing',
|
1184
|
+
fn: function (aKey){
|
1185
|
+
var self=this;
|
1186
|
+
return smalltalk.send(self, "_remove_", [aKey]);
|
1187
|
+
return self;},
|
1188
|
+
args: ["aKey"],
|
1189
|
+
source: unescape('removeKey%3A%20aKey%0A%20%20%20%20%5Eself%20remove%3A%20aKey'),
|
1190
|
+
messageSends: ["remove:"],
|
1191
|
+
referencedClasses: []
|
1192
|
+
}),
|
1193
|
+
smalltalk.HashedCollection);
|
1194
|
+
|
1195
|
+
smalltalk.addMethod(
|
1196
|
+
unescape('_removeKey_ifAbsent_'),
|
1197
|
+
smalltalk.method({
|
1198
|
+
selector: unescape('removeKey%3AifAbsent%3A'),
|
1199
|
+
category: 'adding/removing',
|
1200
|
+
fn: function (aKey, aBlock){
|
1201
|
+
var self=this;
|
1202
|
+
return ((($receiver = smalltalk.send(self, "_includesKey_", [aKey])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(aBlock, "_value", []);})() : (function(){return smalltalk.send(self, "_basicDelete_", [aKey]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(aBlock, "_value", []);}), (function(){return smalltalk.send(self, "_basicDelete_", [aKey]);})]));
|
1203
|
+
return self;},
|
1204
|
+
args: ["aKey", "aBlock"],
|
1205
|
+
source: unescape('removeKey%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%5E%28self%20includesKey%3A%20aKey%29%20%0A%09%09ifFalse%3A%20%5BaBlock%20value%5D%0A%09%09ifTrue%3A%20%5Bself%20basicDelete%3A%20aKey%5D'),
|
1206
|
+
messageSends: ["ifFalse:ifTrue:", "includesKey:", "value", "basicDelete:"],
|
1207
|
+
referencedClasses: []
|
1208
|
+
}),
|
1209
|
+
smalltalk.HashedCollection);
|
1210
|
+
|
1211
|
+
smalltalk.addMethod(
|
1212
|
+
unescape('_select_'),
|
1213
|
+
smalltalk.method({
|
1214
|
+
selector: unescape('select%3A'),
|
1215
|
+
category: 'enumerating',
|
1216
|
+
fn: function (aBlock){
|
1217
|
+
var self=this;
|
1218
|
+
var newDict=nil;
|
1219
|
+
(newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
|
1220
|
+
smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return ((($receiver = smalltalk.send(aBlock, "_value_", [value])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(newDict, "_at_put_", [key, value]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(newDict, "_at_put_", [key, value]);})]));})]);
|
1221
|
+
return newDict;
|
1222
|
+
return self;},
|
1223
|
+
args: ["aBlock"],
|
1224
|
+
source: unescape('select%3A%20aBlock%0A%09%7C%20newDict%20%7C%0A%09newDict%20%3A%3D%20self%20class%20new.%0A%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%20%20%20%20%28aBlock%20value%3A%20value%29%20ifTrue%3A%20%5BnewDict%20at%3A%20key%20put%3A%20value%5D%5D.%0A%09%5EnewDict'),
|
1225
|
+
messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "value:", "at:put:"],
|
1226
|
+
referencedClasses: []
|
1227
|
+
}),
|
1228
|
+
smalltalk.HashedCollection);
|
1229
|
+
|
1230
|
+
smalltalk.addMethod(
|
1231
|
+
unescape('_shallowCopy'),
|
1232
|
+
smalltalk.method({
|
1233
|
+
selector: unescape('shallowCopy'),
|
1234
|
+
category: 'copying',
|
1235
|
+
fn: function (){
|
1236
|
+
var self=this;
|
1237
|
+
var copy=nil;
|
1238
|
+
(copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
|
1239
|
+
smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(copy, "_at_put_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
|
1240
|
+
return copy;
|
1241
|
+
return self;},
|
1242
|
+
args: [],
|
1243
|
+
source: unescape('shallowCopy%0A%09%7C%20copy%20%7C%0A%09copy%20%3A%3D%20self%20class%20new.%0A%09self%20associationsDo%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20copy%20at%3A%20each%20key%20%20put%3A%20each%20value%5D.%0A%09%5Ecopy'),
|
1244
|
+
messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "value"],
|
1245
|
+
referencedClasses: []
|
1246
|
+
}),
|
1247
|
+
smalltalk.HashedCollection);
|
1248
|
+
|
1249
|
+
smalltalk.addMethod(
|
1250
|
+
unescape('_size'),
|
1251
|
+
smalltalk.method({
|
1252
|
+
selector: unescape('size'),
|
1253
|
+
category: 'accessing',
|
1254
|
+
fn: function (){
|
1255
|
+
var self=this;
|
1256
|
+
return smalltalk.send(smalltalk.send(self, "_keys", []), "_size", []);
|
1257
|
+
return self;},
|
1258
|
+
args: [],
|
1259
|
+
source: unescape('size%0A%09%5Eself%20keys%20size'),
|
1260
|
+
messageSends: ["size", "keys"],
|
1261
|
+
referencedClasses: []
|
1262
|
+
}),
|
1263
|
+
smalltalk.HashedCollection);
|
1264
|
+
|
1265
|
+
smalltalk.addMethod(
|
1266
|
+
unescape('_storeOn_'),
|
1267
|
+
smalltalk.method({
|
1268
|
+
selector: unescape('storeOn%3A'),
|
1269
|
+
category: 'printing',
|
1270
|
+
fn: function (aStream){
|
1271
|
+
var self=this;
|
1272
|
+
smalltalk.send(aStream, "_nextPutAll_", [unescape("%23%7B")]);
|
1273
|
+
smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(each){return smalltalk.send(each, "_storeOn_", [aStream]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [". "]);})]);
|
1274
|
+
smalltalk.send(aStream, "_nextPutAll_", [unescape("%7D")]);
|
1275
|
+
return self;},
|
1276
|
+
args: ["aStream"],
|
1277
|
+
source: unescape('storeOn%3A%20aStream%0A%09aStream%20nextPutAll%3A%20%27%23%7B%27.%0A%09self%20associations%0A%09%09do%3A%20%5B%3Aeach%20%7C%20each%20storeOn%3A%20aStream%5D%0A%09%09separatedBy%3A%20%5B%20aStream%20nextPutAll%3A%20%27.%20%27%5D.%0A%09aStream%20nextPutAll%3A%20%27%7D%27'),
|
1278
|
+
messageSends: ["nextPutAll:", "do:separatedBy:", "associations", "storeOn:"],
|
1279
|
+
referencedClasses: []
|
1280
|
+
}),
|
1281
|
+
smalltalk.HashedCollection);
|
1282
|
+
|
1283
|
+
smalltalk.addMethod(
|
1284
|
+
unescape('_values'),
|
1285
|
+
smalltalk.method({
|
1286
|
+
selector: unescape('values'),
|
1287
|
+
category: 'accessing',
|
1288
|
+
fn: function (){
|
1289
|
+
var self=this;
|
1290
|
+
return smalltalk.send(smalltalk.send(self, "_keys", []), "_collect_", [(function(each){return smalltalk.send(self, "_at_", [each]);})]);
|
1291
|
+
return self;},
|
1292
|
+
args: [],
|
1293
|
+
source: unescape('values%0A%09%5Eself%20keys%20collect%3A%20%5B%3Aeach%20%7C%20self%20at%3A%20each%5D'),
|
1294
|
+
messageSends: ["collect:", "keys", "at:"],
|
1295
|
+
referencedClasses: []
|
1296
|
+
}),
|
1297
|
+
smalltalk.HashedCollection);
|
1298
|
+
|
1299
|
+
|
1300
|
+
smalltalk.addMethod(
|
1301
|
+
unescape('_fromPairs_'),
|
1302
|
+
smalltalk.method({
|
1303
|
+
selector: unescape('fromPairs%3A'),
|
1304
|
+
category: 'instance creation',
|
1305
|
+
fn: function (aCollection){
|
1306
|
+
var self=this;
|
1307
|
+
var dict=nil;
|
1308
|
+
(dict=smalltalk.send(self, "_new", []));
|
1309
|
+
smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(dict, "_add_", [each]);})]);
|
1310
|
+
return dict;
|
1311
|
+
return self;},
|
1312
|
+
args: ["aCollection"],
|
1313
|
+
source: unescape('fromPairs%3A%20aCollection%0A%09%7C%20dict%20%7C%0A%09dict%20%3A%3D%20self%20new.%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%20dict%20add%3A%20each%5D.%0A%09%5Edict'),
|
1314
|
+
messageSends: ["new", "do:", "add:"],
|
1315
|
+
referencedClasses: []
|
1316
|
+
}),
|
1317
|
+
smalltalk.HashedCollection.klass);
|
1318
|
+
|
1319
|
+
|
1320
|
+
smalltalk.addClass('Dictionary', smalltalk.HashedCollection, ['keys', 'values'], 'Kernel-Collections');
|
1321
|
+
smalltalk.addMethod(
|
1322
|
+
unescape('_asHashedCollection'),
|
1323
|
+
smalltalk.method({
|
1324
|
+
selector: unescape('asHashedCollection'),
|
1325
|
+
category: 'converting',
|
1326
|
+
fn: function (){
|
1327
|
+
var self=this;
|
1328
|
+
return smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_fromPairs_", [smalltalk.send(self, "_associations", [])]);
|
1329
|
+
return self;},
|
1330
|
+
args: [],
|
1331
|
+
source: unescape('asHashedCollection%0A%09%5EHashedCollection%20fromPairs%3A%20self%20associations'),
|
1332
|
+
messageSends: ["fromPairs:", "associations"],
|
1333
|
+
referencedClasses: ["HashedCollection"]
|
1334
|
+
}),
|
1335
|
+
smalltalk.Dictionary);
|
1336
|
+
|
1337
|
+
smalltalk.addMethod(
|
1338
|
+
unescape('_asJSON'),
|
1339
|
+
smalltalk.method({
|
1340
|
+
selector: unescape('asJSON'),
|
1341
|
+
category: 'converting',
|
1342
|
+
fn: function (){
|
1343
|
+
var self=this;
|
1344
|
+
return smalltalk.send(smalltalk.send(self, "_asHashedCollection", []), "_asJSON", []);
|
1345
|
+
return self;},
|
1346
|
+
args: [],
|
1347
|
+
source: unescape('asJSON%0A%09%5Eself%20asHashedCollection%20asJSON'),
|
1348
|
+
messageSends: ["asJSON", "asHashedCollection"],
|
1349
|
+
referencedClasses: []
|
1350
|
+
}),
|
1351
|
+
smalltalk.Dictionary);
|
1352
|
+
|
1353
|
+
smalltalk.addMethod(
|
1354
|
+
unescape('_at_ifAbsent_'),
|
1355
|
+
smalltalk.method({
|
1356
|
+
selector: unescape('at%3AifAbsent%3A'),
|
1357
|
+
category: 'accessing',
|
1358
|
+
fn: function (aKey, aBlock){
|
1359
|
+
var self=this;
|
1360
|
+
|
1361
|
+
var index;
|
1362
|
+
for(var i=0;i<self['@keys'].length;i++){
|
1363
|
+
if(self['@keys'][i].__eq(aKey)) {index = i;}
|
1364
|
+
};
|
1365
|
+
if(typeof index === 'undefined') {
|
1366
|
+
return aBlock();
|
1367
|
+
} else {
|
1368
|
+
return self['@values'][index];
|
1369
|
+
}
|
1370
|
+
;
|
1371
|
+
return self;},
|
1372
|
+
args: ["aKey", "aBlock"],
|
1373
|
+
source: unescape('at%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09var%20index%3B%0A%09%09for%28var%20i%3D0%3Bi%3Cself%5B%27@keys%27%5D.length%3Bi++%29%7B%0A%09%09%09if%28self%5B%27@keys%27%5D%5Bi%5D.__eq%28aKey%29%29%20%7Bindex%20%3D%20i%3B%7D%0A%09%09%7D%3B%0A%09%09if%28typeof%20index%20%3D%3D%3D%20%27undefined%27%29%20%7B%0A%09%09%09return%20aBlock%28%29%3B%0A%09%09%7D%20else%20%7B%0A%09%09%09return%20self%5B%27@values%27%5D%5Bindex%5D%3B%0A%09%09%7D%0A%09%3E'),
|
1374
|
+
messageSends: [],
|
1375
|
+
referencedClasses: []
|
1376
|
+
}),
|
1377
|
+
smalltalk.Dictionary);
|
1378
|
+
|
1379
|
+
smalltalk.addMethod(
|
1380
|
+
unescape('_at_put_'),
|
1381
|
+
smalltalk.method({
|
1382
|
+
selector: unescape('at%3Aput%3A'),
|
1383
|
+
category: 'accessing',
|
1384
|
+
fn: function (aKey, aValue){
|
1385
|
+
var self=this;
|
1386
|
+
|
1387
|
+
var index = self['@keys'].indexOf(aKey);
|
1388
|
+
if(index === -1) {
|
1389
|
+
self['@values'].push(aValue);
|
1390
|
+
self['@keys'].push(aKey);
|
1391
|
+
} else {
|
1392
|
+
self['@values'][index] = aValue;
|
1393
|
+
};
|
1394
|
+
|
1395
|
+
return aValue;
|
1396
|
+
;
|
1397
|
+
return self;},
|
1398
|
+
args: ["aKey", "aValue"],
|
1399
|
+
source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%09%3C%0A%09%09var%20index%20%3D%20self%5B%27@keys%27%5D.indexOf%28aKey%29%3B%0A%09%09if%28index%20%3D%3D%3D%20-1%29%20%7B%0A%09%09%09self%5B%27@values%27%5D.push%28aValue%29%3B%0A%09%09%09self%5B%27@keys%27%5D.push%28aKey%29%3B%0A%09%09%7D%20else%20%7B%0A%09%09%09self%5B%27@values%27%5D%5Bindex%5D%20%3D%20aValue%3B%0A%09%09%7D%3B%0A%0A%09%09return%20aValue%3B%0A%09%3E'),
|
1400
|
+
messageSends: [],
|
1401
|
+
referencedClasses: []
|
1402
|
+
}),
|
1403
|
+
smalltalk.Dictionary);
|
1404
|
+
|
1405
|
+
smalltalk.addMethod(
|
1406
|
+
unescape('_includesKey_'),
|
1407
|
+
smalltalk.method({
|
1408
|
+
selector: unescape('includesKey%3A'),
|
1409
|
+
category: 'testing',
|
1410
|
+
fn: function (aKey){
|
1411
|
+
var self=this;
|
1412
|
+
return smalltalk.send(self['@keys'], "_includes_", [aKey]);
|
1413
|
+
return self;},
|
1414
|
+
args: ["aKey"],
|
1415
|
+
source: unescape('includesKey%3A%20aKey%0A%09%5Ekeys%20includes%3A%20aKey'),
|
1416
|
+
messageSends: ["includes:"],
|
1417
|
+
referencedClasses: []
|
1418
|
+
}),
|
1419
|
+
smalltalk.Dictionary);
|
1420
|
+
|
1421
|
+
smalltalk.addMethod(
|
1422
|
+
unescape('_initialize'),
|
1423
|
+
smalltalk.method({
|
1424
|
+
selector: unescape('initialize'),
|
1425
|
+
category: 'initialization',
|
1426
|
+
fn: function (){
|
1427
|
+
var self=this;
|
1428
|
+
smalltalk.send(self, "_initialize", [], smalltalk.HashedCollection);
|
1429
|
+
(self['@keys']=[]);
|
1430
|
+
(self['@values']=[]);
|
1431
|
+
return self;},
|
1432
|
+
args: [],
|
1433
|
+
source: unescape('initialize%0A%09super%20initialize.%0A%09keys%20%3A%3D%20%23%28%29.%0A%09values%20%3A%3D%20%23%28%29'),
|
1434
|
+
messageSends: ["initialize"],
|
1435
|
+
referencedClasses: []
|
1436
|
+
}),
|
1437
|
+
smalltalk.Dictionary);
|
1438
|
+
|
1439
|
+
smalltalk.addMethod(
|
1440
|
+
unescape('_keys'),
|
1441
|
+
smalltalk.method({
|
1442
|
+
selector: unescape('keys'),
|
1443
|
+
category: 'accessing',
|
1444
|
+
fn: function (){
|
1445
|
+
var self=this;
|
1446
|
+
return smalltalk.send(self['@keys'], "_copy", []);
|
1447
|
+
return self;},
|
1448
|
+
args: [],
|
1449
|
+
source: unescape('keys%0A%09%5Ekeys%20copy'),
|
1450
|
+
messageSends: ["copy"],
|
1451
|
+
referencedClasses: []
|
1452
|
+
}),
|
1453
|
+
smalltalk.Dictionary);
|
1454
|
+
|
1455
|
+
smalltalk.addMethod(
|
1456
|
+
unescape('_removeKey_ifAbsent_'),
|
1457
|
+
smalltalk.method({
|
1458
|
+
selector: unescape('removeKey%3AifAbsent%3A'),
|
1459
|
+
category: 'adding/removing',
|
1460
|
+
fn: function (aKey, aBlock){
|
1461
|
+
var self=this;
|
1462
|
+
|
1463
|
+
var index = self['@keys'].indexOf(aKey);
|
1464
|
+
if(index === -1) {
|
1465
|
+
return aBlock()
|
1466
|
+
} else {
|
1467
|
+
var value;
|
1468
|
+
self['@keys'].splice(index, 1);
|
1469
|
+
value = self['@values'].splice(index, 1);
|
1470
|
+
return value[0];
|
1471
|
+
};
|
1472
|
+
;
|
1473
|
+
return self;},
|
1474
|
+
args: ["aKey", "aBlock"],
|
1475
|
+
source: unescape('removeKey%3A%20aKey%20ifAbsent%3A%20aBlock%0A%20%20%20%20%3C%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20index%20%3D%20self%5B%27@keys%27%5D.indexOf%28aKey%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28index%20%3D%3D%3D%20-1%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20aBlock%28%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20value%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%5B%27@keys%27%5D.splice%28index%2C%201%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20value%20%3D%20self%5B%27@values%27%5D.splice%28index%2C%201%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20value%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%3E'),
|
1476
|
+
messageSends: [],
|
1477
|
+
referencedClasses: []
|
1478
|
+
}),
|
1479
|
+
smalltalk.Dictionary);
|
1480
|
+
|
1481
|
+
smalltalk.addMethod(
|
1482
|
+
unescape('_values'),
|
1483
|
+
smalltalk.method({
|
1484
|
+
selector: unescape('values'),
|
1485
|
+
category: 'accessing',
|
1486
|
+
fn: function (){
|
1487
|
+
var self=this;
|
1488
|
+
return smalltalk.send(self['@values'], "_copy", []);
|
1489
|
+
return self;},
|
1490
|
+
args: [],
|
1491
|
+
source: unescape('values%0A%09%5Evalues%20copy'),
|
1492
|
+
messageSends: ["copy"],
|
1493
|
+
referencedClasses: []
|
1494
|
+
}),
|
1495
|
+
smalltalk.Dictionary);
|
1496
|
+
|
1497
|
+
|
1498
|
+
|
1499
|
+
smalltalk.addClass('SequenceableCollection', smalltalk.Collection, [], 'Kernel-Collections');
|
1500
|
+
smalltalk.addMethod(
|
1501
|
+
unescape('__eq'),
|
1502
|
+
smalltalk.method({
|
1503
|
+
selector: unescape('%3D'),
|
1504
|
+
category: 'comparing',
|
1505
|
+
fn: function (aCollection){
|
1506
|
+
var self=this;
|
1507
|
+
try{((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aCollection, "_size", [])]);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
|
1508
|
+
smalltalk.send(self, "_withIndexDo_", [(function(each, i){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_at_", [i]), "__eq", [each])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));})]);
|
1509
|
+
(function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return true}})})();
|
1510
|
+
return self;
|
1511
|
+
} catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
|
1512
|
+
args: ["aCollection"],
|
1513
|
+
source: unescape('%3D%20aCollection%0A%09%28self%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%09%09self%20size%20%3D%20aCollection%20size%5D%29%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20withIndexDo%3A%20%5B%3Aeach%20%3Ai%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28aCollection%20at%3A%20i%29%20%3D%20each%20ifFalse%3A%20%5B%5Efalse%5D%5D.%0A%09%5Etrue'),
|
1514
|
+
messageSends: ["ifFalse:", "and:", unescape("%3D"), "class", "size", "withIndexDo:", "at:"],
|
1515
|
+
referencedClasses: []
|
1516
|
+
}),
|
1517
|
+
smalltalk.SequenceableCollection);
|
1518
|
+
|
1519
|
+
smalltalk.addMethod(
|
1520
|
+
unescape('_addLast_'),
|
1521
|
+
smalltalk.method({
|
1522
|
+
selector: unescape('addLast%3A'),
|
1523
|
+
category: 'adding',
|
1524
|
+
fn: function (anObject){
|
1525
|
+
var self=this;
|
1526
|
+
smalltalk.send(self, "_add_", [anObject]);
|
1527
|
+
return self;},
|
1528
|
+
args: ["anObject"],
|
1529
|
+
source: unescape('addLast%3A%20anObject%0A%09self%20add%3A%20anObject'),
|
1530
|
+
messageSends: ["add:"],
|
1531
|
+
referencedClasses: []
|
1532
|
+
}),
|
1533
|
+
smalltalk.SequenceableCollection);
|
1534
|
+
|
1535
|
+
smalltalk.addMethod(
|
1536
|
+
unescape('_allButFirst'),
|
1537
|
+
smalltalk.method({
|
1538
|
+
selector: unescape('allButFirst'),
|
1539
|
+
category: 'accessing',
|
1540
|
+
fn: function (){
|
1541
|
+
var self=this;
|
1542
|
+
return smalltalk.send(self, "_copyFrom_to_", [(2), smalltalk.send(self, "_size", [])]);
|
1543
|
+
return self;},
|
1544
|
+
args: [],
|
1545
|
+
source: unescape('allButFirst%0A%09%5Eself%20copyFrom%3A%202%20to%3A%20self%20size'),
|
1546
|
+
messageSends: ["copyFrom:to:", "size"],
|
1547
|
+
referencedClasses: []
|
1548
|
+
}),
|
1549
|
+
smalltalk.SequenceableCollection);
|
1550
|
+
|
1551
|
+
smalltalk.addMethod(
|
1552
|
+
unescape('_allButLast'),
|
1553
|
+
smalltalk.method({
|
1554
|
+
selector: unescape('allButLast'),
|
1555
|
+
category: 'accessing',
|
1556
|
+
fn: function (){
|
1557
|
+
var self=this;
|
1558
|
+
return smalltalk.send(self, "_copyFrom_to_", [(1), ((($receiver = smalltalk.send(self, "_size", [])).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]);
|
1559
|
+
return self;},
|
1560
|
+
args: [],
|
1561
|
+
source: unescape('allButLast%0A%09%5Eself%20copyFrom%3A%201%20to%3A%20self%20size%20-%201'),
|
1562
|
+
messageSends: ["copyFrom:to:", unescape("-"), "size"],
|
1563
|
+
referencedClasses: []
|
1564
|
+
}),
|
1565
|
+
smalltalk.SequenceableCollection);
|
1566
|
+
|
1567
|
+
smalltalk.addMethod(
|
1568
|
+
unescape('_at_'),
|
1569
|
+
smalltalk.method({
|
1570
|
+
selector: unescape('at%3A'),
|
1571
|
+
category: 'accessing',
|
1572
|
+
fn: function (anIndex){
|
1573
|
+
var self=this;
|
1574
|
+
return smalltalk.send(self, "_at_ifAbsent_", [anIndex, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
|
1575
|
+
return self;},
|
1576
|
+
args: ["anIndex"],
|
1577
|
+
source: unescape('at%3A%20anIndex%0A%09%5Eself%20at%3A%20anIndex%20ifAbsent%3A%20%5B%0A%09%20%20%20%20self%20errorNotFound%5D'),
|
1578
|
+
messageSends: ["at:ifAbsent:", "errorNotFound"],
|
1579
|
+
referencedClasses: []
|
1580
|
+
}),
|
1581
|
+
smalltalk.SequenceableCollection);
|
1582
|
+
|
1583
|
+
smalltalk.addMethod(
|
1584
|
+
unescape('_at_ifAbsent_'),
|
1585
|
+
smalltalk.method({
|
1586
|
+
selector: unescape('at%3AifAbsent%3A'),
|
1587
|
+
category: 'accessing',
|
1588
|
+
fn: function (anIndex, aBlock){
|
1589
|
+
var self=this;
|
1590
|
+
smalltalk.send(self, "_subclassResponsibility", []);
|
1591
|
+
return self;},
|
1592
|
+
args: ["anIndex", "aBlock"],
|
1593
|
+
source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09self%20subclassResponsibility'),
|
1594
|
+
messageSends: ["subclassResponsibility"],
|
1595
|
+
referencedClasses: []
|
1596
|
+
}),
|
1597
|
+
smalltalk.SequenceableCollection);
|
1598
|
+
|
1599
|
+
smalltalk.addMethod(
|
1600
|
+
unescape('_at_put_'),
|
1601
|
+
smalltalk.method({
|
1602
|
+
selector: unescape('at%3Aput%3A'),
|
1603
|
+
category: 'accessing',
|
1604
|
+
fn: function (anIndex, anObject){
|
1605
|
+
var self=this;
|
1606
|
+
smalltalk.send(self, "_subclassResponsibility", []);
|
1607
|
+
return self;},
|
1608
|
+
args: ["anIndex", "anObject"],
|
1609
|
+
source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09self%20subclassResponsibility'),
|
1610
|
+
messageSends: ["subclassResponsibility"],
|
1611
|
+
referencedClasses: []
|
1612
|
+
}),
|
1613
|
+
smalltalk.SequenceableCollection);
|
1614
|
+
|
1615
|
+
smalltalk.addMethod(
|
1616
|
+
unescape('_atRandom'),
|
1617
|
+
smalltalk.method({
|
1618
|
+
selector: unescape('atRandom'),
|
1619
|
+
category: 'accessing',
|
1620
|
+
fn: function (){
|
1621
|
+
var self=this;
|
1622
|
+
return smalltalk.send(self, "_at_", [smalltalk.send(smalltalk.send(self, "_size", []), "_atRandom", [])]);
|
1623
|
+
return self;},
|
1624
|
+
args: [],
|
1625
|
+
source: unescape('atRandom%0A%09%5E%20self%20at%3A%20self%20size%20atRandom'),
|
1626
|
+
messageSends: ["at:", "atRandom", "size"],
|
1627
|
+
referencedClasses: []
|
1628
|
+
}),
|
1629
|
+
smalltalk.SequenceableCollection);
|
1630
|
+
|
1631
|
+
smalltalk.addMethod(
|
1632
|
+
unescape('_copyFrom_to_'),
|
1633
|
+
smalltalk.method({
|
1634
|
+
selector: unescape('copyFrom%3Ato%3A'),
|
1635
|
+
category: 'copying',
|
1636
|
+
fn: function (anIndex, anotherIndex){
|
1637
|
+
var self=this;
|
1638
|
+
var range=nil;
|
1639
|
+
var newCollection=nil;
|
1640
|
+
(range=smalltalk.send(anIndex, "_to_", [anotherIndex]));
|
1641
|
+
(newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(range, "_size", [])]));
|
1642
|
+
smalltalk.send(range, "_withIndexDo_", [(function(each, i){return smalltalk.send(newCollection, "_at_put_", [i, smalltalk.send(self, "_at_", [each])]);})]);
|
1643
|
+
return newCollection;
|
1644
|
+
return self;},
|
1645
|
+
args: ["anIndex", "anotherIndex"],
|
1646
|
+
source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%7C%20range%20newCollection%20%7C%0A%09range%20%3A%3D%20anIndex%20to%3A%20anotherIndex.%0A%09newCollection%20%3A%3D%20self%20class%20new%3A%20range%20size.%0A%09range%20withIndexDo%3A%20%5B%3Aeach%20%3Ai%20%7C%0A%09%20%20%20%20newCollection%20at%3A%20i%20put%3A%20%28self%20at%3A%20each%29%5D.%0A%09%5EnewCollection'),
|
1647
|
+
messageSends: ["to:", "new:", "class", "size", "withIndexDo:", "at:put:", "at:"],
|
1648
|
+
referencedClasses: []
|
1649
|
+
}),
|
1650
|
+
smalltalk.SequenceableCollection);
|
1651
|
+
|
1652
|
+
smalltalk.addMethod(
|
1653
|
+
unescape('_deepCopy'),
|
1654
|
+
smalltalk.method({
|
1655
|
+
selector: unescape('deepCopy'),
|
1656
|
+
category: 'copying',
|
1657
|
+
fn: function (){
|
1658
|
+
var self=this;
|
1659
|
+
var newCollection=nil;
|
1660
|
+
(newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(self, "_size", [])]));
|
1661
|
+
smalltalk.send(self, "_withIndexDo_", [(function(each, index){return smalltalk.send(newCollection, "_at_put_", [index, smalltalk.send(each, "_deepCopy", [])]);})]);
|
1662
|
+
return newCollection;
|
1663
|
+
return self;},
|
1664
|
+
args: [],
|
1665
|
+
source: unescape('deepCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new%3A%20self%20size.%0A%09self%20withIndexDo%3A%20%5B%3Aeach%20%3Aindex%20%7C%20%0A%09%09newCollection%20at%3A%20index%20put%3A%20each%20deepCopy%5D.%0A%09%5EnewCollection'),
|
1666
|
+
messageSends: ["new:", "class", "size", "withIndexDo:", "at:put:", "deepCopy"],
|
1667
|
+
referencedClasses: []
|
1668
|
+
}),
|
1669
|
+
smalltalk.SequenceableCollection);
|
1670
|
+
|
1671
|
+
smalltalk.addMethod(
|
1672
|
+
unescape('_first'),
|
1673
|
+
smalltalk.method({
|
1674
|
+
selector: unescape('first'),
|
1675
|
+
category: 'accessing',
|
1676
|
+
fn: function (){
|
1677
|
+
var self=this;
|
1678
|
+
return smalltalk.send(self, "_at_", [(1)]);
|
1679
|
+
return self;},
|
1680
|
+
args: [],
|
1681
|
+
source: unescape('first%0A%09%5Eself%20at%3A%201'),
|
1682
|
+
messageSends: ["at:"],
|
1683
|
+
referencedClasses: []
|
1684
|
+
}),
|
1685
|
+
smalltalk.SequenceableCollection);
|
1686
|
+
|
1687
|
+
smalltalk.addMethod(
|
1688
|
+
unescape('_first_'),
|
1689
|
+
smalltalk.method({
|
1690
|
+
selector: unescape('first%3A'),
|
1691
|
+
category: 'accessing',
|
1692
|
+
fn: function (n){
|
1693
|
+
var self=this;
|
1694
|
+
return smalltalk.send(self, "_copyFrom_to_", [(1), n]);
|
1695
|
+
return self;},
|
1696
|
+
args: ["n"],
|
1697
|
+
source: unescape('first%3A%20n%0A%09%22Answer%20the%20first%20n%20elements%20of%20the%20receiver.%0A%09Raise%20an%20error%20if%20there%20are%20not%20enough%20elements.%22%0A%0A%09%5E%20self%20copyFrom%3A%201%20to%3A%20n'),
|
1698
|
+
messageSends: ["copyFrom:to:"],
|
1699
|
+
referencedClasses: []
|
1700
|
+
}),
|
1701
|
+
smalltalk.SequenceableCollection);
|
1702
|
+
|
1703
|
+
smalltalk.addMethod(
|
1704
|
+
unescape('_fourth'),
|
1705
|
+
smalltalk.method({
|
1706
|
+
selector: unescape('fourth'),
|
1707
|
+
category: 'accessing',
|
1708
|
+
fn: function (){
|
1709
|
+
var self=this;
|
1710
|
+
return smalltalk.send(self, "_at_", [(4)]);
|
1711
|
+
return self;},
|
1712
|
+
args: [],
|
1713
|
+
source: unescape('fourth%0A%09%5Eself%20at%3A%204'),
|
1714
|
+
messageSends: ["at:"],
|
1715
|
+
referencedClasses: []
|
1716
|
+
}),
|
1717
|
+
smalltalk.SequenceableCollection);
|
1718
|
+
|
1719
|
+
smalltalk.addMethod(
|
1720
|
+
unescape('_indexOf_'),
|
1721
|
+
smalltalk.method({
|
1722
|
+
selector: unescape('indexOf%3A'),
|
1723
|
+
category: 'accessing',
|
1724
|
+
fn: function (anObject){
|
1725
|
+
var self=this;
|
1726
|
+
return smalltalk.send(self, "_indexOf_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
|
1727
|
+
return self;},
|
1728
|
+
args: ["anObject"],
|
1729
|
+
source: unescape('indexOf%3A%20anObject%0A%09%5Eself%20indexOf%3A%20anObject%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
|
1730
|
+
messageSends: ["indexOf:ifAbsent:", "errorNotFound"],
|
1731
|
+
referencedClasses: []
|
1732
|
+
}),
|
1733
|
+
smalltalk.SequenceableCollection);
|
1734
|
+
|
1735
|
+
smalltalk.addMethod(
|
1736
|
+
unescape('_indexOf_ifAbsent_'),
|
1737
|
+
smalltalk.method({
|
1738
|
+
selector: unescape('indexOf%3AifAbsent%3A'),
|
1739
|
+
category: 'accessing',
|
1740
|
+
fn: function (anObject, aBlock){
|
1741
|
+
var self=this;
|
1742
|
+
|
1743
|
+
for(var i=0;i<self.length;i++){
|
1744
|
+
if(self[i].__eq(anObject)) {return i+1}
|
1745
|
+
}
|
1746
|
+
return aBlock();
|
1747
|
+
;
|
1748
|
+
return self;},
|
1749
|
+
args: ["anObject", "aBlock"],
|
1750
|
+
source: unescape('indexOf%3A%20anObject%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09for%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7B%0A%09%09%09if%28self%5Bi%5D.__eq%28anObject%29%29%20%7Breturn%20i+1%7D%0A%09%09%7D%0A%09%09return%20aBlock%28%29%3B%0A%09%3E'),
|
1751
|
+
messageSends: [],
|
1752
|
+
referencedClasses: []
|
1753
|
+
}),
|
1754
|
+
smalltalk.SequenceableCollection);
|
1755
|
+
|
1756
|
+
smalltalk.addMethod(
|
1757
|
+
unescape('_indexOf_startingAt_'),
|
1758
|
+
smalltalk.method({
|
1759
|
+
selector: unescape('indexOf%3AstartingAt%3A'),
|
1760
|
+
category: 'accessing',
|
1761
|
+
fn: function (anObject, start){
|
1762
|
+
var self=this;
|
1763
|
+
return smalltalk.send(self, "_indexOf_startingAt_ifAbsent_", [anObject, start, (function(){return (0);})]);
|
1764
|
+
return self;},
|
1765
|
+
args: ["anObject", "start"],
|
1766
|
+
source: unescape('indexOf%3A%20anObject%20startingAt%3A%20start%0A%09%22Answer%20the%20index%20of%20the%20first%20occurence%20of%20anElement%20after%20start%0A%09within%20the%20receiver.%20If%20the%20receiver%20does%20not%20contain%20anElement%2C%20%0A%09answer%200.%22%0A%09%5Eself%20indexOf%3A%20anObject%20startingAt%3A%20start%20ifAbsent%3A%20%5B0%5D'),
|
1767
|
+
messageSends: ["indexOf:startingAt:ifAbsent:"],
|
1768
|
+
referencedClasses: []
|
1769
|
+
}),
|
1770
|
+
smalltalk.SequenceableCollection);
|
1771
|
+
|
1772
|
+
smalltalk.addMethod(
|
1773
|
+
unescape('_indexOf_startingAt_ifAbsent_'),
|
1774
|
+
smalltalk.method({
|
1775
|
+
selector: unescape('indexOf%3AstartingAt%3AifAbsent%3A'),
|
1776
|
+
category: 'accessing',
|
1777
|
+
fn: function (anObject, start, aBlock){
|
1778
|
+
var self=this;
|
1779
|
+
|
1780
|
+
for(var i=start-1;i<self.length;i++){
|
1781
|
+
if(self[i].__eq(anObject)) {return i+1}
|
1782
|
+
}
|
1783
|
+
return aBlock();
|
1784
|
+
;
|
1785
|
+
return self;},
|
1786
|
+
args: ["anObject", "start", "aBlock"],
|
1787
|
+
source: unescape('indexOf%3A%20anObject%20startingAt%3A%20start%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09for%28var%20i%3Dstart-1%3Bi%3Cself.length%3Bi++%29%7B%0A%09%09%09if%28self%5Bi%5D.__eq%28anObject%29%29%20%7Breturn%20i+1%7D%0A%09%09%7D%0A%09%09return%20aBlock%28%29%3B%0A%09%3E'),
|
1788
|
+
messageSends: [],
|
1789
|
+
referencedClasses: []
|
1790
|
+
}),
|
1791
|
+
smalltalk.SequenceableCollection);
|
1792
|
+
|
1793
|
+
smalltalk.addMethod(
|
1794
|
+
unescape('_last'),
|
1795
|
+
smalltalk.method({
|
1796
|
+
selector: unescape('last'),
|
1797
|
+
category: 'accessing',
|
1798
|
+
fn: function (){
|
1799
|
+
var self=this;
|
1800
|
+
return smalltalk.send(self, "_at_", [smalltalk.send(self, "_size", [])]);
|
1801
|
+
return self;},
|
1802
|
+
args: [],
|
1803
|
+
source: unescape('last%0A%09%5Eself%20at%3A%20self%20size'),
|
1804
|
+
messageSends: ["at:", "size"],
|
1805
|
+
referencedClasses: []
|
1806
|
+
}),
|
1807
|
+
smalltalk.SequenceableCollection);
|
1808
|
+
|
1809
|
+
smalltalk.addMethod(
|
1810
|
+
unescape('_printString'),
|
1811
|
+
smalltalk.method({
|
1812
|
+
selector: unescape('printString'),
|
1813
|
+
category: 'printing',
|
1814
|
+
fn: function (){
|
1815
|
+
var self=this;
|
1816
|
+
var str=nil;
|
1817
|
+
(str=smalltalk.send("", "_writeStream", []));
|
1818
|
+
smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.Collection), "__comma", [unescape("%20%28")])]);
|
1819
|
+
smalltalk.send(self, "_do_separatedBy_", [(function(each){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(each, "_printString", [])]);}), (function(){return smalltalk.send(str, "_nextPutAll_", [" "]);})]);
|
1820
|
+
smalltalk.send(str, "_nextPutAll_", [unescape("%29")]);
|
1821
|
+
return smalltalk.send(str, "_contents", []);
|
1822
|
+
return self;},
|
1823
|
+
args: [],
|
1824
|
+
source: unescape('printString%0A%09%7C%20str%20%7C%0A%09str%20%3A%3D%20%27%27%20writeStream.%0A%09str%20nextPutAll%3A%20super%20printString%2C%20%27%20%28%27.%0A%09self%20%0A%09%09do%3A%20%5B%3Aeach%20%7C%20str%20nextPutAll%3A%20each%20printString%5D%0A%09%09separatedBy%3A%20%5Bstr%20nextPutAll%3A%20%27%20%27%5D.%0A%09str%20nextPutAll%3A%20%27%29%27.%0A%09%5Estr%20contents'),
|
1825
|
+
messageSends: ["writeStream", "nextPutAll:", unescape("%2C"), "printString", "do:separatedBy:", "contents"],
|
1826
|
+
referencedClasses: []
|
1827
|
+
}),
|
1828
|
+
smalltalk.SequenceableCollection);
|
1829
|
+
|
1830
|
+
smalltalk.addMethod(
|
1831
|
+
unescape('_removeLast'),
|
1832
|
+
smalltalk.method({
|
1833
|
+
selector: unescape('removeLast'),
|
1834
|
+
category: 'adding',
|
1835
|
+
fn: function (){
|
1836
|
+
var self=this;
|
1837
|
+
smalltalk.send(self, "_remove_", [smalltalk.send(self, "_last", [])]);
|
1838
|
+
return self;},
|
1839
|
+
args: [],
|
1840
|
+
source: unescape('removeLast%0A%09self%20remove%3A%20self%20last'),
|
1841
|
+
messageSends: ["remove:", "last"],
|
1842
|
+
referencedClasses: []
|
1843
|
+
}),
|
1844
|
+
smalltalk.SequenceableCollection);
|
1845
|
+
|
1846
|
+
smalltalk.addMethod(
|
1847
|
+
unescape('_reversed'),
|
1848
|
+
smalltalk.method({
|
1849
|
+
selector: unescape('reversed'),
|
1850
|
+
category: 'converting',
|
1851
|
+
fn: function (){
|
1852
|
+
var self=this;
|
1853
|
+
smalltalk.send(self, "_subclassResponsibility", []);
|
1854
|
+
return self;},
|
1855
|
+
args: [],
|
1856
|
+
source: unescape('reversed%0A%09self%20subclassResponsibility'),
|
1857
|
+
messageSends: ["subclassResponsibility"],
|
1858
|
+
referencedClasses: []
|
1859
|
+
}),
|
1860
|
+
smalltalk.SequenceableCollection);
|
1861
|
+
|
1862
|
+
smalltalk.addMethod(
|
1863
|
+
unescape('_second'),
|
1864
|
+
smalltalk.method({
|
1865
|
+
selector: unescape('second'),
|
1866
|
+
category: 'accessing',
|
1867
|
+
fn: function (){
|
1868
|
+
var self=this;
|
1869
|
+
return smalltalk.send(self, "_at_", [(2)]);
|
1870
|
+
return self;},
|
1871
|
+
args: [],
|
1872
|
+
source: unescape('second%0A%09%5Eself%20at%3A%202'),
|
1873
|
+
messageSends: ["at:"],
|
1874
|
+
referencedClasses: []
|
1875
|
+
}),
|
1876
|
+
smalltalk.SequenceableCollection);
|
1877
|
+
|
1878
|
+
smalltalk.addMethod(
|
1879
|
+
unescape('_shallowCopy'),
|
1880
|
+
smalltalk.method({
|
1881
|
+
selector: unescape('shallowCopy'),
|
1882
|
+
category: 'copying',
|
1883
|
+
fn: function (){
|
1884
|
+
var self=this;
|
1885
|
+
var newCollection=nil;
|
1886
|
+
(newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(self, "_size", [])]));
|
1887
|
+
smalltalk.send(self, "_withIndexDo_", [(function(each, index){return smalltalk.send(newCollection, "_at_put_", [index, each]);})]);
|
1888
|
+
return newCollection;
|
1889
|
+
return self;},
|
1890
|
+
args: [],
|
1891
|
+
source: unescape('shallowCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new%3A%20self%20size.%0A%09self%20withIndexDo%3A%20%5B%20%3Aeach%20%3Aindex%20%7C%20%0A%09%09newCollection%20at%3A%20index%20put%3A%20each%5D.%0A%09%5EnewCollection'),
|
1892
|
+
messageSends: ["new:", "class", "size", "withIndexDo:", "at:put:"],
|
1893
|
+
referencedClasses: []
|
1894
|
+
}),
|
1895
|
+
smalltalk.SequenceableCollection);
|
1896
|
+
|
1897
|
+
smalltalk.addMethod(
|
1898
|
+
unescape('_third'),
|
1899
|
+
smalltalk.method({
|
1900
|
+
selector: unescape('third'),
|
1901
|
+
category: 'accessing',
|
1902
|
+
fn: function (){
|
1903
|
+
var self=this;
|
1904
|
+
return smalltalk.send(self, "_at_", [(3)]);
|
1905
|
+
return self;},
|
1906
|
+
args: [],
|
1907
|
+
source: unescape('third%0A%09%5Eself%20at%3A%203'),
|
1908
|
+
messageSends: ["at:"],
|
1909
|
+
referencedClasses: []
|
1910
|
+
}),
|
1911
|
+
smalltalk.SequenceableCollection);
|
1912
|
+
|
1913
|
+
smalltalk.addMethod(
|
1914
|
+
unescape('_withIndexDo_'),
|
1915
|
+
smalltalk.method({
|
1916
|
+
selector: unescape('withIndexDo%3A'),
|
1917
|
+
category: 'enumerating',
|
1918
|
+
fn: function (aBlock){
|
1919
|
+
var self=this;
|
1920
|
+
for(var i=0;i<self.length;i++){aBlock(self[i], i+1);};
|
1921
|
+
return self;},
|
1922
|
+
args: ["aBlock"],
|
1923
|
+
source: unescape('withIndexDo%3A%20aBlock%0A%09%3Cfor%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7BaBlock%28self%5Bi%5D%2C%20i+1%29%3B%7D%3E'),
|
1924
|
+
messageSends: [],
|
1925
|
+
referencedClasses: []
|
1926
|
+
}),
|
1927
|
+
smalltalk.SequenceableCollection);
|
1928
|
+
|
1929
|
+
|
1930
|
+
|
1931
|
+
smalltalk.addClass('Array', smalltalk.SequenceableCollection, [], 'Kernel-Collections');
|
1932
|
+
smalltalk.addMethod(
|
1933
|
+
unescape('_add_'),
|
1934
|
+
smalltalk.method({
|
1935
|
+
selector: unescape('add%3A'),
|
1936
|
+
category: 'adding/removing',
|
1937
|
+
fn: function (anObject){
|
1938
|
+
var self=this;
|
1939
|
+
self.push(anObject); return anObject;;
|
1940
|
+
return self;},
|
1941
|
+
args: ["anObject"],
|
1942
|
+
source: unescape('add%3A%20anObject%0A%09%3Cself.push%28anObject%29%3B%20return%20anObject%3B%3E'),
|
1943
|
+
messageSends: [],
|
1944
|
+
referencedClasses: []
|
1945
|
+
}),
|
1946
|
+
smalltalk.Array);
|
1947
|
+
|
1948
|
+
smalltalk.addMethod(
|
1949
|
+
unescape('_asJavascript'),
|
1950
|
+
smalltalk.method({
|
1951
|
+
selector: unescape('asJavascript'),
|
1952
|
+
category: 'converting',
|
1953
|
+
fn: function (){
|
1954
|
+
var self=this;
|
1955
|
+
return smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [smalltalk.send(smalltalk.send(self, "_collect_", [(function(each){return smalltalk.send(each, "_asJavascript", []);})]), "_join_", [unescape("%2C%20")])]), "__comma", [unescape("%5D")]);
|
1956
|
+
return self;},
|
1957
|
+
args: [],
|
1958
|
+
source: unescape('asJavascript%0A%09%5E%27%5B%27%2C%20%28%28self%20collect%3A%20%5B%3Aeach%20%7C%20each%20asJavascript%5D%29%20join%3A%20%27%2C%20%27%29%2C%20%20%27%5D%27'),
|
1959
|
+
messageSends: [unescape("%2C"), "join:", "collect:", "asJavascript"],
|
1960
|
+
referencedClasses: []
|
1961
|
+
}),
|
1962
|
+
smalltalk.Array);
|
1963
|
+
|
1964
|
+
smalltalk.addMethod(
|
1965
|
+
unescape('_at_ifAbsent_'),
|
1966
|
+
smalltalk.method({
|
1967
|
+
selector: unescape('at%3AifAbsent%3A'),
|
1968
|
+
category: 'accessing',
|
1969
|
+
fn: function (anIndex, aBlock){
|
1970
|
+
var self=this;
|
1971
|
+
|
1972
|
+
var value = self[anIndex - 1];
|
1973
|
+
if(value === undefined) {
|
1974
|
+
return aBlock();
|
1975
|
+
} else {
|
1976
|
+
return value;
|
1977
|
+
}
|
1978
|
+
;
|
1979
|
+
return self;},
|
1980
|
+
args: ["anIndex", "aBlock"],
|
1981
|
+
source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%20%20%20%20var%20value%20%3D%20self%5BanIndex%20-%201%5D%3B%0A%09%20%20%20%20if%28value%20%3D%3D%3D%20undefined%29%20%7B%0A%09%09return%20aBlock%28%29%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20value%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
|
1982
|
+
messageSends: [],
|
1983
|
+
referencedClasses: []
|
1984
|
+
}),
|
1985
|
+
smalltalk.Array);
|
1986
|
+
|
1987
|
+
smalltalk.addMethod(
|
1988
|
+
unescape('_at_put_'),
|
1989
|
+
smalltalk.method({
|
1990
|
+
selector: unescape('at%3Aput%3A'),
|
1991
|
+
category: 'accessing',
|
1992
|
+
fn: function (anIndex, anObject){
|
1993
|
+
var self=this;
|
1994
|
+
return self[anIndex - 1] = anObject;
|
1995
|
+
return self;},
|
1996
|
+
args: ["anIndex", "anObject"],
|
1997
|
+
source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%20%3D%20anObject%3E'),
|
1998
|
+
messageSends: [],
|
1999
|
+
referencedClasses: []
|
2000
|
+
}),
|
2001
|
+
smalltalk.Array);
|
2002
|
+
|
2003
|
+
smalltalk.addMethod(
|
2004
|
+
unescape('_join_'),
|
2005
|
+
smalltalk.method({
|
2006
|
+
selector: unescape('join%3A'),
|
2007
|
+
category: 'enumerating',
|
2008
|
+
fn: function (aString){
|
2009
|
+
var self=this;
|
2010
|
+
return self.join(aString);
|
2011
|
+
return self;},
|
2012
|
+
args: ["aString"],
|
2013
|
+
source: unescape('join%3A%20aString%0A%09%3Creturn%20self.join%28aString%29%3E'),
|
2014
|
+
messageSends: [],
|
2015
|
+
referencedClasses: []
|
2016
|
+
}),
|
2017
|
+
smalltalk.Array);
|
2018
|
+
|
2019
|
+
smalltalk.addMethod(
|
2020
|
+
unescape('_remove_'),
|
2021
|
+
smalltalk.method({
|
2022
|
+
selector: unescape('remove%3A'),
|
2023
|
+
category: 'adding/removing',
|
2024
|
+
fn: function (anObject){
|
2025
|
+
var self=this;
|
2026
|
+
|
2027
|
+
for(var i=0;i<self.length;i++) {
|
2028
|
+
if(self[i] == anObject) {
|
2029
|
+
self.splice(i,1);
|
2030
|
+
break;
|
2031
|
+
}
|
2032
|
+
}
|
2033
|
+
;
|
2034
|
+
return self;},
|
2035
|
+
args: ["anObject"],
|
2036
|
+
source: unescape('remove%3A%20anObject%0A%09%3C%0A%09%09for%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%20%7B%0A%09%09%09if%28self%5Bi%5D%20%3D%3D%20anObject%29%20%7B%0A%09%09%09%09self.splice%28i%2C1%29%3B%0A%09%09%09%09break%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%3E'),
|
2037
|
+
messageSends: [],
|
2038
|
+
referencedClasses: []
|
2039
|
+
}),
|
2040
|
+
smalltalk.Array);
|
2041
|
+
|
2042
|
+
smalltalk.addMethod(
|
2043
|
+
unescape('_removeFrom_to_'),
|
2044
|
+
smalltalk.method({
|
2045
|
+
selector: unescape('removeFrom%3Ato%3A'),
|
2046
|
+
category: 'adding/removing',
|
2047
|
+
fn: function (aNumber, anotherNumber){
|
2048
|
+
var self=this;
|
2049
|
+
self.splice(aNumber - 1,anotherNumber - 1);
|
2050
|
+
return self;},
|
2051
|
+
args: ["aNumber", "anotherNumber"],
|
2052
|
+
source: unescape('removeFrom%3A%20aNumber%20to%3A%20anotherNumber%0A%09%3Cself.splice%28aNumber%20-%201%2CanotherNumber%20-%201%29%3E'),
|
2053
|
+
messageSends: [],
|
2054
|
+
referencedClasses: []
|
2055
|
+
}),
|
2056
|
+
smalltalk.Array);
|
2057
|
+
|
2058
|
+
smalltalk.addMethod(
|
2059
|
+
unescape('_reversed'),
|
2060
|
+
smalltalk.method({
|
2061
|
+
selector: unescape('reversed'),
|
2062
|
+
category: 'converting',
|
2063
|
+
fn: function (){
|
2064
|
+
var self=this;
|
2065
|
+
return self._copy().reverse();
|
2066
|
+
return self;},
|
2067
|
+
args: [],
|
2068
|
+
source: unescape('reversed%0A%09%3Creturn%20self._copy%28%29.reverse%28%29%3E'),
|
2069
|
+
messageSends: [],
|
2070
|
+
referencedClasses: []
|
2071
|
+
}),
|
2072
|
+
smalltalk.Array);
|
2073
|
+
|
2074
|
+
smalltalk.addMethod(
|
2075
|
+
unescape('_size'),
|
2076
|
+
smalltalk.method({
|
2077
|
+
selector: unescape('size'),
|
2078
|
+
category: 'accessing',
|
2079
|
+
fn: function (){
|
2080
|
+
var self=this;
|
2081
|
+
return self.length;
|
2082
|
+
return self;},
|
2083
|
+
args: [],
|
2084
|
+
source: unescape('size%0A%09%3Creturn%20self.length%3E'),
|
2085
|
+
messageSends: [],
|
2086
|
+
referencedClasses: []
|
2087
|
+
}),
|
2088
|
+
smalltalk.Array);
|
2089
|
+
|
2090
|
+
smalltalk.addMethod(
|
2091
|
+
unescape('_sort'),
|
2092
|
+
smalltalk.method({
|
2093
|
+
selector: unescape('sort'),
|
2094
|
+
category: 'enumerating',
|
2095
|
+
fn: function (){
|
2096
|
+
var self=this;
|
2097
|
+
return smalltalk.send(self, "_basicPerform_", ["sort"]);
|
2098
|
+
return self;},
|
2099
|
+
args: [],
|
2100
|
+
source: unescape('sort%0A%20%20%20%20%5Eself%20basicPerform%3A%20%27sort%27'),
|
2101
|
+
messageSends: ["basicPerform:"],
|
2102
|
+
referencedClasses: []
|
2103
|
+
}),
|
2104
|
+
smalltalk.Array);
|
2105
|
+
|
2106
|
+
smalltalk.addMethod(
|
2107
|
+
unescape('_sort_'),
|
2108
|
+
smalltalk.method({
|
2109
|
+
selector: unescape('sort%3A'),
|
2110
|
+
category: 'enumerating',
|
2111
|
+
fn: function (aBlock){
|
2112
|
+
var self=this;
|
2113
|
+
|
2114
|
+
return self.sort(function(a, b) {
|
2115
|
+
if(aBlock(a,b)) {return -1} else {return 1}
|
2116
|
+
})
|
2117
|
+
;
|
2118
|
+
return self;},
|
2119
|
+
args: ["aBlock"],
|
2120
|
+
source: unescape('sort%3A%20aBlock%0A%09%3C%0A%09%09return%20self.sort%28function%28a%2C%20b%29%20%7B%0A%09%09%09if%28aBlock%28a%2Cb%29%29%20%7Breturn%20-1%7D%20else%20%7Breturn%201%7D%0A%09%09%7D%29%0A%09%3E'),
|
2121
|
+
messageSends: [],
|
2122
|
+
referencedClasses: []
|
2123
|
+
}),
|
2124
|
+
smalltalk.Array);
|
2125
|
+
|
2126
|
+
smalltalk.addMethod(
|
2127
|
+
unescape('_sorted'),
|
2128
|
+
smalltalk.method({
|
2129
|
+
selector: unescape('sorted'),
|
2130
|
+
category: 'enumerating',
|
2131
|
+
fn: function (){
|
2132
|
+
var self=this;
|
2133
|
+
return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort", []);
|
2134
|
+
return self;},
|
2135
|
+
args: [],
|
2136
|
+
source: unescape('sorted%0A%09%5Eself%20copy%20sort'),
|
2137
|
+
messageSends: ["sort", "copy"],
|
2138
|
+
referencedClasses: []
|
2139
|
+
}),
|
2140
|
+
smalltalk.Array);
|
2141
|
+
|
2142
|
+
smalltalk.addMethod(
|
2143
|
+
unescape('_sorted_'),
|
2144
|
+
smalltalk.method({
|
2145
|
+
selector: unescape('sorted%3A'),
|
2146
|
+
category: 'enumerating',
|
2147
|
+
fn: function (aBlock){
|
2148
|
+
var self=this;
|
2149
|
+
return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
|
2150
|
+
return self;},
|
2151
|
+
args: ["aBlock"],
|
2152
|
+
source: unescape('sorted%3A%20aBlock%0A%09%5Eself%20copy%20sort%3A%20aBlock'),
|
2153
|
+
messageSends: ["sort:", "copy"],
|
2154
|
+
referencedClasses: []
|
2155
|
+
}),
|
2156
|
+
smalltalk.Array);
|
2157
|
+
|
2158
|
+
|
2159
|
+
smalltalk.addMethod(
|
2160
|
+
unescape('_new_'),
|
2161
|
+
smalltalk.method({
|
2162
|
+
selector: unescape('new%3A'),
|
2163
|
+
category: 'instance creation',
|
2164
|
+
fn: function (anInteger){
|
2165
|
+
var self=this;
|
2166
|
+
return new Array(anInteger);
|
2167
|
+
return self;},
|
2168
|
+
args: ["anInteger"],
|
2169
|
+
source: unescape('new%3A%20anInteger%0A%09%3Creturn%20new%20Array%28anInteger%29%3E'),
|
2170
|
+
messageSends: [],
|
2171
|
+
referencedClasses: []
|
2172
|
+
}),
|
2173
|
+
smalltalk.Array.klass);
|
2174
|
+
|
2175
|
+
smalltalk.addMethod(
|
2176
|
+
unescape('_with_'),
|
2177
|
+
smalltalk.method({
|
2178
|
+
selector: unescape('with%3A'),
|
2179
|
+
category: 'instance creation',
|
2180
|
+
fn: function (anObject){
|
2181
|
+
var self=this;
|
2182
|
+
return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(1)]));
|
2183
|
+
return self;},
|
2184
|
+
args: ["anObject"],
|
2185
|
+
source: unescape('with%3A%20anObject%0A%09%20%20%20%20%5E%28self%20new%3A%201%29%0A%09%09at%3A%201%20put%3A%20anObject%3B%0A%09%09yourself'),
|
2186
|
+
messageSends: ["at:put:", "yourself", "new:"],
|
2187
|
+
referencedClasses: []
|
2188
|
+
}),
|
2189
|
+
smalltalk.Array.klass);
|
2190
|
+
|
2191
|
+
smalltalk.addMethod(
|
2192
|
+
unescape('_with_with_'),
|
2193
|
+
smalltalk.method({
|
2194
|
+
selector: unescape('with%3Awith%3A'),
|
2195
|
+
category: 'instance creation',
|
2196
|
+
fn: function (anObject, anObject2){
|
2197
|
+
var self=this;
|
2198
|
+
return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(2)]));
|
2199
|
+
return self;},
|
2200
|
+
args: ["anObject", "anObject2"],
|
2201
|
+
source: unescape('with%3A%20anObject%20with%3A%20anObject2%0A%09%20%20%20%20%5E%28self%20new%3A%202%29%0A%09%09at%3A%201%20put%3A%20anObject%3B%0A%09%09at%3A%202%20put%3A%20anObject2%3B%0A%09%09yourself'),
|
2202
|
+
messageSends: ["at:put:", "yourself", "new:"],
|
2203
|
+
referencedClasses: []
|
2204
|
+
}),
|
2205
|
+
smalltalk.Array.klass);
|
2206
|
+
|
2207
|
+
smalltalk.addMethod(
|
2208
|
+
unescape('_with_with_with_'),
|
2209
|
+
smalltalk.method({
|
2210
|
+
selector: unescape('with%3Awith%3Awith%3A'),
|
2211
|
+
category: 'instance creation',
|
2212
|
+
fn: function (anObject, anObject2, anObject3){
|
2213
|
+
var self=this;
|
2214
|
+
return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);smalltalk.send($rec, "_at_put_", [(3), anObject3]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(3)]));
|
2215
|
+
return self;},
|
2216
|
+
args: ["anObject", "anObject2", "anObject3"],
|
2217
|
+
source: unescape('with%3A%20anObject%20with%3A%20anObject2%20with%3A%20anObject3%0A%09%20%20%20%20%5E%28self%20new%3A%203%29%0A%09%09at%3A%201%20put%3A%20anObject%3B%0A%09%09at%3A%202%20put%3A%20anObject2%3B%0A%09%09at%3A%203%20put%3A%20anObject3%3B%0A%09%09yourself'),
|
2218
|
+
messageSends: ["at:put:", "yourself", "new:"],
|
2219
|
+
referencedClasses: []
|
2220
|
+
}),
|
2221
|
+
smalltalk.Array.klass);
|
2222
|
+
|
2223
|
+
smalltalk.addMethod(
|
2224
|
+
unescape('_withAll_'),
|
2225
|
+
smalltalk.method({
|
2226
|
+
selector: unescape('withAll%3A'),
|
2227
|
+
category: 'instance creation',
|
2228
|
+
fn: function (aCollection){
|
2229
|
+
var self=this;
|
2230
|
+
var instance=nil;
|
2231
|
+
(instance=smalltalk.send(self, "_new_", [smalltalk.send(aCollection, "_size", [])]));
|
2232
|
+
smalltalk.send(aCollection, "_withIndexDo_", [(function(each, index){return smalltalk.send(instance, "_at_put_", [index, each]);})]);
|
2233
|
+
return instance;
|
2234
|
+
return self;},
|
2235
|
+
args: ["aCollection"],
|
2236
|
+
source: unescape('withAll%3A%20aCollection%0A%09%7C%20instance%20%7C%0A%09instance%20%3A%3D%20self%20new%3A%20aCollection%20size.%0A%09aCollection%20withIndexDo%3A%20%5B%3Aeach%20%3Aindex%20%20%7C%0A%09%09instance%20at%3A%20index%20put%3A%20each%5D.%0A%09%5Einstance'),
|
2237
|
+
messageSends: ["new:", "size", "withIndexDo:", "at:put:"],
|
2238
|
+
referencedClasses: []
|
2239
|
+
}),
|
2240
|
+
smalltalk.Array.klass);
|
2241
|
+
|
2242
|
+
|
2243
|
+
smalltalk.addClass('CharacterArray', smalltalk.SequenceableCollection, [], 'Kernel-Collections');
|
2244
|
+
smalltalk.addMethod(
|
2245
|
+
unescape('__comma'),
|
2246
|
+
smalltalk.method({
|
2247
|
+
selector: unescape('%2C'),
|
2248
|
+
category: 'copying',
|
2249
|
+
fn: function (aString){
|
2250
|
+
var self=this;
|
2251
|
+
return smalltalk.send(smalltalk.send(self, "_asString", []), "__comma", [smalltalk.send(aString, "_asString", [])]);
|
2252
|
+
return self;},
|
2253
|
+
args: ["aString"],
|
2254
|
+
source: unescape('%2C%20aString%0A%09%5Eself%20asString%2C%20aString%20asString'),
|
2255
|
+
messageSends: [unescape("%2C"), "asString"],
|
2256
|
+
referencedClasses: []
|
2257
|
+
}),
|
2258
|
+
smalltalk.CharacterArray);
|
2259
|
+
|
2260
|
+
smalltalk.addMethod(
|
2261
|
+
unescape('_add_'),
|
2262
|
+
smalltalk.method({
|
2263
|
+
selector: unescape('add%3A'),
|
2264
|
+
category: 'adding',
|
2265
|
+
fn: function (anObject){
|
2266
|
+
var self=this;
|
2267
|
+
smalltalk.send(self, "_errorReadOnly", []);
|
2268
|
+
return self;},
|
2269
|
+
args: ["anObject"],
|
2270
|
+
source: unescape('add%3A%20anObject%0A%09self%20errorReadOnly'),
|
2271
|
+
messageSends: ["errorReadOnly"],
|
2272
|
+
referencedClasses: []
|
2273
|
+
}),
|
2274
|
+
smalltalk.CharacterArray);
|
2275
|
+
|
2276
|
+
smalltalk.addMethod(
|
2277
|
+
unescape('_asLowercase'),
|
2278
|
+
smalltalk.method({
|
2279
|
+
selector: unescape('asLowercase'),
|
2280
|
+
category: 'converting',
|
2281
|
+
fn: function (){
|
2282
|
+
var self=this;
|
2283
|
+
return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_asLowercase", [])]);
|
2284
|
+
return self;},
|
2285
|
+
args: [],
|
2286
|
+
source: unescape('asLowercase%0A%09%5Eself%20class%20fromString%3A%20self%20asString%20asLowercase'),
|
2287
|
+
messageSends: ["fromString:", "class", "asLowercase", "asString"],
|
2288
|
+
referencedClasses: []
|
2289
|
+
}),
|
2290
|
+
smalltalk.CharacterArray);
|
2291
|
+
|
2292
|
+
smalltalk.addMethod(
|
2293
|
+
unescape('_asNumber'),
|
2294
|
+
smalltalk.method({
|
2295
|
+
selector: unescape('asNumber'),
|
2296
|
+
category: 'converting',
|
2297
|
+
fn: function (){
|
2298
|
+
var self=this;
|
2299
|
+
return smalltalk.send(smalltalk.send(self, "_asString", []), "_asNumber", []);
|
2300
|
+
return self;},
|
2301
|
+
args: [],
|
2302
|
+
source: unescape('asNumber%0A%09%5Eself%20asString%20asNumber'),
|
2303
|
+
messageSends: ["asNumber", "asString"],
|
2304
|
+
referencedClasses: []
|
2305
|
+
}),
|
2306
|
+
smalltalk.CharacterArray);
|
2307
|
+
|
2308
|
+
smalltalk.addMethod(
|
2309
|
+
unescape('_asString'),
|
2310
|
+
smalltalk.method({
|
2311
|
+
selector: unescape('asString'),
|
2312
|
+
category: 'converting',
|
2313
|
+
fn: function (){
|
2314
|
+
var self=this;
|
2315
|
+
return smalltalk.send(self, "_subclassResponsibility", []);
|
2316
|
+
return self;},
|
2317
|
+
args: [],
|
2318
|
+
source: unescape('asString%0A%09%5Eself%20subclassResponsibility'),
|
2319
|
+
messageSends: ["subclassResponsibility"],
|
2320
|
+
referencedClasses: []
|
2321
|
+
}),
|
2322
|
+
smalltalk.CharacterArray);
|
2323
|
+
|
2324
|
+
smalltalk.addMethod(
|
2325
|
+
unescape('_asSymbol'),
|
2326
|
+
smalltalk.method({
|
2327
|
+
selector: unescape('asSymbol'),
|
2328
|
+
category: 'converting',
|
2329
|
+
fn: function (){
|
2330
|
+
var self=this;
|
2331
|
+
return smalltalk.send(self, "_subclassResponsibility", []);
|
2332
|
+
return self;},
|
2333
|
+
args: [],
|
2334
|
+
source: unescape('asSymbol%0A%09%5Eself%20subclassResponsibility'),
|
2335
|
+
messageSends: ["subclassResponsibility"],
|
2336
|
+
referencedClasses: []
|
2337
|
+
}),
|
2338
|
+
smalltalk.CharacterArray);
|
2339
|
+
|
2340
|
+
smalltalk.addMethod(
|
2341
|
+
unescape('_asUppercase'),
|
2342
|
+
smalltalk.method({
|
2343
|
+
selector: unescape('asUppercase'),
|
2344
|
+
category: 'converting',
|
2345
|
+
fn: function (){
|
2346
|
+
var self=this;
|
2347
|
+
return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_asUppercase", [])]);
|
2348
|
+
return self;},
|
2349
|
+
args: [],
|
2350
|
+
source: unescape('asUppercase%0A%09%5Eself%20class%20fromString%3A%20self%20asString%20asUppercase'),
|
2351
|
+
messageSends: ["fromString:", "class", "asUppercase", "asString"],
|
2352
|
+
referencedClasses: []
|
2353
|
+
}),
|
2354
|
+
smalltalk.CharacterArray);
|
2355
|
+
|
2356
|
+
smalltalk.addMethod(
|
2357
|
+
unescape('_at_put_'),
|
2358
|
+
smalltalk.method({
|
2359
|
+
selector: unescape('at%3Aput%3A'),
|
2360
|
+
category: 'accessing',
|
2361
|
+
fn: function (anIndex, anObject){
|
2362
|
+
var self=this;
|
2363
|
+
smalltalk.send(self, "_errorReadOnly", []);
|
2364
|
+
return self;},
|
2365
|
+
args: ["anIndex", "anObject"],
|
2366
|
+
source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09self%20errorReadOnly'),
|
2367
|
+
messageSends: ["errorReadOnly"],
|
2368
|
+
referencedClasses: []
|
2369
|
+
}),
|
2370
|
+
smalltalk.CharacterArray);
|
2371
|
+
|
2372
|
+
smalltalk.addMethod(
|
2373
|
+
unescape('_errorReadOnly'),
|
2374
|
+
smalltalk.method({
|
2375
|
+
selector: unescape('errorReadOnly'),
|
2376
|
+
category: 'error handling',
|
2377
|
+
fn: function (){
|
2378
|
+
var self=this;
|
2379
|
+
smalltalk.send(self, "_error_", [unescape("Object%20is%20read-only")]);
|
2380
|
+
return self;},
|
2381
|
+
args: [],
|
2382
|
+
source: unescape('errorReadOnly%0A%09self%20error%3A%20%27Object%20is%20read-only%27'),
|
2383
|
+
messageSends: ["error:"],
|
2384
|
+
referencedClasses: []
|
2385
|
+
}),
|
2386
|
+
smalltalk.CharacterArray);
|
2387
|
+
|
2388
|
+
smalltalk.addMethod(
|
2389
|
+
unescape('_printString'),
|
2390
|
+
smalltalk.method({
|
2391
|
+
selector: unescape('printString'),
|
2392
|
+
category: 'printing',
|
2393
|
+
fn: function (){
|
2394
|
+
var self=this;
|
2395
|
+
return smalltalk.send(smalltalk.send(self, "_asString", []), "_printString", []);
|
2396
|
+
return self;},
|
2397
|
+
args: [],
|
2398
|
+
source: unescape('printString%0A%09%5Eself%20asString%20printString'),
|
2399
|
+
messageSends: ["printString", "asString"],
|
2400
|
+
referencedClasses: []
|
2401
|
+
}),
|
2402
|
+
smalltalk.CharacterArray);
|
2403
|
+
|
2404
|
+
smalltalk.addMethod(
|
2405
|
+
unescape('_remove_'),
|
2406
|
+
smalltalk.method({
|
2407
|
+
selector: unescape('remove%3A'),
|
2408
|
+
category: 'adding',
|
2409
|
+
fn: function (anObject){
|
2410
|
+
var self=this;
|
2411
|
+
smalltalk.send(self, "_errorReadOnly", []);
|
2412
|
+
return self;},
|
2413
|
+
args: ["anObject"],
|
2414
|
+
source: unescape('remove%3A%20anObject%0A%09self%20errorReadOnly'),
|
2415
|
+
messageSends: ["errorReadOnly"],
|
2416
|
+
referencedClasses: []
|
2417
|
+
}),
|
2418
|
+
smalltalk.CharacterArray);
|
2419
|
+
|
2420
|
+
|
2421
|
+
smalltalk.addMethod(
|
2422
|
+
unescape('_fromString_'),
|
2423
|
+
smalltalk.method({
|
2424
|
+
selector: unescape('fromString%3A'),
|
2425
|
+
category: 'instance creation',
|
2426
|
+
fn: function (aString){
|
2427
|
+
var self=this;
|
2428
|
+
smalltalk.send(self, "_subclassResponsibility", []);
|
2429
|
+
return self;},
|
2430
|
+
args: ["aString"],
|
2431
|
+
source: unescape('fromString%3A%20aString%0A%09self%20subclassResponsibility'),
|
2432
|
+
messageSends: ["subclassResponsibility"],
|
2433
|
+
referencedClasses: []
|
2434
|
+
}),
|
2435
|
+
smalltalk.CharacterArray.klass);
|
2436
|
+
|
2437
|
+
|
2438
|
+
smalltalk.addClass('String', smalltalk.CharacterArray, [], 'Kernel-Collections');
|
2439
|
+
smalltalk.addMethod(
|
2440
|
+
unescape('__comma'),
|
2441
|
+
smalltalk.method({
|
2442
|
+
selector: unescape('%2C'),
|
2443
|
+
category: 'copying',
|
2444
|
+
fn: function (aString){
|
2445
|
+
var self=this;
|
2446
|
+
return self + aString;
|
2447
|
+
return self;},
|
2448
|
+
args: ["aString"],
|
2449
|
+
source: unescape('%2C%20aString%0A%09%3Creturn%20self%20+%20aString%3E'),
|
2450
|
+
messageSends: [],
|
2451
|
+
referencedClasses: []
|
2452
|
+
}),
|
2453
|
+
smalltalk.String);
|
2454
|
+
|
2455
|
+
smalltalk.addMethod(
|
2456
|
+
unescape('__lt'),
|
2457
|
+
smalltalk.method({
|
2458
|
+
selector: unescape('%3C'),
|
2459
|
+
category: 'comparing',
|
2460
|
+
fn: function (aString){
|
2461
|
+
var self=this;
|
2462
|
+
return String(self) < aString._asString();
|
2463
|
+
return self;},
|
2464
|
+
args: ["aString"],
|
2465
|
+
source: unescape('%3C%20aString%0A%09%3Creturn%20String%28self%29%20%3C%20aString._asString%28%29%3E'),
|
2466
|
+
messageSends: [],
|
2467
|
+
referencedClasses: []
|
2468
|
+
}),
|
2469
|
+
smalltalk.String);
|
2470
|
+
|
2471
|
+
smalltalk.addMethod(
|
2472
|
+
unescape('__lt_eq'),
|
2473
|
+
smalltalk.method({
|
2474
|
+
selector: unescape('%3C%3D'),
|
2475
|
+
category: 'comparing',
|
2476
|
+
fn: function (aString){
|
2477
|
+
var self=this;
|
2478
|
+
return String(self) <= aString._asString();
|
2479
|
+
return self;},
|
2480
|
+
args: ["aString"],
|
2481
|
+
source: unescape('%3C%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3C%3D%20aString._asString%28%29%3E'),
|
2482
|
+
messageSends: [],
|
2483
|
+
referencedClasses: []
|
2484
|
+
}),
|
2485
|
+
smalltalk.String);
|
2486
|
+
|
2487
|
+
smalltalk.addMethod(
|
2488
|
+
unescape('__eq'),
|
2489
|
+
smalltalk.method({
|
2490
|
+
selector: unescape('%3D'),
|
2491
|
+
category: 'comparing',
|
2492
|
+
fn: function (aString){
|
2493
|
+
var self=this;
|
2494
|
+
try{((($receiver = smalltalk.send(smalltalk.send(aString, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
|
2495
|
+
return String(self) === String(aString);
|
2496
|
+
return self;
|
2497
|
+
} catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
|
2498
|
+
args: ["aString"],
|
2499
|
+
source: unescape('%3D%20aString%0A%09aString%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20String%28self%29%20%3D%3D%3D%20String%28aString%29%3E'),
|
2500
|
+
messageSends: ["ifFalse:", unescape("%3D"), "class"],
|
2501
|
+
referencedClasses: []
|
2502
|
+
}),
|
2503
|
+
smalltalk.String);
|
2504
|
+
|
2505
|
+
smalltalk.addMethod(
|
2506
|
+
unescape('__gt'),
|
2507
|
+
smalltalk.method({
|
2508
|
+
selector: unescape('%3E'),
|
2509
|
+
category: 'comparing',
|
2510
|
+
fn: function (aString){
|
2511
|
+
var self=this;
|
2512
|
+
return String(self) > aString._asString();
|
2513
|
+
return self;},
|
2514
|
+
args: ["aString"],
|
2515
|
+
source: unescape('%3E%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%20aString._asString%28%29%3E'),
|
2516
|
+
messageSends: [],
|
2517
|
+
referencedClasses: []
|
2518
|
+
}),
|
2519
|
+
smalltalk.String);
|
2520
|
+
|
2521
|
+
smalltalk.addMethod(
|
2522
|
+
unescape('__gt_eq'),
|
2523
|
+
smalltalk.method({
|
2524
|
+
selector: unescape('%3E%3D'),
|
2525
|
+
category: 'comparing',
|
2526
|
+
fn: function (aString){
|
2527
|
+
var self=this;
|
2528
|
+
return String(self) >= aString._asString();
|
2529
|
+
return self;},
|
2530
|
+
args: ["aString"],
|
2531
|
+
source: unescape('%3E%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%3D%20aString._asString%28%29%3E'),
|
2532
|
+
messageSends: [],
|
2533
|
+
referencedClasses: []
|
2534
|
+
}),
|
2535
|
+
smalltalk.String);
|
2536
|
+
|
2537
|
+
smalltalk.addMethod(
|
2538
|
+
unescape('_asJSON'),
|
2539
|
+
smalltalk.method({
|
2540
|
+
selector: unescape('asJSON'),
|
2541
|
+
category: 'converting',
|
2542
|
+
fn: function (){
|
2543
|
+
var self=this;
|
2544
|
+
return self;
|
2545
|
+
return self;},
|
2546
|
+
args: [],
|
2547
|
+
source: unescape('asJSON%0A%09%5Eself'),
|
2548
|
+
messageSends: [],
|
2549
|
+
referencedClasses: []
|
2550
|
+
}),
|
2551
|
+
smalltalk.String);
|
2552
|
+
|
2553
|
+
smalltalk.addMethod(
|
2554
|
+
unescape('_asJavaScriptSelector'),
|
2555
|
+
smalltalk.method({
|
2556
|
+
selector: unescape('asJavaScriptSelector'),
|
2557
|
+
category: 'converting',
|
2558
|
+
fn: function (){
|
2559
|
+
var self=this;
|
2560
|
+
return smalltalk.send(smalltalk.send(smalltalk.send(self, "_asSelector", []), "_replace_with_", [unescape("%5E_"), ""]), "_replace_with_", [unescape("_.*"), ""]);
|
2561
|
+
return self;},
|
2562
|
+
args: [],
|
2563
|
+
source: unescape('asJavaScriptSelector%0A%09%5E%28self%20asSelector%20replace%3A%20%27%5E_%27%20with%3A%20%27%27%29%20replace%3A%20%27_.*%27%20with%3A%20%27%27.'),
|
2564
|
+
messageSends: ["replace:with:", "asSelector"],
|
2565
|
+
referencedClasses: []
|
2566
|
+
}),
|
2567
|
+
smalltalk.String);
|
2568
|
+
|
2569
|
+
smalltalk.addMethod(
|
2570
|
+
unescape('_asJavascript'),
|
2571
|
+
smalltalk.method({
|
2572
|
+
selector: unescape('asJavascript'),
|
2573
|
+
category: 'converting',
|
2574
|
+
fn: function (){
|
2575
|
+
var self=this;
|
2576
|
+
|
2577
|
+
if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)
|
2578
|
+
return "unescape(\"" + escape(self) + "\")";
|
2579
|
+
else
|
2580
|
+
return "\"" + self + "\"";
|
2581
|
+
;
|
2582
|
+
return self;},
|
2583
|
+
args: [],
|
2584
|
+
source: unescape('asJavascript%0A%09%3C%0A%09%09if%28self.search%28/%5E%5Ba-zA-Z0-9_%3A.%24%20%5D*%24/%29%20%3D%3D%20-1%29%0A%09%09%09return%20%22unescape%28%5C%22%22%20+%20escape%28self%29%20+%20%22%5C%22%29%22%3B%0A%09%09else%0A%09%09%09return%20%22%5C%22%22%20+%20self%20+%20%22%5C%22%22%3B%0A%09%3E'),
|
2585
|
+
messageSends: [],
|
2586
|
+
referencedClasses: []
|
2587
|
+
}),
|
2588
|
+
smalltalk.String);
|
2589
|
+
|
2590
|
+
smalltalk.addMethod(
|
2591
|
+
unescape('_asLowercase'),
|
2592
|
+
smalltalk.method({
|
2593
|
+
selector: unescape('asLowercase'),
|
2594
|
+
category: 'converting',
|
2595
|
+
fn: function (){
|
2596
|
+
var self=this;
|
2597
|
+
return self.toLowerCase();
|
2598
|
+
return self;},
|
2599
|
+
args: [],
|
2600
|
+
source: unescape('asLowercase%0A%09%3Creturn%20self.toLowerCase%28%29%3E'),
|
2601
|
+
messageSends: [],
|
2602
|
+
referencedClasses: []
|
2603
|
+
}),
|
2604
|
+
smalltalk.String);
|
2605
|
+
|
2606
|
+
smalltalk.addMethod(
|
2607
|
+
unescape('_asNumber'),
|
2608
|
+
smalltalk.method({
|
2609
|
+
selector: unescape('asNumber'),
|
2610
|
+
category: 'converting',
|
2611
|
+
fn: function (){
|
2612
|
+
var self=this;
|
2613
|
+
return Number(self);
|
2614
|
+
return self;},
|
2615
|
+
args: [],
|
2616
|
+
source: unescape('asNumber%0A%09%3Creturn%20Number%28self%29%3E'),
|
2617
|
+
messageSends: [],
|
2618
|
+
referencedClasses: []
|
2619
|
+
}),
|
2620
|
+
smalltalk.String);
|
2621
|
+
|
2622
|
+
smalltalk.addMethod(
|
2623
|
+
unescape('_asSelector'),
|
2624
|
+
smalltalk.method({
|
2625
|
+
selector: unescape('asSelector'),
|
2626
|
+
category: 'converting',
|
2627
|
+
fn: function (){
|
2628
|
+
var self=this;
|
2629
|
+
var selector=nil;
|
2630
|
+
(selector=smalltalk.send("_", "__comma", [self]));
|
2631
|
+
(selector=smalltalk.send(selector, "_replace_with_", [":", "_"]));
|
2632
|
+
(selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B+%5D"), "_plus"]));
|
2633
|
+
(selector=smalltalk.send(selector, "_replace_with_", [unescape("-"), "_minus"]));
|
2634
|
+
(selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B*%5D"), "_star"]));
|
2635
|
+
(selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B/%5D"), "_slash"]));
|
2636
|
+
(selector=smalltalk.send(selector, "_replace_with_", [unescape("%3E"), "_gt"]));
|
2637
|
+
(selector=smalltalk.send(selector, "_replace_with_", [unescape("%3C"), "_lt"]));
|
2638
|
+
(selector=smalltalk.send(selector, "_replace_with_", [unescape("%3D"), "_eq"]));
|
2639
|
+
(selector=smalltalk.send(selector, "_replace_with_", [unescape("%2C"), "_comma"]));
|
2640
|
+
(selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B@%5D"), "_at"]));
|
2641
|
+
return selector;
|
2642
|
+
return self;},
|
2643
|
+
args: [],
|
2644
|
+
source: unescape('asSelector%0A%09%22If%20you%20change%20this%20method%2C%20change%20smalltalk.convertSelector%20too%20%28see%20js/boot.js%20file%29%22%0A%0A%09%7C%20selector%20%7C%0A%09selector%20%3A%3D%20%27_%27%2C%20self.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%3A%27%20with%3A%20%27_%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B+%5D%27%20with%3A%20%27_plus%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27-%27%20with%3A%20%27_minus%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B*%5D%27%20with%3A%20%27_star%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B/%5D%27%20with%3A%20%27_slash%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%3E%27%20with%3A%20%27_gt%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%3C%27%20with%3A%20%27_lt%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%3D%27%20with%3A%20%27_eq%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%2C%27%20with%3A%20%27_comma%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B@%5D%27%20with%3A%20%27_at%27.%0A%09%5Eselector'),
|
2645
|
+
messageSends: [unescape("%2C"), "replace:with:"],
|
2646
|
+
referencedClasses: []
|
2647
|
+
}),
|
2648
|
+
smalltalk.String);
|
2649
|
+
|
2650
|
+
smalltalk.addMethod(
|
2651
|
+
unescape('_asString'),
|
2652
|
+
smalltalk.method({
|
2653
|
+
selector: unescape('asString'),
|
2654
|
+
category: 'converting',
|
2655
|
+
fn: function (){
|
2656
|
+
var self=this;
|
2657
|
+
return self;
|
2658
|
+
return self;},
|
2659
|
+
args: [],
|
2660
|
+
source: unescape('asString%0A%09%5Eself'),
|
2661
|
+
messageSends: [],
|
2662
|
+
referencedClasses: []
|
2663
|
+
}),
|
2664
|
+
smalltalk.String);
|
2665
|
+
|
2666
|
+
smalltalk.addMethod(
|
2667
|
+
unescape('_asSymbol'),
|
2668
|
+
smalltalk.method({
|
2669
|
+
selector: unescape('asSymbol'),
|
2670
|
+
category: 'converting',
|
2671
|
+
fn: function (){
|
2672
|
+
var self=this;
|
2673
|
+
return smalltalk.send((smalltalk.Symbol || Symbol), "_lookup_", [self]);
|
2674
|
+
return self;},
|
2675
|
+
args: [],
|
2676
|
+
source: unescape('asSymbol%0A%09%5ESymbol%20lookup%3A%20self'),
|
2677
|
+
messageSends: ["lookup:"],
|
2678
|
+
referencedClasses: ["Symbol"]
|
2679
|
+
}),
|
2680
|
+
smalltalk.String);
|
2681
|
+
|
2682
|
+
smalltalk.addMethod(
|
2683
|
+
unescape('_asUppercase'),
|
2684
|
+
smalltalk.method({
|
2685
|
+
selector: unescape('asUppercase'),
|
2686
|
+
category: 'converting',
|
2687
|
+
fn: function (){
|
2688
|
+
var self=this;
|
2689
|
+
return self.toUpperCase();
|
2690
|
+
return self;},
|
2691
|
+
args: [],
|
2692
|
+
source: unescape('asUppercase%0A%09%3Creturn%20self.toUpperCase%28%29%3E'),
|
2693
|
+
messageSends: [],
|
2694
|
+
referencedClasses: []
|
2695
|
+
}),
|
2696
|
+
smalltalk.String);
|
2697
|
+
|
2698
|
+
smalltalk.addMethod(
|
2699
|
+
unescape('_asciiValue'),
|
2700
|
+
smalltalk.method({
|
2701
|
+
selector: unescape('asciiValue'),
|
2702
|
+
category: 'accessing',
|
2703
|
+
fn: function (){
|
2704
|
+
var self=this;
|
2705
|
+
return self.charCodeAt(0);;
|
2706
|
+
return self;},
|
2707
|
+
args: [],
|
2708
|
+
source: unescape('asciiValue%0A%09%3Creturn%20self.charCodeAt%280%29%3B%3E'),
|
2709
|
+
messageSends: [],
|
2710
|
+
referencedClasses: []
|
2711
|
+
}),
|
2712
|
+
smalltalk.String);
|
2713
|
+
|
2714
|
+
smalltalk.addMethod(
|
2715
|
+
unescape('_at_ifAbsent_'),
|
2716
|
+
smalltalk.method({
|
2717
|
+
selector: unescape('at%3AifAbsent%3A'),
|
2718
|
+
category: 'accessing',
|
2719
|
+
fn: function (anIndex, aBlock){
|
2720
|
+
var self=this;
|
2721
|
+
return self[anIndex - 1] || aBlock();
|
2722
|
+
return self;},
|
2723
|
+
args: ["anIndex", "aBlock"],
|
2724
|
+
source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%20%7C%7C%20aBlock%28%29%3E'),
|
2725
|
+
messageSends: [],
|
2726
|
+
referencedClasses: []
|
2727
|
+
}),
|
2728
|
+
smalltalk.String);
|
2729
|
+
|
2730
|
+
smalltalk.addMethod(
|
2731
|
+
unescape('_copyFrom_to_'),
|
2732
|
+
smalltalk.method({
|
2733
|
+
selector: unescape('copyFrom%3Ato%3A'),
|
2734
|
+
category: 'copying',
|
2735
|
+
fn: function (anIndex, anotherIndex){
|
2736
|
+
var self=this;
|
2737
|
+
return self.substring(anIndex - 1, anotherIndex);
|
2738
|
+
return self;},
|
2739
|
+
args: ["anIndex", "anotherIndex"],
|
2740
|
+
source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%3Creturn%20self.substring%28anIndex%20-%201%2C%20anotherIndex%29%3E'),
|
2741
|
+
messageSends: [],
|
2742
|
+
referencedClasses: []
|
2743
|
+
}),
|
2744
|
+
smalltalk.String);
|
2745
|
+
|
2746
|
+
smalltalk.addMethod(
|
2747
|
+
unescape('_deepCopy'),
|
2748
|
+
smalltalk.method({
|
2749
|
+
selector: unescape('deepCopy'),
|
2750
|
+
category: 'copying',
|
2751
|
+
fn: function (){
|
2752
|
+
var self=this;
|
2753
|
+
return smalltalk.send(self, "_shallowCopy", []);
|
2754
|
+
return self;},
|
2755
|
+
args: [],
|
2756
|
+
source: unescape('deepCopy%0A%09%5Eself%20shallowCopy'),
|
2757
|
+
messageSends: ["shallowCopy"],
|
2758
|
+
referencedClasses: []
|
2759
|
+
}),
|
2760
|
+
smalltalk.String);
|
2761
|
+
|
2762
|
+
smalltalk.addMethod(
|
2763
|
+
unescape('_escaped'),
|
2764
|
+
smalltalk.method({
|
2765
|
+
selector: unescape('escaped'),
|
2766
|
+
category: 'accessing',
|
2767
|
+
fn: function (){
|
2768
|
+
var self=this;
|
2769
|
+
return escape(self);
|
2770
|
+
return self;},
|
2771
|
+
args: [],
|
2772
|
+
source: unescape('escaped%0A%09%3Creturn%20escape%28self%29%3E'),
|
2773
|
+
messageSends: [],
|
2774
|
+
referencedClasses: []
|
2775
|
+
}),
|
2776
|
+
smalltalk.String);
|
2777
|
+
|
2778
|
+
smalltalk.addMethod(
|
2779
|
+
unescape('_escapedString'),
|
2780
|
+
smalltalk.method({
|
2781
|
+
selector: unescape('escapedString'),
|
2782
|
+
category: 'converting',
|
2783
|
+
fn: function (){
|
2784
|
+
var self=this;
|
2785
|
+
return smalltalk.send(self, "_replace_with_", [unescape("%27"), unescape("%27%27")]);
|
2786
|
+
return self;},
|
2787
|
+
args: [],
|
2788
|
+
source: unescape('escapedString%0A%09%5E%20self%20replace%3A%20%27%27%27%27%20with%3A%20%27%27%27%27%27%27'),
|
2789
|
+
messageSends: ["replace:with:"],
|
2790
|
+
referencedClasses: []
|
2791
|
+
}),
|
2792
|
+
smalltalk.String);
|
2793
|
+
|
2794
|
+
smalltalk.addMethod(
|
2795
|
+
unescape('_includesSubString_'),
|
2796
|
+
smalltalk.method({
|
2797
|
+
selector: unescape('includesSubString%3A'),
|
2798
|
+
category: 'testing',
|
2799
|
+
fn: function (subString){
|
2800
|
+
var self=this;
|
2801
|
+
return self.indexOf(subString) != -1 ;
|
2802
|
+
return self;},
|
2803
|
+
args: ["subString"],
|
2804
|
+
source: unescape('includesSubString%3A%20subString%0A%09%3C%20return%20self.indexOf%28subString%29%20%21%3D%20-1%20%3E'),
|
2805
|
+
messageSends: [],
|
2806
|
+
referencedClasses: []
|
2807
|
+
}),
|
2808
|
+
smalltalk.String);
|
2809
|
+
|
2810
|
+
smalltalk.addMethod(
|
2811
|
+
unescape('_isString'),
|
2812
|
+
smalltalk.method({
|
2813
|
+
selector: unescape('isString'),
|
2814
|
+
category: 'testing',
|
2815
|
+
fn: function (){
|
2816
|
+
var self=this;
|
2817
|
+
return true;
|
2818
|
+
return self;},
|
2819
|
+
args: [],
|
2820
|
+
source: unescape('isString%0A%09%5Etrue'),
|
2821
|
+
messageSends: [],
|
2822
|
+
referencedClasses: []
|
2823
|
+
}),
|
2824
|
+
smalltalk.String);
|
2825
|
+
|
2826
|
+
smalltalk.addMethod(
|
2827
|
+
unescape('_join_'),
|
2828
|
+
smalltalk.method({
|
2829
|
+
selector: unescape('join%3A'),
|
2830
|
+
category: 'split join',
|
2831
|
+
fn: function (aCollection){
|
2832
|
+
var self=this;
|
2833
|
+
return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){return smalltalk.send(aCollection, "_do_separatedBy_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(each, "_asString", [])]);}), (function(){return smalltalk.send(stream, "_nextPutAll_", [self]);})]);})]);
|
2834
|
+
return self;},
|
2835
|
+
args: ["aCollection"],
|
2836
|
+
source: unescape('join%3A%20aCollection%20%0A%09%5E%20String%0A%09%09streamContents%3A%20%5B%3Astream%20%7C%20aCollection%0A%09%09%09%09do%3A%20%5B%3Aeach%20%7C%20stream%20nextPutAll%3A%20each%20asString%5D%20%0A%09%09%09%09separatedBy%3A%20%5Bstream%20nextPutAll%3A%20self%5D%5D'),
|
2837
|
+
messageSends: ["streamContents:", "do:separatedBy:", "nextPutAll:", "asString"],
|
2838
|
+
referencedClasses: ["String"]
|
2839
|
+
}),
|
2840
|
+
smalltalk.String);
|
2841
|
+
|
2842
|
+
smalltalk.addMethod(
|
2843
|
+
unescape('_lineIndicesDo_'),
|
2844
|
+
smalltalk.method({
|
2845
|
+
selector: unescape('lineIndicesDo%3A'),
|
2846
|
+
category: 'split join',
|
2847
|
+
fn: function (aBlock){
|
2848
|
+
var self=this;
|
2849
|
+
try{var cr=nil;
|
2850
|
+
var lf=nil;
|
2851
|
+
var start=nil;
|
2852
|
+
var sz=nil;
|
2853
|
+
var nextLF=nil;
|
2854
|
+
var nextCR=nil;
|
2855
|
+
(start=(1));
|
2856
|
+
(sz=smalltalk.send(self, "_size", []));
|
2857
|
+
(cr=smalltalk.send((smalltalk.String || String), "_cr", []));
|
2858
|
+
(nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, (1)]));
|
2859
|
+
(lf=smalltalk.send((smalltalk.String || String), "_lf", []));
|
2860
|
+
(nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, (1)]));
|
2861
|
+
(function(){while((function(){return ((($receiver = start).klass === smalltalk.Number) ? $receiver <=sz : smalltalk.send($receiver, "__lt_eq", [sz]));})()) {(function(){((($receiver = smalltalk.send(smalltalk.send(nextLF, "__eq", [(0)]), "_and_", [(function(){return smalltalk.send(nextCR, "__eq", [(0)]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})]));return ((($receiver = smalltalk.send(smalltalk.send(nextCR, "__eq", [(0)]), "_or_", [(function(){return smalltalk.send((0) < nextLF, "_and_", [(function(){return ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver <nextCR : smalltalk.send($receiver, "__lt", [nextCR]));})]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));})() : (function(){return ((($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);(nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);(start=(1) + nextCR);return (nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);(nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);(start=(1) + nextCR);return (nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));}), (function(){return ((($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);(nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);(start=(1) + nextCR);return (nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);(start=(1) + nextLF);(nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));return (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]));}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);(start=(1) + nextCR);return (nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]));})]));})]));})()}})();
|
2862
|
+
return self;
|
2863
|
+
} catch(e) {if(e.name === 'stReturn' && e.selector === '_lineIndicesDo_'){return e.fn()} throw(e)}},
|
2864
|
+
args: ["aBlock"],
|
2865
|
+
source: unescape('lineIndicesDo%3A%20aBlock%0A%09%22execute%20aBlock%20with%203%20arguments%20for%20each%20line%3A%0A%09-%20start%20index%20of%20line%0A%09-%20end%20index%20of%20line%20without%20line%20delimiter%0A%09-%20end%20index%20of%20line%20including%20line%20delimiter%28s%29%20CR%2C%20LF%20or%20CRLF%22%0A%09%0A%09%7C%20cr%20lf%20start%20sz%20nextLF%20nextCR%20%7C%0A%09start%20%3A%3D%201.%0A%09sz%20%3A%3D%20self%20size.%0A%09cr%20%3A%3D%20String%20cr.%0A%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%201.%0A%09lf%20%3A%3D%20String%20lf.%0A%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%201.%0A%09%5B%20start%20%3C%3D%20sz%20%5D%20whileTrue%3A%20%5B%0A%09%09%28nextLF%20%3D%200%20and%3A%20%5B%20nextCR%20%3D%200%20%5D%29%0A%09%09%09ifTrue%3A%20%5B%20%22No%20more%20CR%2C%20nor%20LF%2C%20the%20string%20is%20over%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20sz%20value%3A%20sz.%0A%09%09%09%09%09%5Eself%20%5D.%0A%09%09%28nextCR%20%3D%200%20or%3A%20%5B%200%20%3C%20nextLF%20and%3A%20%5B%20nextLF%20%3C%20nextCR%20%5D%20%5D%29%0A%09%09%09ifTrue%3A%20%5B%20%22Found%20a%20LF%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextLF%20-%201%20value%3A%20nextLF.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextLF.%0A%09%09%09%09%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%20start%20%5D%0A%09%09%09ifFalse%3A%20%5B%201%20+%20nextCR%20%3D%20nextLF%0A%09%09%09%09ifTrue%3A%20%5B%20%22Found%20a%20CR-LF%20pair%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextCR%20-%201%20value%3A%20nextLF.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextLF.%0A%09%09%09%09%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%20start.%0A%09%09%09%09%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%20start%20%5D%0A%09%09%09%09ifFalse%3A%20%5B%20%22Found%20a%20CR%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextCR%20-%201%20value%3A%20nextCR.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextCR.%0A%09%09%09%09%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%20start%20%5D%5D%5D'),
|
2866
|
+
messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", unescape("%3C%3D"), "ifTrue:", "and:", unescape("%3D"), "value:value:value:", "ifTrue:ifFalse:", "or:", unescape("%3C"), unescape("-"), unescape("+")],
|
2867
|
+
referencedClasses: ["String"]
|
2868
|
+
}),
|
2869
|
+
smalltalk.String);
|
2870
|
+
|
2871
|
+
smalltalk.addMethod(
|
2872
|
+
unescape('_lineNumber_'),
|
2873
|
+
smalltalk.method({
|
2874
|
+
selector: unescape('lineNumber%3A'),
|
2875
|
+
category: 'split join',
|
2876
|
+
fn: function (anIndex){
|
2877
|
+
var self=this;
|
2878
|
+
try{var lineCount=nil;
|
2879
|
+
(lineCount=(0));
|
2880
|
+
smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return ((($receiver = smalltalk.send((lineCount=((($receiver = lineCount).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))), "__eq", [anIndex])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])}})})();})]));})]);
|
2881
|
+
(function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return nil}})})();
|
2882
|
+
return self;
|
2883
|
+
} catch(e) {if(e.name === 'stReturn' && e.selector === '_lineNumber_'){return e.fn()} throw(e)}},
|
2884
|
+
args: ["anIndex"],
|
2885
|
+
source: unescape('lineNumber%3A%20anIndex%0A%09%22Answer%20a%20string%20containing%20the%20characters%20in%20the%20given%20line%20number.%22%0A%0A%09%7C%20lineCount%20%7C%0A%09lineCount%20%3A%3D%200.%0A%09self%20lineIndicesDo%3A%20%5B%3Astart%20%3AendWithoutDelimiters%20%3Aend%20%7C%0A%09%09%28lineCount%20%3A%3D%20lineCount%20+%201%29%20%3D%20anIndex%20ifTrue%3A%20%5B%5Eself%20copyFrom%3A%20start%20to%3A%20endWithoutDelimiters%5D%5D.%0A%09%5Enil'),
|
2886
|
+
messageSends: ["lineIndicesDo:", "ifTrue:", unescape("%3D"), unescape("+"), "copyFrom:to:"],
|
2887
|
+
referencedClasses: []
|
2888
|
+
}),
|
2889
|
+
smalltalk.String);
|
2890
|
+
|
2891
|
+
smalltalk.addMethod(
|
2892
|
+
unescape('_lines'),
|
2893
|
+
smalltalk.method({
|
2894
|
+
selector: unescape('lines'),
|
2895
|
+
category: 'split join',
|
2896
|
+
fn: function (){
|
2897
|
+
var self=this;
|
2898
|
+
var lines=nil;
|
2899
|
+
(lines=smalltalk.send((smalltalk.Array || Array), "_new", []));
|
2900
|
+
smalltalk.send(self, "_linesDo_", [(function(aLine){return smalltalk.send(lines, "_add_", [aLine]);})]);
|
2901
|
+
return lines;
|
2902
|
+
return self;},
|
2903
|
+
args: [],
|
2904
|
+
source: unescape('lines%0A%09%22Answer%20an%20array%20of%20lines%20composing%20this%20receiver%20without%20the%20line%20ending%20delimiters.%22%0A%0A%09%7C%20lines%20%7C%0A%09lines%20%3A%3D%20Array%20new.%0A%09self%20linesDo%3A%20%5B%3AaLine%20%7C%20lines%20add%3A%20aLine%5D.%0A%09%5Elines'),
|
2905
|
+
messageSends: ["new", "linesDo:", "add:"],
|
2906
|
+
referencedClasses: ["Array"]
|
2907
|
+
}),
|
2908
|
+
smalltalk.String);
|
2909
|
+
|
2910
|
+
smalltalk.addMethod(
|
2911
|
+
unescape('_linesDo_'),
|
2912
|
+
smalltalk.method({
|
2913
|
+
selector: unescape('linesDo%3A'),
|
2914
|
+
category: 'split join',
|
2915
|
+
fn: function (aBlock){
|
2916
|
+
var self=this;
|
2917
|
+
smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])]);})]);
|
2918
|
+
return self;},
|
2919
|
+
args: ["aBlock"],
|
2920
|
+
source: unescape('linesDo%3A%20aBlock%0A%09%22Execute%20aBlock%20with%20each%20line%20in%20this%20string.%20The%20terminating%20line%0A%09delimiters%20CR%2C%20LF%20or%20CRLF%20pairs%20are%20not%20included%20in%20what%20is%20passed%20to%20aBlock%22%0A%0A%09self%20lineIndicesDo%3A%20%5B%3Astart%20%3AendWithoutDelimiters%20%3Aend%20%7C%0A%09%09aBlock%20value%3A%20%28self%20copyFrom%3A%20start%20to%3A%20endWithoutDelimiters%29%5D'),
|
2921
|
+
messageSends: ["lineIndicesDo:", "value:", "copyFrom:to:"],
|
2922
|
+
referencedClasses: []
|
2923
|
+
}),
|
2924
|
+
smalltalk.String);
|
2925
|
+
|
2926
|
+
smalltalk.addMethod(
|
2927
|
+
unescape('_match_'),
|
2928
|
+
smalltalk.method({
|
2929
|
+
selector: unescape('match%3A'),
|
2930
|
+
category: 'regular expressions',
|
2931
|
+
fn: function (aRegexp){
|
2932
|
+
var self=this;
|
2933
|
+
return self.search(aRegexp) != -1;
|
2934
|
+
return self;},
|
2935
|
+
args: ["aRegexp"],
|
2936
|
+
source: unescape('match%3A%20aRegexp%0A%09%3Creturn%20self.search%28aRegexp%29%20%21%3D%20-1%3E'),
|
2937
|
+
messageSends: [],
|
2938
|
+
referencedClasses: []
|
2939
|
+
}),
|
2940
|
+
smalltalk.String);
|
2941
|
+
|
2942
|
+
smalltalk.addMethod(
|
2943
|
+
unescape('_printNl'),
|
2944
|
+
smalltalk.method({
|
2945
|
+
selector: unescape('printNl'),
|
2946
|
+
category: 'printing',
|
2947
|
+
fn: function (){
|
2948
|
+
var self=this;
|
2949
|
+
console.log(self);
|
2950
|
+
return self;},
|
2951
|
+
args: [],
|
2952
|
+
source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
|
2953
|
+
messageSends: [],
|
2954
|
+
referencedClasses: []
|
2955
|
+
}),
|
2956
|
+
smalltalk.String);
|
2957
|
+
|
2958
|
+
smalltalk.addMethod(
|
2959
|
+
unescape('_printString'),
|
2960
|
+
smalltalk.method({
|
2961
|
+
selector: unescape('printString'),
|
2962
|
+
category: 'printing',
|
2963
|
+
fn: function (){
|
2964
|
+
var self=this;
|
2965
|
+
return smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [self]), "__comma", [unescape("%27")]);
|
2966
|
+
return self;},
|
2967
|
+
args: [],
|
2968
|
+
source: unescape('printString%0A%09%5E%27%27%27%27%2C%20self%2C%20%27%27%27%27'),
|
2969
|
+
messageSends: [unescape("%2C")],
|
2970
|
+
referencedClasses: []
|
2971
|
+
}),
|
2972
|
+
smalltalk.String);
|
2973
|
+
|
2974
|
+
smalltalk.addMethod(
|
2975
|
+
unescape('_replace_with_'),
|
2976
|
+
smalltalk.method({
|
2977
|
+
selector: unescape('replace%3Awith%3A'),
|
2978
|
+
category: 'regular expressions',
|
2979
|
+
fn: function (aString, anotherString){
|
2980
|
+
var self=this;
|
2981
|
+
return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [aString, "g"]), anotherString]);
|
2982
|
+
return self;},
|
2983
|
+
args: ["aString", "anotherString"],
|
2984
|
+
source: unescape('replace%3A%20aString%20with%3A%20anotherString%0A%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20aString%20flag%3A%20%27g%27%29%20with%3A%20anotherString'),
|
2985
|
+
messageSends: ["replaceRegexp:with:", "fromString:flag:"],
|
2986
|
+
referencedClasses: ["RegularExpression"]
|
2987
|
+
}),
|
2988
|
+
smalltalk.String);
|
2989
|
+
|
2990
|
+
smalltalk.addMethod(
|
2991
|
+
unescape('_replaceRegexp_with_'),
|
2992
|
+
smalltalk.method({
|
2993
|
+
selector: unescape('replaceRegexp%3Awith%3A'),
|
2994
|
+
category: 'regular expressions',
|
2995
|
+
fn: function (aRegexp, aString){
|
2996
|
+
var self=this;
|
2997
|
+
return self.replace(aRegexp, aString);
|
2998
|
+
return self;},
|
2999
|
+
args: ["aRegexp", "aString"],
|
3000
|
+
source: unescape('replaceRegexp%3A%20aRegexp%20with%3A%20aString%0A%09%3Creturn%20self.replace%28aRegexp%2C%20aString%29%3E'),
|
3001
|
+
messageSends: [],
|
3002
|
+
referencedClasses: []
|
3003
|
+
}),
|
3004
|
+
smalltalk.String);
|
3005
|
+
|
3006
|
+
smalltalk.addMethod(
|
3007
|
+
unescape('_reversed'),
|
3008
|
+
smalltalk.method({
|
3009
|
+
selector: unescape('reversed'),
|
3010
|
+
category: 'converting',
|
3011
|
+
fn: function (){
|
3012
|
+
var self=this;
|
3013
|
+
return self.split("").reverse().join("");
|
3014
|
+
return self;},
|
3015
|
+
args: [],
|
3016
|
+
source: unescape('reversed%0A%09%3Creturn%20self.split%28%22%22%29.reverse%28%29.join%28%22%22%29%3E'),
|
3017
|
+
messageSends: [],
|
3018
|
+
referencedClasses: []
|
3019
|
+
}),
|
3020
|
+
smalltalk.String);
|
3021
|
+
|
3022
|
+
smalltalk.addMethod(
|
3023
|
+
unescape('_shallowCopy'),
|
3024
|
+
smalltalk.method({
|
3025
|
+
selector: unescape('shallowCopy'),
|
3026
|
+
category: 'copying',
|
3027
|
+
fn: function (){
|
3028
|
+
var self=this;
|
3029
|
+
return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [self]);
|
3030
|
+
return self;},
|
3031
|
+
args: [],
|
3032
|
+
source: unescape('shallowCopy%0A%09%5Eself%20class%20fromString%3A%20self'),
|
3033
|
+
messageSends: ["fromString:", "class"],
|
3034
|
+
referencedClasses: []
|
3035
|
+
}),
|
3036
|
+
smalltalk.String);
|
3037
|
+
|
3038
|
+
smalltalk.addMethod(
|
3039
|
+
unescape('_size'),
|
3040
|
+
smalltalk.method({
|
3041
|
+
selector: unescape('size'),
|
3042
|
+
category: 'accessing',
|
3043
|
+
fn: function (){
|
3044
|
+
var self=this;
|
3045
|
+
return self.length;
|
3046
|
+
return self;},
|
3047
|
+
args: [],
|
3048
|
+
source: unescape('size%0A%09%3Creturn%20self.length%3E'),
|
3049
|
+
messageSends: [],
|
3050
|
+
referencedClasses: []
|
3051
|
+
}),
|
3052
|
+
smalltalk.String);
|
3053
|
+
|
3054
|
+
smalltalk.addMethod(
|
3055
|
+
unescape('_tokenize_'),
|
3056
|
+
smalltalk.method({
|
3057
|
+
selector: unescape('tokenize%3A'),
|
3058
|
+
category: 'converting',
|
3059
|
+
fn: function (aString){
|
3060
|
+
var self=this;
|
3061
|
+
return self.split(aString);
|
3062
|
+
return self;},
|
3063
|
+
args: ["aString"],
|
3064
|
+
source: unescape('tokenize%3A%20aString%0A%09%3Creturn%20self.split%28aString%29%3E'),
|
3065
|
+
messageSends: [],
|
3066
|
+
referencedClasses: []
|
3067
|
+
}),
|
3068
|
+
smalltalk.String);
|
3069
|
+
|
3070
|
+
smalltalk.addMethod(
|
3071
|
+
unescape('_trimBoth'),
|
3072
|
+
smalltalk.method({
|
3073
|
+
selector: unescape('trimBoth'),
|
3074
|
+
category: 'regular expressions',
|
3075
|
+
fn: function (){
|
3076
|
+
var self=this;
|
3077
|
+
return smalltalk.send(self, "_trimBoth_", [unescape("%5Cs")]);
|
3078
|
+
return self;},
|
3079
|
+
args: [],
|
3080
|
+
source: unescape('trimBoth%0A%09%5Eself%20trimBoth%3A%20%27%5Cs%27'),
|
3081
|
+
messageSends: ["trimBoth:"],
|
3082
|
+
referencedClasses: []
|
3083
|
+
}),
|
3084
|
+
smalltalk.String);
|
3085
|
+
|
3086
|
+
smalltalk.addMethod(
|
3087
|
+
unescape('_trimBoth_'),
|
3088
|
+
smalltalk.method({
|
3089
|
+
selector: unescape('trimBoth%3A'),
|
3090
|
+
category: 'regular expressions',
|
3091
|
+
fn: function (separators){
|
3092
|
+
var self=this;
|
3093
|
+
return smalltalk.send(smalltalk.send(self, "_trimLeft_", [separators]), "_trimRight_", [separators]);
|
3094
|
+
return self;},
|
3095
|
+
args: ["separators"],
|
3096
|
+
source: unescape('trimBoth%3A%20separators%0A%0A%09%5E%28self%20trimLeft%3A%20separators%29%20trimRight%3A%20separators'),
|
3097
|
+
messageSends: ["trimRight:", "trimLeft:"],
|
3098
|
+
referencedClasses: []
|
3099
|
+
}),
|
3100
|
+
smalltalk.String);
|
3101
|
+
|
3102
|
+
smalltalk.addMethod(
|
3103
|
+
unescape('_trimLeft'),
|
3104
|
+
smalltalk.method({
|
3105
|
+
selector: unescape('trimLeft'),
|
3106
|
+
category: 'regular expressions',
|
3107
|
+
fn: function (){
|
3108
|
+
var self=this;
|
3109
|
+
return smalltalk.send(self, "_trimLeft_", [unescape("%5Cs")]);
|
3110
|
+
return self;},
|
3111
|
+
args: [],
|
3112
|
+
source: unescape('trimLeft%0A%09%5Eself%20trimLeft%3A%20%27%5Cs%27'),
|
3113
|
+
messageSends: ["trimLeft:"],
|
3114
|
+
referencedClasses: []
|
3115
|
+
}),
|
3116
|
+
smalltalk.String);
|
3117
|
+
|
3118
|
+
smalltalk.addMethod(
|
3119
|
+
unescape('_trimLeft_'),
|
3120
|
+
smalltalk.method({
|
3121
|
+
selector: unescape('trimLeft%3A'),
|
3122
|
+
category: 'regular expressions',
|
3123
|
+
fn: function (separators){
|
3124
|
+
var self=this;
|
3125
|
+
return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5E%5B"), "__comma", [separators]), "__comma", [unescape("%5D+")]), "g"]), ""]);
|
3126
|
+
return self;},
|
3127
|
+
args: ["separators"],
|
3128
|
+
source: unescape('trimLeft%3A%20separators%0A%0A%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5E%5B%27%2C%20separators%2C%20%27%5D+%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27'),
|
3129
|
+
messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
|
3130
|
+
referencedClasses: ["RegularExpression"]
|
3131
|
+
}),
|
3132
|
+
smalltalk.String);
|
3133
|
+
|
3134
|
+
smalltalk.addMethod(
|
3135
|
+
unescape('_trimRight'),
|
3136
|
+
smalltalk.method({
|
3137
|
+
selector: unescape('trimRight'),
|
3138
|
+
category: 'regular expressions',
|
3139
|
+
fn: function (){
|
3140
|
+
var self=this;
|
3141
|
+
return smalltalk.send(self, "_trimRight_", [unescape("%5Cs")]);
|
3142
|
+
return self;},
|
3143
|
+
args: [],
|
3144
|
+
source: unescape('trimRight%0A%09%5Eself%20trimRight%3A%20%27%5Cs%27'),
|
3145
|
+
messageSends: ["trimRight:"],
|
3146
|
+
referencedClasses: []
|
3147
|
+
}),
|
3148
|
+
smalltalk.String);
|
3149
|
+
|
3150
|
+
smalltalk.addMethod(
|
3151
|
+
unescape('_trimRight_'),
|
3152
|
+
smalltalk.method({
|
3153
|
+
selector: unescape('trimRight%3A'),
|
3154
|
+
category: 'regular expressions',
|
3155
|
+
fn: function (separators){
|
3156
|
+
var self=this;
|
3157
|
+
return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [separators]), "__comma", [unescape("%5D+%24")]), "g"]), ""]);
|
3158
|
+
return self;},
|
3159
|
+
args: ["separators"],
|
3160
|
+
source: unescape('trimRight%3A%20separators%0A%0A%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5B%27%2C%20separators%2C%20%27%5D+%24%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27'),
|
3161
|
+
messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
|
3162
|
+
referencedClasses: ["RegularExpression"]
|
3163
|
+
}),
|
3164
|
+
smalltalk.String);
|
3165
|
+
|
3166
|
+
smalltalk.addMethod(
|
3167
|
+
unescape('_unescaped'),
|
3168
|
+
smalltalk.method({
|
3169
|
+
selector: unescape('unescaped'),
|
3170
|
+
category: 'accessing',
|
3171
|
+
fn: function (){
|
3172
|
+
var self=this;
|
3173
|
+
return unescape(self);
|
3174
|
+
return self;},
|
3175
|
+
args: [],
|
3176
|
+
source: unescape('unescaped%0A%09%3Creturn%20unescape%28self%29%3E'),
|
3177
|
+
messageSends: [],
|
3178
|
+
referencedClasses: []
|
3179
|
+
}),
|
3180
|
+
smalltalk.String);
|
3181
|
+
|
3182
|
+
|
3183
|
+
smalltalk.addMethod(
|
3184
|
+
unescape('_cr'),
|
3185
|
+
smalltalk.method({
|
3186
|
+
selector: unescape('cr'),
|
3187
|
+
category: 'accessing',
|
3188
|
+
fn: function (){
|
3189
|
+
var self=this;
|
3190
|
+
return '\r';
|
3191
|
+
return self;},
|
3192
|
+
args: [],
|
3193
|
+
source: unescape('cr%0A%09%3Creturn%20%27%5Cr%27%3E'),
|
3194
|
+
messageSends: [],
|
3195
|
+
referencedClasses: []
|
3196
|
+
}),
|
3197
|
+
smalltalk.String.klass);
|
3198
|
+
|
3199
|
+
smalltalk.addMethod(
|
3200
|
+
unescape('_crlf'),
|
3201
|
+
smalltalk.method({
|
3202
|
+
selector: unescape('crlf'),
|
3203
|
+
category: 'accessing',
|
3204
|
+
fn: function (){
|
3205
|
+
var self=this;
|
3206
|
+
return '\r\n';
|
3207
|
+
return self;},
|
3208
|
+
args: [],
|
3209
|
+
source: unescape('crlf%0A%09%3Creturn%20%27%5Cr%5Cn%27%3E'),
|
3210
|
+
messageSends: [],
|
3211
|
+
referencedClasses: []
|
3212
|
+
}),
|
3213
|
+
smalltalk.String.klass);
|
3214
|
+
|
3215
|
+
smalltalk.addMethod(
|
3216
|
+
unescape('_fromString_'),
|
3217
|
+
smalltalk.method({
|
3218
|
+
selector: unescape('fromString%3A'),
|
3219
|
+
category: 'instance creation',
|
3220
|
+
fn: function (aString){
|
3221
|
+
var self=this;
|
3222
|
+
return new self.fn(aString);
|
3223
|
+
return self;},
|
3224
|
+
args: ["aString"],
|
3225
|
+
source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%3Creturn%20new%20self.fn%28aString%29%3E'),
|
3226
|
+
messageSends: [],
|
3227
|
+
referencedClasses: []
|
3228
|
+
}),
|
3229
|
+
smalltalk.String.klass);
|
3230
|
+
|
3231
|
+
smalltalk.addMethod(
|
3232
|
+
unescape('_lf'),
|
3233
|
+
smalltalk.method({
|
3234
|
+
selector: unescape('lf'),
|
3235
|
+
category: 'accessing',
|
3236
|
+
fn: function (){
|
3237
|
+
var self=this;
|
3238
|
+
return '\n';
|
3239
|
+
return self;},
|
3240
|
+
args: [],
|
3241
|
+
source: unescape('lf%0A%09%3Creturn%20%27%5Cn%27%3E'),
|
3242
|
+
messageSends: [],
|
3243
|
+
referencedClasses: []
|
3244
|
+
}),
|
3245
|
+
smalltalk.String.klass);
|
3246
|
+
|
3247
|
+
smalltalk.addMethod(
|
3248
|
+
unescape('_space'),
|
3249
|
+
smalltalk.method({
|
3250
|
+
selector: unescape('space'),
|
3251
|
+
category: 'accessing',
|
3252
|
+
fn: function (){
|
3253
|
+
var self=this;
|
3254
|
+
return ' ';
|
3255
|
+
return self;},
|
3256
|
+
args: [],
|
3257
|
+
source: unescape('space%0A%09%3Creturn%20%27%20%27%3E'),
|
3258
|
+
messageSends: [],
|
3259
|
+
referencedClasses: []
|
3260
|
+
}),
|
3261
|
+
smalltalk.String.klass);
|
3262
|
+
|
3263
|
+
smalltalk.addMethod(
|
3264
|
+
unescape('_streamClass'),
|
3265
|
+
smalltalk.method({
|
3266
|
+
selector: unescape('streamClass'),
|
3267
|
+
category: 'accessing',
|
3268
|
+
fn: function (){
|
3269
|
+
var self=this;
|
3270
|
+
return (smalltalk.StringStream || StringStream);
|
3271
|
+
return self;},
|
3272
|
+
args: [],
|
3273
|
+
source: unescape('streamClass%0A%09%20%20%20%20%5EStringStream'),
|
3274
|
+
messageSends: [],
|
3275
|
+
referencedClasses: ["StringStream"]
|
3276
|
+
}),
|
3277
|
+
smalltalk.String.klass);
|
3278
|
+
|
3279
|
+
smalltalk.addMethod(
|
3280
|
+
unescape('_streamContents_'),
|
3281
|
+
smalltalk.method({
|
3282
|
+
selector: unescape('streamContents%3A'),
|
3283
|
+
category: 'instance creation',
|
3284
|
+
fn: function (blockWithArg){
|
3285
|
+
var self=this;
|
3286
|
+
var stream=nil;
|
3287
|
+
(stream=smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [smalltalk.send((smalltalk.String || String), "_new", [])]));
|
3288
|
+
smalltalk.send(blockWithArg, "_value_", [stream]);
|
3289
|
+
return smalltalk.send(stream, "_contents", []);
|
3290
|
+
return self;},
|
3291
|
+
args: ["blockWithArg"],
|
3292
|
+
source: unescape('streamContents%3A%20blockWithArg%0A%09%7Cstream%7C%0A%09stream%20%3A%3D%20%28self%20streamClass%20on%3A%20String%20new%29.%0A%09blockWithArg%20value%3A%20stream.%0A%09%5E%20stream%20contents'),
|
3293
|
+
messageSends: ["on:", "streamClass", "new", "value:", "contents"],
|
3294
|
+
referencedClasses: ["String"]
|
3295
|
+
}),
|
3296
|
+
smalltalk.String.klass);
|
3297
|
+
|
3298
|
+
smalltalk.addMethod(
|
3299
|
+
unescape('_tab'),
|
3300
|
+
smalltalk.method({
|
3301
|
+
selector: unescape('tab'),
|
3302
|
+
category: 'accessing',
|
3303
|
+
fn: function (){
|
3304
|
+
var self=this;
|
3305
|
+
return '\t';
|
3306
|
+
return self;},
|
3307
|
+
args: [],
|
3308
|
+
source: unescape('tab%0A%09%3Creturn%20%27%5Ct%27%3E'),
|
3309
|
+
messageSends: [],
|
3310
|
+
referencedClasses: []
|
3311
|
+
}),
|
3312
|
+
smalltalk.String.klass);
|
3313
|
+
|
3314
|
+
smalltalk.addMethod(
|
3315
|
+
unescape('_value_'),
|
3316
|
+
smalltalk.method({
|
3317
|
+
selector: unescape('value%3A'),
|
3318
|
+
category: 'instance creation',
|
3319
|
+
fn: function (aUTFCharCode){
|
3320
|
+
var self=this;
|
3321
|
+
return String.fromCharCode(aUTFCharCode);;
|
3322
|
+
return self;},
|
3323
|
+
args: ["aUTFCharCode"],
|
3324
|
+
source: unescape('value%3A%20aUTFCharCode%0A%0A%09%3Creturn%20String.fromCharCode%28aUTFCharCode%29%3B%3E'),
|
3325
|
+
messageSends: [],
|
3326
|
+
referencedClasses: []
|
3327
|
+
}),
|
3328
|
+
smalltalk.String.klass);
|
3329
|
+
|
3330
|
+
|
3331
|
+
smalltalk.addClass('Symbol', smalltalk.CharacterArray, [], 'Kernel-Collections');
|
3332
|
+
smalltalk.addMethod(
|
3333
|
+
unescape('__lt'),
|
3334
|
+
smalltalk.method({
|
3335
|
+
selector: unescape('%3C'),
|
3336
|
+
category: 'comparing',
|
3337
|
+
fn: function (aSymbol){
|
3338
|
+
var self=this;
|
3339
|
+
return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver <smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__lt", [smalltalk.send(aSymbol, "_asString", [])]));
|
3340
|
+
return self;},
|
3341
|
+
args: ["aSymbol"],
|
3342
|
+
source: unescape('%3C%20aSymbol%0A%09%5Eself%20asString%20%3C%20aSymbol%20asString'),
|
3343
|
+
messageSends: [unescape("%3C"), "asString"],
|
3344
|
+
referencedClasses: []
|
3345
|
+
}),
|
3346
|
+
smalltalk.Symbol);
|
3347
|
+
|
3348
|
+
smalltalk.addMethod(
|
3349
|
+
unescape('__lt_eq'),
|
3350
|
+
smalltalk.method({
|
3351
|
+
selector: unescape('%3C%3D'),
|
3352
|
+
category: 'comparing',
|
3353
|
+
fn: function (aSymbol){
|
3354
|
+
var self=this;
|
3355
|
+
return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(aSymbol, "_asString", [])]));
|
3356
|
+
return self;},
|
3357
|
+
args: ["aSymbol"],
|
3358
|
+
source: unescape('%3C%3D%20aSymbol%0A%09%5Eself%20asString%20%3C%3D%20aSymbol%20asString'),
|
3359
|
+
messageSends: [unescape("%3C%3D"), "asString"],
|
3360
|
+
referencedClasses: []
|
3361
|
+
}),
|
3362
|
+
smalltalk.Symbol);
|
3363
|
+
|
3364
|
+
smalltalk.addMethod(
|
3365
|
+
unescape('__eq'),
|
3366
|
+
smalltalk.method({
|
3367
|
+
selector: unescape('%3D'),
|
3368
|
+
category: 'comparing',
|
3369
|
+
fn: function (aSymbol){
|
3370
|
+
var self=this;
|
3371
|
+
try{((($receiver = smalltalk.send(smalltalk.send(aSymbol, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
|
3372
|
+
(function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return smalltalk.send(smalltalk.send(self, "_asString", []), "__eq", [smalltalk.send(aSymbol, "_asString", [])])}})})();
|
3373
|
+
return self;
|
3374
|
+
} catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
|
3375
|
+
args: ["aSymbol"],
|
3376
|
+
source: unescape('%3D%20aSymbol%0A%09aSymbol%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%5Eself%20asString%20%3D%20aSymbol%20asString'),
|
3377
|
+
messageSends: ["ifFalse:", unescape("%3D"), "class", "asString"],
|
3378
|
+
referencedClasses: []
|
3379
|
+
}),
|
3380
|
+
smalltalk.Symbol);
|
3381
|
+
|
3382
|
+
smalltalk.addMethod(
|
3383
|
+
unescape('__gt'),
|
3384
|
+
smalltalk.method({
|
3385
|
+
selector: unescape('%3E'),
|
3386
|
+
category: 'comparing',
|
3387
|
+
fn: function (aSymbol){
|
3388
|
+
var self=this;
|
3389
|
+
return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver >smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__gt", [smalltalk.send(aSymbol, "_asString", [])]));
|
3390
|
+
return self;},
|
3391
|
+
args: ["aSymbol"],
|
3392
|
+
source: unescape('%3E%20aSymbol%0A%09%5Eself%20asString%20%3E%20aSymbol%20asString'),
|
3393
|
+
messageSends: [unescape("%3E"), "asString"],
|
3394
|
+
referencedClasses: []
|
3395
|
+
}),
|
3396
|
+
smalltalk.Symbol);
|
3397
|
+
|
3398
|
+
smalltalk.addMethod(
|
3399
|
+
unescape('__gt_eq'),
|
3400
|
+
smalltalk.method({
|
3401
|
+
selector: unescape('%3E%3D'),
|
3402
|
+
category: 'comparing',
|
3403
|
+
fn: function (aSymbol){
|
3404
|
+
var self=this;
|
3405
|
+
return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver >=smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__gt_eq", [smalltalk.send(aSymbol, "_asString", [])]));
|
3406
|
+
return self;},
|
3407
|
+
args: ["aSymbol"],
|
3408
|
+
source: unescape('%3E%3D%20aSymbol%0A%09%5Eself%20asString%20%3E%3D%20aSymbol%20asString'),
|
3409
|
+
messageSends: [unescape("%3E%3D"), "asString"],
|
3410
|
+
referencedClasses: []
|
3411
|
+
}),
|
3412
|
+
smalltalk.Symbol);
|
3413
|
+
|
3414
|
+
smalltalk.addMethod(
|
3415
|
+
unescape('_asJSON'),
|
3416
|
+
smalltalk.method({
|
3417
|
+
selector: unescape('asJSON'),
|
3418
|
+
category: 'converting',
|
3419
|
+
fn: function (){
|
3420
|
+
var self=this;
|
3421
|
+
return smalltalk.send(smalltalk.send(self, "_asString", []), "_asJSON", []);
|
3422
|
+
return self;},
|
3423
|
+
args: [],
|
3424
|
+
source: unescape('asJSON%0A%09%5Eself%20asString%20asJSON'),
|
3425
|
+
messageSends: ["asJSON", "asString"],
|
3426
|
+
referencedClasses: []
|
3427
|
+
}),
|
3428
|
+
smalltalk.Symbol);
|
3429
|
+
|
3430
|
+
smalltalk.addMethod(
|
3431
|
+
unescape('_asJavascript'),
|
3432
|
+
smalltalk.method({
|
3433
|
+
selector: unescape('asJavascript'),
|
3434
|
+
category: 'converting',
|
3435
|
+
fn: function (){
|
3436
|
+
var self=this;
|
3437
|
+
return smalltalk.send(smalltalk.send(unescape("smalltalk.symbolFor%28%22"), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [unescape("%22%29")]);
|
3438
|
+
return self;},
|
3439
|
+
args: [],
|
3440
|
+
source: unescape('asJavascript%0A%09%5E%27smalltalk.symbolFor%28%22%27%2C%20self%20asString%2C%20%27%22%29%27'),
|
3441
|
+
messageSends: [unescape("%2C"), "asString"],
|
3442
|
+
referencedClasses: []
|
3443
|
+
}),
|
3444
|
+
smalltalk.Symbol);
|
3445
|
+
|
3446
|
+
smalltalk.addMethod(
|
3447
|
+
unescape('_asSelector'),
|
3448
|
+
smalltalk.method({
|
3449
|
+
selector: unescape('asSelector'),
|
3450
|
+
category: 'converting',
|
3451
|
+
fn: function (){
|
3452
|
+
var self=this;
|
3453
|
+
return smalltalk.send(smalltalk.send(self, "_asString", []), "_asSelector", []);
|
3454
|
+
return self;},
|
3455
|
+
args: [],
|
3456
|
+
source: unescape('asSelector%0A%09%5Eself%20asString%20asSelector'),
|
3457
|
+
messageSends: ["asSelector", "asString"],
|
3458
|
+
referencedClasses: []
|
3459
|
+
}),
|
3460
|
+
smalltalk.Symbol);
|
3461
|
+
|
3462
|
+
smalltalk.addMethod(
|
3463
|
+
unescape('_asString'),
|
3464
|
+
smalltalk.method({
|
3465
|
+
selector: unescape('asString'),
|
3466
|
+
category: 'converting',
|
3467
|
+
fn: function (){
|
3468
|
+
var self=this;
|
3469
|
+
return self.value;
|
3470
|
+
return self;},
|
3471
|
+
args: [],
|
3472
|
+
source: unescape('asString%0A%09%3Creturn%20self.value%3E'),
|
3473
|
+
messageSends: [],
|
3474
|
+
referencedClasses: []
|
3475
|
+
}),
|
3476
|
+
smalltalk.Symbol);
|
3477
|
+
|
3478
|
+
smalltalk.addMethod(
|
3479
|
+
unescape('_asSymbol'),
|
3480
|
+
smalltalk.method({
|
3481
|
+
selector: unescape('asSymbol'),
|
3482
|
+
category: 'converting',
|
3483
|
+
fn: function (){
|
3484
|
+
var self=this;
|
3485
|
+
return self;
|
3486
|
+
return self;},
|
3487
|
+
args: [],
|
3488
|
+
source: unescape('asSymbol%0A%09%5Eself'),
|
3489
|
+
messageSends: [],
|
3490
|
+
referencedClasses: []
|
3491
|
+
}),
|
3492
|
+
smalltalk.Symbol);
|
3493
|
+
|
3494
|
+
smalltalk.addMethod(
|
3495
|
+
unescape('_at_ifAbsent_'),
|
3496
|
+
smalltalk.method({
|
3497
|
+
selector: unescape('at%3AifAbsent%3A'),
|
3498
|
+
category: 'accessing',
|
3499
|
+
fn: function (anIndex, aBlock){
|
3500
|
+
var self=this;
|
3501
|
+
return smalltalk.send(smalltalk.send(self, "_asString", []), "_at_ifAbsent_", [anIndex, aBlock]);
|
3502
|
+
return self;},
|
3503
|
+
args: ["anIndex", "aBlock"],
|
3504
|
+
source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09%5Eself%20asString%20at%3A%20anIndex%20ifAbsent%3A%20aBlock'),
|
3505
|
+
messageSends: ["at:ifAbsent:", "asString"],
|
3506
|
+
referencedClasses: []
|
3507
|
+
}),
|
3508
|
+
smalltalk.Symbol);
|
3509
|
+
|
3510
|
+
smalltalk.addMethod(
|
3511
|
+
unescape('_copyFrom_to_'),
|
3512
|
+
smalltalk.method({
|
3513
|
+
selector: unescape('copyFrom%3Ato%3A'),
|
3514
|
+
category: 'copying',
|
3515
|
+
fn: function (anIndex, anotherIndex){
|
3516
|
+
var self=this;
|
3517
|
+
return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_copyFrom_to_", [anIndex, anotherIndex])]);
|
3518
|
+
return self;},
|
3519
|
+
args: ["anIndex", "anotherIndex"],
|
3520
|
+
source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%5Eself%20class%20fromString%3A%20%28self%20asString%20copyFrom%3A%20anIndex%20to%3A%20anotherIndex%29'),
|
3521
|
+
messageSends: ["fromString:", "class", "copyFrom:to:", "asString"],
|
3522
|
+
referencedClasses: []
|
3523
|
+
}),
|
3524
|
+
smalltalk.Symbol);
|
3525
|
+
|
3526
|
+
smalltalk.addMethod(
|
3527
|
+
unescape('_deepCopy'),
|
3528
|
+
smalltalk.method({
|
3529
|
+
selector: unescape('deepCopy'),
|
3530
|
+
category: 'copying',
|
3531
|
+
fn: function (){
|
3532
|
+
var self=this;
|
3533
|
+
return self;
|
3534
|
+
return self;},
|
3535
|
+
args: [],
|
3536
|
+
source: unescape('deepCopy%0A%09%5Eself'),
|
3537
|
+
messageSends: [],
|
3538
|
+
referencedClasses: []
|
3539
|
+
}),
|
3540
|
+
smalltalk.Symbol);
|
3541
|
+
|
3542
|
+
smalltalk.addMethod(
|
3543
|
+
unescape('_isSymbol'),
|
3544
|
+
smalltalk.method({
|
3545
|
+
selector: unescape('isSymbol'),
|
3546
|
+
category: 'printing',
|
3547
|
+
fn: function (){
|
3548
|
+
var self=this;
|
3549
|
+
return true;
|
3550
|
+
return self;},
|
3551
|
+
args: [],
|
3552
|
+
source: unescape('isSymbol%0A%09%5Etrue'),
|
3553
|
+
messageSends: [],
|
3554
|
+
referencedClasses: []
|
3555
|
+
}),
|
3556
|
+
smalltalk.Symbol);
|
3557
|
+
|
3558
|
+
smalltalk.addMethod(
|
3559
|
+
unescape('_printString'),
|
3560
|
+
smalltalk.method({
|
3561
|
+
selector: unescape('printString'),
|
3562
|
+
category: 'printing',
|
3563
|
+
fn: function (){
|
3564
|
+
var self=this;
|
3565
|
+
return smalltalk.send(unescape("%23"), "__comma", [smalltalk.send(self, "_asString", [])]);
|
3566
|
+
return self;},
|
3567
|
+
args: [],
|
3568
|
+
source: unescape('printString%0A%09%5E%27%23%27%2C%20self%20asString'),
|
3569
|
+
messageSends: [unescape("%2C"), "asString"],
|
3570
|
+
referencedClasses: []
|
3571
|
+
}),
|
3572
|
+
smalltalk.Symbol);
|
3573
|
+
|
3574
|
+
smalltalk.addMethod(
|
3575
|
+
unescape('_shallowCopy'),
|
3576
|
+
smalltalk.method({
|
3577
|
+
selector: unescape('shallowCopy'),
|
3578
|
+
category: 'copying',
|
3579
|
+
fn: function (){
|
3580
|
+
var self=this;
|
3581
|
+
return self;
|
3582
|
+
return self;},
|
3583
|
+
args: [],
|
3584
|
+
source: unescape('shallowCopy%0A%09%5Eself'),
|
3585
|
+
messageSends: [],
|
3586
|
+
referencedClasses: []
|
3587
|
+
}),
|
3588
|
+
smalltalk.Symbol);
|
3589
|
+
|
3590
|
+
smalltalk.addMethod(
|
3591
|
+
unescape('_size'),
|
3592
|
+
smalltalk.method({
|
3593
|
+
selector: unescape('size'),
|
3594
|
+
category: 'accessing',
|
3595
|
+
fn: function (){
|
3596
|
+
var self=this;
|
3597
|
+
return smalltalk.send(smalltalk.send(self, "_asString", []), "_size", []);
|
3598
|
+
return self;},
|
3599
|
+
args: [],
|
3600
|
+
source: unescape('size%0A%09%5Eself%20asString%20size'),
|
3601
|
+
messageSends: ["size", "asString"],
|
3602
|
+
referencedClasses: []
|
3603
|
+
}),
|
3604
|
+
smalltalk.Symbol);
|
3605
|
+
|
3606
|
+
|
3607
|
+
smalltalk.addMethod(
|
3608
|
+
unescape('_basicNew'),
|
3609
|
+
smalltalk.method({
|
3610
|
+
selector: unescape('basicNew'),
|
3611
|
+
category: 'instance creation',
|
3612
|
+
fn: function (){
|
3613
|
+
var self=this;
|
3614
|
+
smalltalk.send(self, "_shouldNotImplement", []);
|
3615
|
+
return self;},
|
3616
|
+
args: [],
|
3617
|
+
source: unescape('basicNew%0A%09self%20shouldNotImplement'),
|
3618
|
+
messageSends: ["shouldNotImplement"],
|
3619
|
+
referencedClasses: []
|
3620
|
+
}),
|
3621
|
+
smalltalk.Symbol.klass);
|
3622
|
+
|
3623
|
+
smalltalk.addMethod(
|
3624
|
+
unescape('_fromString_'),
|
3625
|
+
smalltalk.method({
|
3626
|
+
selector: unescape('fromString%3A'),
|
3627
|
+
category: 'instance creation',
|
3628
|
+
fn: function (aString){
|
3629
|
+
var self=this;
|
3630
|
+
return smalltalk.send(self, "_lookup_", [aString]);
|
3631
|
+
return self;},
|
3632
|
+
args: ["aString"],
|
3633
|
+
source: unescape('fromString%3A%20aString%0A%09%5Eself%20lookup%3A%20aString'),
|
3634
|
+
messageSends: ["lookup:"],
|
3635
|
+
referencedClasses: []
|
3636
|
+
}),
|
3637
|
+
smalltalk.Symbol.klass);
|
3638
|
+
|
3639
|
+
smalltalk.addMethod(
|
3640
|
+
unescape('_lookup_'),
|
3641
|
+
smalltalk.method({
|
3642
|
+
selector: unescape('lookup%3A'),
|
3643
|
+
category: 'instance creation',
|
3644
|
+
fn: function (aString){
|
3645
|
+
var self=this;
|
3646
|
+
return smalltalk.symbolFor(aString);;
|
3647
|
+
return self;},
|
3648
|
+
args: ["aString"],
|
3649
|
+
source: unescape('lookup%3A%20aString%0A%09%3Creturn%20smalltalk.symbolFor%28aString%29%3B%3E'),
|
3650
|
+
messageSends: [],
|
3651
|
+
referencedClasses: []
|
3652
|
+
}),
|
3653
|
+
smalltalk.Symbol.klass);
|
3654
|
+
|
3655
|
+
|
3656
|
+
smalltalk.addClass('Set', smalltalk.Collection, ['elements'], 'Kernel-Collections');
|
3657
|
+
smalltalk.addMethod(
|
3658
|
+
unescape('__eq'),
|
3659
|
+
smalltalk.method({
|
3660
|
+
selector: unescape('%3D'),
|
3661
|
+
category: 'comparing',
|
3662
|
+
fn: function (aCollection){
|
3663
|
+
var self=this;
|
3664
|
+
return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(self['@elements'], "__eq", [smalltalk.send(aCollection, "_asArray", [])]);})]);
|
3665
|
+
return self;},
|
3666
|
+
args: ["aCollection"],
|
3667
|
+
source: unescape('%3D%20aCollection%0A%09%5Eself%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%09%09elements%20%3D%20aCollection%20asArray%5D'),
|
3668
|
+
messageSends: ["and:", unescape("%3D"), "class", "asArray"],
|
3669
|
+
referencedClasses: []
|
3670
|
+
}),
|
3671
|
+
smalltalk.Set);
|
3672
|
+
|
3673
|
+
smalltalk.addMethod(
|
3674
|
+
unescape('_add_'),
|
3675
|
+
smalltalk.method({
|
3676
|
+
selector: unescape('add%3A'),
|
3677
|
+
category: 'adding/removing',
|
3678
|
+
fn: function (anObject){
|
3679
|
+
var self=this;
|
3680
|
+
|
3681
|
+
var found;
|
3682
|
+
for(var i=0; i < self['@elements'].length; i++) {
|
3683
|
+
if(anObject == self['@elements'][i]) {
|
3684
|
+
found = true;
|
3685
|
+
break;
|
3686
|
+
}
|
3687
|
+
}
|
3688
|
+
if(!found) {self['@elements'].push(anObject)}
|
3689
|
+
;
|
3690
|
+
return self;},
|
3691
|
+
args: ["anObject"],
|
3692
|
+
source: unescape('add%3A%20anObject%0A%09%3C%0A%09%09var%20found%3B%0A%09%09for%28var%20i%3D0%3B%20i%20%3C%20self%5B%27@elements%27%5D.length%3B%20i++%29%20%7B%0A%09%09%09if%28anObject%20%3D%3D%20self%5B%27@elements%27%5D%5Bi%5D%29%20%7B%0A%09%09%09%09found%20%3D%20true%3B%0A%09%09%09%09break%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%09if%28%21found%29%20%7Bself%5B%27@elements%27%5D.push%28anObject%29%7D%0A%09%3E'),
|
3693
|
+
messageSends: [],
|
3694
|
+
referencedClasses: []
|
3695
|
+
}),
|
3696
|
+
smalltalk.Set);
|
3697
|
+
|
3698
|
+
smalltalk.addMethod(
|
3699
|
+
unescape('_asArray'),
|
3700
|
+
smalltalk.method({
|
3701
|
+
selector: unescape('asArray'),
|
3702
|
+
category: 'converting',
|
3703
|
+
fn: function (){
|
3704
|
+
var self=this;
|
3705
|
+
return smalltalk.send(self['@elements'], "_copy", []);
|
3706
|
+
return self;},
|
3707
|
+
args: [],
|
3708
|
+
source: unescape('asArray%0A%09%5Eelements%20copy'),
|
3709
|
+
messageSends: ["copy"],
|
3710
|
+
referencedClasses: []
|
3711
|
+
}),
|
3712
|
+
smalltalk.Set);
|
3713
|
+
|
3714
|
+
smalltalk.addMethod(
|
3715
|
+
unescape('_detect_ifNone_'),
|
3716
|
+
smalltalk.method({
|
3717
|
+
selector: unescape('detect%3AifNone%3A'),
|
3718
|
+
category: 'enumerating',
|
3719
|
+
fn: function (aBlock, anotherBlock){
|
3720
|
+
var self=this;
|
3721
|
+
return smalltalk.send(self['@elements'], "_detect_ifNone_", [aBlock, anotherBlock]);
|
3722
|
+
return self;},
|
3723
|
+
args: ["aBlock", "anotherBlock"],
|
3724
|
+
source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eelements%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
|
3725
|
+
messageSends: ["detect:ifNone:"],
|
3726
|
+
referencedClasses: []
|
3727
|
+
}),
|
3728
|
+
smalltalk.Set);
|
3729
|
+
|
3730
|
+
smalltalk.addMethod(
|
3731
|
+
unescape('_do_'),
|
3732
|
+
smalltalk.method({
|
3733
|
+
selector: unescape('do%3A'),
|
3734
|
+
category: 'enumerating',
|
3735
|
+
fn: function (aBlock){
|
3736
|
+
var self=this;
|
3737
|
+
smalltalk.send(self['@elements'], "_do_", [aBlock]);
|
3738
|
+
return self;},
|
3739
|
+
args: ["aBlock"],
|
3740
|
+
source: unescape('do%3A%20aBlock%0A%09elements%20do%3A%20aBlock'),
|
3741
|
+
messageSends: ["do:"],
|
3742
|
+
referencedClasses: []
|
3743
|
+
}),
|
3744
|
+
smalltalk.Set);
|
3745
|
+
|
3746
|
+
smalltalk.addMethod(
|
3747
|
+
unescape('_includes_'),
|
3748
|
+
smalltalk.method({
|
3749
|
+
selector: unescape('includes%3A'),
|
3750
|
+
category: 'testing',
|
3751
|
+
fn: function (anObject){
|
3752
|
+
var self=this;
|
3753
|
+
return smalltalk.send(self['@elements'], "_includes_", [anObject]);
|
3754
|
+
return self;},
|
3755
|
+
args: ["anObject"],
|
3756
|
+
source: unescape('includes%3A%20anObject%0A%09%5Eelements%20includes%3A%20anObject'),
|
3757
|
+
messageSends: ["includes:"],
|
3758
|
+
referencedClasses: []
|
3759
|
+
}),
|
3760
|
+
smalltalk.Set);
|
3761
|
+
|
3762
|
+
smalltalk.addMethod(
|
3763
|
+
unescape('_initialize'),
|
3764
|
+
smalltalk.method({
|
3765
|
+
selector: unescape('initialize'),
|
3766
|
+
category: 'initialization',
|
3767
|
+
fn: function (){
|
3768
|
+
var self=this;
|
3769
|
+
smalltalk.send(self, "_initialize", [], smalltalk.Collection);
|
3770
|
+
(self['@elements']=[]);
|
3771
|
+
return self;},
|
3772
|
+
args: [],
|
3773
|
+
source: unescape('initialize%0A%09super%20initialize.%0A%09elements%20%3A%3D%20%23%28%29'),
|
3774
|
+
messageSends: ["initialize"],
|
3775
|
+
referencedClasses: []
|
3776
|
+
}),
|
3777
|
+
smalltalk.Set);
|
3778
|
+
|
3779
|
+
smalltalk.addMethod(
|
3780
|
+
unescape('_remove_'),
|
3781
|
+
smalltalk.method({
|
3782
|
+
selector: unescape('remove%3A'),
|
3783
|
+
category: 'adding/removing',
|
3784
|
+
fn: function (anObject){
|
3785
|
+
var self=this;
|
3786
|
+
smalltalk.send(self['@elements'], "_remove_", [anObject]);
|
3787
|
+
return self;},
|
3788
|
+
args: ["anObject"],
|
3789
|
+
source: unescape('remove%3A%20anObject%0A%09elements%20remove%3A%20anObject'),
|
3790
|
+
messageSends: ["remove:"],
|
3791
|
+
referencedClasses: []
|
3792
|
+
}),
|
3793
|
+
smalltalk.Set);
|
3794
|
+
|
3795
|
+
smalltalk.addMethod(
|
3796
|
+
unescape('_select_'),
|
3797
|
+
smalltalk.method({
|
3798
|
+
selector: unescape('select%3A'),
|
3799
|
+
category: 'enumerating',
|
3800
|
+
fn: function (aBlock){
|
3801
|
+
var self=this;
|
3802
|
+
var collection=nil;
|
3803
|
+
(collection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
|
3804
|
+
smalltalk.send(self, "_do_", [(function(each){return ((($receiver = smalltalk.send(aBlock, "_value_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(collection, "_add_", [each]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(collection, "_add_", [each]);})]));})]);
|
3805
|
+
return collection;
|
3806
|
+
return self;},
|
3807
|
+
args: ["aBlock"],
|
3808
|
+
source: unescape('select%3A%20aBlock%0A%09%7C%20collection%20%7C%0A%09collection%20%3A%3D%20self%20class%20new.%20%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%09%28aBlock%20value%3A%20each%29%20ifTrue%3A%20%5B%0A%09%09%09collection%20add%3A%20each%5D%5D.%0A%09%5Ecollection'),
|
3809
|
+
messageSends: ["new", "class", "do:", "ifTrue:", "value:", "add:"],
|
3810
|
+
referencedClasses: []
|
3811
|
+
}),
|
3812
|
+
smalltalk.Set);
|
3813
|
+
|
3814
|
+
smalltalk.addMethod(
|
3815
|
+
unescape('_size'),
|
3816
|
+
smalltalk.method({
|
3817
|
+
selector: unescape('size'),
|
3818
|
+
category: 'accessing',
|
3819
|
+
fn: function (){
|
3820
|
+
var self=this;
|
3821
|
+
return smalltalk.send(self['@elements'], "_size", []);
|
3822
|
+
return self;},
|
3823
|
+
args: [],
|
3824
|
+
source: unescape('size%0A%09%5Eelements%20size'),
|
3825
|
+
messageSends: ["size"],
|
3826
|
+
referencedClasses: []
|
3827
|
+
}),
|
3828
|
+
smalltalk.Set);
|
3829
|
+
|
3830
|
+
|
3831
|
+
|
3832
|
+
smalltalk.addClass('RegularExpression', smalltalk.Object, [], 'Kernel-Collections');
|
3833
|
+
smalltalk.addMethod(
|
3834
|
+
unescape('_compile_'),
|
3835
|
+
smalltalk.method({
|
3836
|
+
selector: unescape('compile%3A'),
|
3837
|
+
category: 'evaluating',
|
3838
|
+
fn: function (aString){
|
3839
|
+
var self=this;
|
3840
|
+
return self.compile(aString);
|
3841
|
+
return self;},
|
3842
|
+
args: ["aString"],
|
3843
|
+
source: unescape('compile%3A%20aString%0A%09%3Creturn%20self.compile%28aString%29%3E'),
|
3844
|
+
messageSends: [],
|
3845
|
+
referencedClasses: []
|
3846
|
+
}),
|
3847
|
+
smalltalk.RegularExpression);
|
3848
|
+
|
3849
|
+
smalltalk.addMethod(
|
3850
|
+
unescape('_exec_'),
|
3851
|
+
smalltalk.method({
|
3852
|
+
selector: unescape('exec%3A'),
|
3853
|
+
category: 'evaluating',
|
3854
|
+
fn: function (aString){
|
3855
|
+
var self=this;
|
3856
|
+
return self.exec(aString) || nil;
|
3857
|
+
return self;},
|
3858
|
+
args: ["aString"],
|
3859
|
+
source: unescape('exec%3A%20aString%0A%09%3Creturn%20self.exec%28aString%29%20%7C%7C%20nil%3E'),
|
3860
|
+
messageSends: [],
|
3861
|
+
referencedClasses: []
|
3862
|
+
}),
|
3863
|
+
smalltalk.RegularExpression);
|
3864
|
+
|
3865
|
+
smalltalk.addMethod(
|
3866
|
+
unescape('_test_'),
|
3867
|
+
smalltalk.method({
|
3868
|
+
selector: unescape('test%3A'),
|
3869
|
+
category: 'evaluating',
|
3870
|
+
fn: function (aString){
|
3871
|
+
var self=this;
|
3872
|
+
return self.test(aString);
|
3873
|
+
return self;},
|
3874
|
+
args: ["aString"],
|
3875
|
+
source: unescape('test%3A%20aString%0A%09%3Creturn%20self.test%28aString%29%3E'),
|
3876
|
+
messageSends: [],
|
3877
|
+
referencedClasses: []
|
3878
|
+
}),
|
3879
|
+
smalltalk.RegularExpression);
|
3880
|
+
|
3881
|
+
|
3882
|
+
smalltalk.addMethod(
|
3883
|
+
unescape('_fromString_'),
|
3884
|
+
smalltalk.method({
|
3885
|
+
selector: unescape('fromString%3A'),
|
3886
|
+
category: 'instance creation',
|
3887
|
+
fn: function (aString){
|
3888
|
+
var self=this;
|
3889
|
+
return smalltalk.send(self, "_fromString_flag_", [aString, ""]);
|
3890
|
+
return self;},
|
3891
|
+
args: ["aString"],
|
3892
|
+
source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%5Eself%20fromString%3A%20aString%20flag%3A%20%27%27'),
|
3893
|
+
messageSends: ["fromString:flag:"],
|
3894
|
+
referencedClasses: []
|
3895
|
+
}),
|
3896
|
+
smalltalk.RegularExpression.klass);
|
3897
|
+
|
3898
|
+
smalltalk.addMethod(
|
3899
|
+
unescape('_fromString_flag_'),
|
3900
|
+
smalltalk.method({
|
3901
|
+
selector: unescape('fromString%3Aflag%3A'),
|
3902
|
+
category: 'instance creation',
|
3903
|
+
fn: function (aString, anotherString){
|
3904
|
+
var self=this;
|
3905
|
+
return new RegExp(aString, anotherString);
|
3906
|
+
return self;},
|
3907
|
+
args: ["aString", "anotherString"],
|
3908
|
+
source: unescape('fromString%3A%20aString%20flag%3A%20anotherString%0A%09%3Creturn%20new%20RegExp%28aString%2C%20anotherString%29%3E'),
|
3909
|
+
messageSends: [],
|
3910
|
+
referencedClasses: []
|
3911
|
+
}),
|
3912
|
+
smalltalk.RegularExpression.klass);
|
3913
|
+
|
3914
|
+
|
3915
|
+
smalltalk.addClass('Stream', smalltalk.Object, ['collection', 'position', 'streamSize'], 'Kernel-Collections');
|
3916
|
+
smalltalk.addMethod(
|
3917
|
+
unescape('_atEnd'),
|
3918
|
+
smalltalk.method({
|
3919
|
+
selector: unescape('atEnd'),
|
3920
|
+
category: 'testing',
|
3921
|
+
fn: function (){
|
3922
|
+
var self=this;
|
3923
|
+
return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [smalltalk.send(self, "_size", [])]);
|
3924
|
+
return self;},
|
3925
|
+
args: [],
|
3926
|
+
source: unescape('atEnd%0A%09%5Eself%20position%20%3D%20self%20size'),
|
3927
|
+
messageSends: [unescape("%3D"), "position", "size"],
|
3928
|
+
referencedClasses: []
|
3929
|
+
}),
|
3930
|
+
smalltalk.Stream);
|
3931
|
+
|
3932
|
+
smalltalk.addMethod(
|
3933
|
+
unescape('_atStart'),
|
3934
|
+
smalltalk.method({
|
3935
|
+
selector: unescape('atStart'),
|
3936
|
+
category: 'testing',
|
3937
|
+
fn: function (){
|
3938
|
+
var self=this;
|
3939
|
+
return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [(0)]);
|
3940
|
+
return self;},
|
3941
|
+
args: [],
|
3942
|
+
source: unescape('atStart%0A%09%5Eself%20position%20%3D%200'),
|
3943
|
+
messageSends: [unescape("%3D"), "position"],
|
3944
|
+
referencedClasses: []
|
3945
|
+
}),
|
3946
|
+
smalltalk.Stream);
|
3947
|
+
|
3948
|
+
smalltalk.addMethod(
|
3949
|
+
unescape('_close'),
|
3950
|
+
smalltalk.method({
|
3951
|
+
selector: unescape('close'),
|
3952
|
+
category: 'actions',
|
3953
|
+
fn: function (){
|
3954
|
+
var self=this;
|
3955
|
+
|
3956
|
+
return self;},
|
3957
|
+
args: [],
|
3958
|
+
source: unescape('close'),
|
3959
|
+
messageSends: [],
|
3960
|
+
referencedClasses: []
|
3961
|
+
}),
|
3962
|
+
smalltalk.Stream);
|
3963
|
+
|
3964
|
+
smalltalk.addMethod(
|
3965
|
+
unescape('_collection'),
|
3966
|
+
smalltalk.method({
|
3967
|
+
selector: unescape('collection'),
|
3968
|
+
category: 'accessing',
|
3969
|
+
fn: function (){
|
3970
|
+
var self=this;
|
3971
|
+
return self['@collection'];
|
3972
|
+
return self;},
|
3973
|
+
args: [],
|
3974
|
+
source: unescape('collection%0A%09%5Ecollection'),
|
3975
|
+
messageSends: [],
|
3976
|
+
referencedClasses: []
|
3977
|
+
}),
|
3978
|
+
smalltalk.Stream);
|
3979
|
+
|
3980
|
+
smalltalk.addMethod(
|
3981
|
+
unescape('_contents'),
|
3982
|
+
smalltalk.method({
|
3983
|
+
selector: unescape('contents'),
|
3984
|
+
category: 'accessing',
|
3985
|
+
fn: function (){
|
3986
|
+
var self=this;
|
3987
|
+
return smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_streamSize", [])]);
|
3988
|
+
return self;},
|
3989
|
+
args: [],
|
3990
|
+
source: unescape('contents%0A%09%5Eself%20collection%0A%09%20%20%20%20copyFrom%3A%201%20%0A%09%20%20%20%20to%3A%20self%20streamSize'),
|
3991
|
+
messageSends: ["copyFrom:to:", "collection", "streamSize"],
|
3992
|
+
referencedClasses: []
|
3993
|
+
}),
|
3994
|
+
smalltalk.Stream);
|
3995
|
+
|
3996
|
+
smalltalk.addMethod(
|
3997
|
+
unescape('_do_'),
|
3998
|
+
smalltalk.method({
|
3999
|
+
selector: unescape('do%3A'),
|
4000
|
+
category: 'enumerating',
|
4001
|
+
fn: function (aBlock){
|
4002
|
+
var self=this;
|
4003
|
+
(function(){while(!(function(){return smalltalk.send(self, "_atEnd", []);})()) {(function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_next", [])]);})()}})();
|
4004
|
+
return self;},
|
4005
|
+
args: ["aBlock"],
|
4006
|
+
source: unescape('do%3A%20aBlock%0A%09%5Bself%20atEnd%5D%20whileFalse%3A%20%5BaBlock%20value%3A%20self%20next%5D'),
|
4007
|
+
messageSends: ["whileFalse:", "atEnd", "value:", "next"],
|
4008
|
+
referencedClasses: []
|
4009
|
+
}),
|
4010
|
+
smalltalk.Stream);
|
4011
|
+
|
4012
|
+
smalltalk.addMethod(
|
4013
|
+
unescape('_flush'),
|
4014
|
+
smalltalk.method({
|
4015
|
+
selector: unescape('flush'),
|
4016
|
+
category: 'actions',
|
4017
|
+
fn: function (){
|
4018
|
+
var self=this;
|
4019
|
+
|
4020
|
+
return self;},
|
4021
|
+
args: [],
|
4022
|
+
source: unescape('flush'),
|
4023
|
+
messageSends: [],
|
4024
|
+
referencedClasses: []
|
4025
|
+
}),
|
4026
|
+
smalltalk.Stream);
|
4027
|
+
|
4028
|
+
smalltalk.addMethod(
|
4029
|
+
unescape('_isEmpty'),
|
4030
|
+
smalltalk.method({
|
4031
|
+
selector: unescape('isEmpty'),
|
4032
|
+
category: 'testing',
|
4033
|
+
fn: function (){
|
4034
|
+
var self=this;
|
4035
|
+
return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
|
4036
|
+
return self;},
|
4037
|
+
args: [],
|
4038
|
+
source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
|
4039
|
+
messageSends: [unescape("%3D"), "size"],
|
4040
|
+
referencedClasses: []
|
4041
|
+
}),
|
4042
|
+
smalltalk.Stream);
|
4043
|
+
|
4044
|
+
smalltalk.addMethod(
|
4045
|
+
unescape('_next'),
|
4046
|
+
smalltalk.method({
|
4047
|
+
selector: unescape('next'),
|
4048
|
+
category: 'reading',
|
4049
|
+
fn: function (){
|
4050
|
+
var self=this;
|
4051
|
+
return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return nil;})() : (function(){smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return nil;}), (function(){smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);})]));
|
4052
|
+
return self;},
|
4053
|
+
args: [],
|
4054
|
+
source: unescape('next%0A%09%5Eself%20atEnd%20%0A%09%09ifTrue%3A%20%5Bnil%5D%0A%09%09ifFalse%3A%20%5B%0A%09%09%09self%20position%3A%20self%20position%20+%201.%20%0A%09%09%09collection%20at%3A%20self%20position%5D'),
|
4055
|
+
messageSends: ["ifTrue:ifFalse:", "atEnd", "position:", unescape("+"), "position", "at:"],
|
4056
|
+
referencedClasses: []
|
4057
|
+
}),
|
4058
|
+
smalltalk.Stream);
|
4059
|
+
|
4060
|
+
smalltalk.addMethod(
|
4061
|
+
unescape('_next_'),
|
4062
|
+
smalltalk.method({
|
4063
|
+
selector: unescape('next%3A'),
|
4064
|
+
category: 'reading',
|
4065
|
+
fn: function (anInteger){
|
4066
|
+
var self=this;
|
4067
|
+
var tempCollection=nil;
|
4068
|
+
(tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []));
|
4069
|
+
smalltalk.send(anInteger, "_timesRepeat_", [(function(){return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(tempCollection, "_add_", [smalltalk.send(self, "_next", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(tempCollection, "_add_", [smalltalk.send(self, "_next", [])]);})]));})]);
|
4070
|
+
return tempCollection;
|
4071
|
+
return self;},
|
4072
|
+
args: ["anInteger"],
|
4073
|
+
source: unescape('next%3A%20anInteger%0A%09%7C%20tempCollection%20%7C%0A%09tempCollection%20%3A%3D%20self%20collection%20class%20new.%0A%09anInteger%20timesRepeat%3A%20%5B%0A%09%20%20%20%20self%20atEnd%20ifFalse%3A%20%5B%0A%09%09tempCollection%20add%3A%20self%20next%5D%5D.%0A%09%5EtempCollection'),
|
4074
|
+
messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", "add:", "next"],
|
4075
|
+
referencedClasses: []
|
4076
|
+
}),
|
4077
|
+
smalltalk.Stream);
|
4078
|
+
|
4079
|
+
smalltalk.addMethod(
|
4080
|
+
unescape('_nextPut_'),
|
4081
|
+
smalltalk.method({
|
4082
|
+
selector: unescape('nextPut%3A'),
|
4083
|
+
category: 'writing',
|
4084
|
+
fn: function (anObject){
|
4085
|
+
var self=this;
|
4086
|
+
smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);
|
4087
|
+
smalltalk.send(smalltalk.send(self, "_collection", []), "_at_put_", [smalltalk.send(self, "_position", []), anObject]);
|
4088
|
+
smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
|
4089
|
+
return self;},
|
4090
|
+
args: ["anObject"],
|
4091
|
+
source: unescape('nextPut%3A%20anObject%0A%09self%20position%3A%20self%20position%20+%201.%0A%09self%20collection%20at%3A%20self%20position%20put%3A%20anObject.%0A%09self%20setStreamSize%3A%20%28self%20streamSize%20max%3A%20self%20position%29'),
|
4092
|
+
messageSends: ["position:", unescape("+"), "position", "at:put:", "collection", "setStreamSize:", "max:", "streamSize"],
|
4093
|
+
referencedClasses: []
|
4094
|
+
}),
|
4095
|
+
smalltalk.Stream);
|
4096
|
+
|
4097
|
+
smalltalk.addMethod(
|
4098
|
+
unescape('_nextPutAll_'),
|
4099
|
+
smalltalk.method({
|
4100
|
+
selector: unescape('nextPutAll%3A'),
|
4101
|
+
category: 'writing',
|
4102
|
+
fn: function (aCollection){
|
4103
|
+
var self=this;
|
4104
|
+
smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_nextPut_", [each]);})]);
|
4105
|
+
return self;},
|
4106
|
+
args: ["aCollection"],
|
4107
|
+
source: unescape('nextPutAll%3A%20aCollection%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20nextPut%3A%20each%5D'),
|
4108
|
+
messageSends: ["do:", "nextPut:"],
|
4109
|
+
referencedClasses: []
|
4110
|
+
}),
|
4111
|
+
smalltalk.Stream);
|
4112
|
+
|
4113
|
+
smalltalk.addMethod(
|
4114
|
+
unescape('_peek'),
|
4115
|
+
smalltalk.method({
|
4116
|
+
selector: unescape('peek'),
|
4117
|
+
category: 'reading',
|
4118
|
+
fn: function (){
|
4119
|
+
var self=this;
|
4120
|
+
return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})]));
|
4121
|
+
return self;},
|
4122
|
+
args: [],
|
4123
|
+
source: unescape('peek%0A%09%5Eself%20atEnd%20ifFalse%3A%20%5B%0A%09%20%20%20%20self%20collection%20at%3A%20self%20position%20+%201%5D'),
|
4124
|
+
messageSends: ["ifFalse:", "atEnd", "at:", "collection", unescape("+"), "position"],
|
4125
|
+
referencedClasses: []
|
4126
|
+
}),
|
4127
|
+
smalltalk.Stream);
|
4128
|
+
|
4129
|
+
smalltalk.addMethod(
|
4130
|
+
unescape('_position'),
|
4131
|
+
smalltalk.method({
|
4132
|
+
selector: unescape('position'),
|
4133
|
+
category: 'accessing',
|
4134
|
+
fn: function (){
|
4135
|
+
var self=this;
|
4136
|
+
return (($receiver = self['@position']) == nil || $receiver == undefined) ? (function(){return (self['@position']=(0));})() : $receiver;
|
4137
|
+
return self;},
|
4138
|
+
args: [],
|
4139
|
+
source: unescape('position%0A%09%5Eposition%20ifNil%3A%20%5Bposition%20%3A%3D%200%5D'),
|
4140
|
+
messageSends: ["ifNil:"],
|
4141
|
+
referencedClasses: []
|
4142
|
+
}),
|
4143
|
+
smalltalk.Stream);
|
4144
|
+
|
4145
|
+
smalltalk.addMethod(
|
4146
|
+
unescape('_position_'),
|
4147
|
+
smalltalk.method({
|
4148
|
+
selector: unescape('position%3A'),
|
4149
|
+
category: 'accessing',
|
4150
|
+
fn: function (anInteger){
|
4151
|
+
var self=this;
|
4152
|
+
(self['@position']=anInteger);
|
4153
|
+
return self;},
|
4154
|
+
args: ["anInteger"],
|
4155
|
+
source: unescape('position%3A%20anInteger%0A%09position%20%3A%3D%20anInteger'),
|
4156
|
+
messageSends: [],
|
4157
|
+
referencedClasses: []
|
4158
|
+
}),
|
4159
|
+
smalltalk.Stream);
|
4160
|
+
|
4161
|
+
smalltalk.addMethod(
|
4162
|
+
unescape('_reset'),
|
4163
|
+
smalltalk.method({
|
4164
|
+
selector: unescape('reset'),
|
4165
|
+
category: 'actions',
|
4166
|
+
fn: function (){
|
4167
|
+
var self=this;
|
4168
|
+
smalltalk.send(self, "_position_", [(0)]);
|
4169
|
+
return self;},
|
4170
|
+
args: [],
|
4171
|
+
source: unescape('reset%0A%09self%20position%3A%200'),
|
4172
|
+
messageSends: ["position:"],
|
4173
|
+
referencedClasses: []
|
4174
|
+
}),
|
4175
|
+
smalltalk.Stream);
|
4176
|
+
|
4177
|
+
smalltalk.addMethod(
|
4178
|
+
unescape('_resetContents'),
|
4179
|
+
smalltalk.method({
|
4180
|
+
selector: unescape('resetContents'),
|
4181
|
+
category: 'actions',
|
4182
|
+
fn: function (){
|
4183
|
+
var self=this;
|
4184
|
+
smalltalk.send(self, "_reset", []);
|
4185
|
+
smalltalk.send(self, "_setStreamSize_", [(0)]);
|
4186
|
+
return self;},
|
4187
|
+
args: [],
|
4188
|
+
source: unescape('resetContents%0A%09self%20reset.%0A%09self%20setStreamSize%3A%200'),
|
4189
|
+
messageSends: ["reset", "setStreamSize:"],
|
4190
|
+
referencedClasses: []
|
4191
|
+
}),
|
4192
|
+
smalltalk.Stream);
|
4193
|
+
|
4194
|
+
smalltalk.addMethod(
|
4195
|
+
unescape('_setCollection_'),
|
4196
|
+
smalltalk.method({
|
4197
|
+
selector: unescape('setCollection%3A'),
|
4198
|
+
category: 'accessing',
|
4199
|
+
fn: function (aCollection){
|
4200
|
+
var self=this;
|
4201
|
+
(self['@collection']=aCollection);
|
4202
|
+
return self;},
|
4203
|
+
args: ["aCollection"],
|
4204
|
+
source: unescape('setCollection%3A%20aCollection%0A%09collection%20%3A%3D%20aCollection'),
|
4205
|
+
messageSends: [],
|
4206
|
+
referencedClasses: []
|
4207
|
+
}),
|
4208
|
+
smalltalk.Stream);
|
4209
|
+
|
4210
|
+
smalltalk.addMethod(
|
4211
|
+
unescape('_setStreamSize_'),
|
4212
|
+
smalltalk.method({
|
4213
|
+
selector: unescape('setStreamSize%3A'),
|
4214
|
+
category: 'accessing',
|
4215
|
+
fn: function (anInteger){
|
4216
|
+
var self=this;
|
4217
|
+
(self['@streamSize']=anInteger);
|
4218
|
+
return self;},
|
4219
|
+
args: ["anInteger"],
|
4220
|
+
source: unescape('setStreamSize%3A%20anInteger%0A%09streamSize%20%3A%3D%20anInteger'),
|
4221
|
+
messageSends: [],
|
4222
|
+
referencedClasses: []
|
4223
|
+
}),
|
4224
|
+
smalltalk.Stream);
|
4225
|
+
|
4226
|
+
smalltalk.addMethod(
|
4227
|
+
unescape('_setToEnd'),
|
4228
|
+
smalltalk.method({
|
4229
|
+
selector: unescape('setToEnd'),
|
4230
|
+
category: 'positioning',
|
4231
|
+
fn: function (){
|
4232
|
+
var self=this;
|
4233
|
+
smalltalk.send(self, "_position_", [smalltalk.send(self, "_size", [])]);
|
4234
|
+
return self;},
|
4235
|
+
args: [],
|
4236
|
+
source: unescape('setToEnd%0A%09self%20position%3A%20self%20size'),
|
4237
|
+
messageSends: ["position:", "size"],
|
4238
|
+
referencedClasses: []
|
4239
|
+
}),
|
4240
|
+
smalltalk.Stream);
|
4241
|
+
|
4242
|
+
smalltalk.addMethod(
|
4243
|
+
unescape('_size'),
|
4244
|
+
smalltalk.method({
|
4245
|
+
selector: unescape('size'),
|
4246
|
+
category: 'accessing',
|
4247
|
+
fn: function (){
|
4248
|
+
var self=this;
|
4249
|
+
return smalltalk.send(self, "_streamSize", []);
|
4250
|
+
return self;},
|
4251
|
+
args: [],
|
4252
|
+
source: unescape('size%0A%09%5Eself%20streamSize'),
|
4253
|
+
messageSends: ["streamSize"],
|
4254
|
+
referencedClasses: []
|
4255
|
+
}),
|
4256
|
+
smalltalk.Stream);
|
4257
|
+
|
4258
|
+
smalltalk.addMethod(
|
4259
|
+
unescape('_skip_'),
|
4260
|
+
smalltalk.method({
|
4261
|
+
selector: unescape('skip%3A'),
|
4262
|
+
category: 'positioning',
|
4263
|
+
fn: function (anInteger){
|
4264
|
+
var self=this;
|
4265
|
+
smalltalk.send(self, "_position_", [smalltalk.send(((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +anInteger : smalltalk.send($receiver, "__plus", [anInteger])), "_min_max_", [smalltalk.send(self, "_size", []), (0)])]);
|
4266
|
+
return self;},
|
4267
|
+
args: ["anInteger"],
|
4268
|
+
source: unescape('skip%3A%20anInteger%0A%09self%20position%3A%20%28%28self%20position%20+%20anInteger%29%20min%3A%20self%20size%20max%3A%200%29'),
|
4269
|
+
messageSends: ["position:", "min:max:", unescape("+"), "position", "size"],
|
4270
|
+
referencedClasses: []
|
4271
|
+
}),
|
4272
|
+
smalltalk.Stream);
|
4273
|
+
|
4274
|
+
smalltalk.addMethod(
|
4275
|
+
unescape('_streamSize'),
|
4276
|
+
smalltalk.method({
|
4277
|
+
selector: unescape('streamSize'),
|
4278
|
+
category: 'accessing',
|
4279
|
+
fn: function (){
|
4280
|
+
var self=this;
|
4281
|
+
return self['@streamSize'];
|
4282
|
+
return self;},
|
4283
|
+
args: [],
|
4284
|
+
source: unescape('streamSize%0A%09%5EstreamSize'),
|
4285
|
+
messageSends: [],
|
4286
|
+
referencedClasses: []
|
4287
|
+
}),
|
4288
|
+
smalltalk.Stream);
|
4289
|
+
|
4290
|
+
|
4291
|
+
smalltalk.addMethod(
|
4292
|
+
unescape('_on_'),
|
4293
|
+
smalltalk.method({
|
4294
|
+
selector: unescape('on%3A'),
|
4295
|
+
category: 'instance creation',
|
4296
|
+
fn: function (aCollection){
|
4297
|
+
var self=this;
|
4298
|
+
return (function($rec){smalltalk.send($rec, "_setCollection_", [aCollection]);smalltalk.send($rec, "_setStreamSize_", [smalltalk.send(aCollection, "_size", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
|
4299
|
+
return self;},
|
4300
|
+
args: ["aCollection"],
|
4301
|
+
source: unescape('on%3A%20aCollection%0A%09%20%20%20%20%5Eself%20new%20%0A%09%09setCollection%3A%20aCollection%3B%0A%09%09setStreamSize%3A%20aCollection%20size%3B%0A%09%09yourself'),
|
4302
|
+
messageSends: ["setCollection:", "setStreamSize:", "size", "yourself", "new"],
|
4303
|
+
referencedClasses: []
|
4304
|
+
}),
|
4305
|
+
smalltalk.Stream.klass);
|
4306
|
+
|
4307
|
+
|
4308
|
+
smalltalk.addClass('StringStream', smalltalk.Stream, [], 'Kernel-Collections');
|
4309
|
+
smalltalk.addMethod(
|
4310
|
+
unescape('_cr'),
|
4311
|
+
smalltalk.method({
|
4312
|
+
selector: unescape('cr'),
|
4313
|
+
category: 'writing',
|
4314
|
+
fn: function (){
|
4315
|
+
var self=this;
|
4316
|
+
return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
|
4317
|
+
return self;},
|
4318
|
+
args: [],
|
4319
|
+
source: unescape('cr%0A%09%5Eself%20nextPutAll%3A%20String%20cr'),
|
4320
|
+
messageSends: ["nextPutAll:", "cr"],
|
4321
|
+
referencedClasses: ["String"]
|
4322
|
+
}),
|
4323
|
+
smalltalk.StringStream);
|
4324
|
+
|
4325
|
+
smalltalk.addMethod(
|
4326
|
+
unescape('_crlf'),
|
4327
|
+
smalltalk.method({
|
4328
|
+
selector: unescape('crlf'),
|
4329
|
+
category: 'writing',
|
4330
|
+
fn: function (){
|
4331
|
+
var self=this;
|
4332
|
+
return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_crlf", [])]);
|
4333
|
+
return self;},
|
4334
|
+
args: [],
|
4335
|
+
source: unescape('crlf%0A%09%5Eself%20nextPutAll%3A%20String%20crlf'),
|
4336
|
+
messageSends: ["nextPutAll:", "crlf"],
|
4337
|
+
referencedClasses: ["String"]
|
4338
|
+
}),
|
4339
|
+
smalltalk.StringStream);
|
4340
|
+
|
4341
|
+
smalltalk.addMethod(
|
4342
|
+
unescape('_lf'),
|
4343
|
+
smalltalk.method({
|
4344
|
+
selector: unescape('lf'),
|
4345
|
+
category: 'writing',
|
4346
|
+
fn: function (){
|
4347
|
+
var self=this;
|
4348
|
+
return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_lf", [])]);
|
4349
|
+
return self;},
|
4350
|
+
args: [],
|
4351
|
+
source: unescape('lf%0A%09%5Eself%20nextPutAll%3A%20String%20lf'),
|
4352
|
+
messageSends: ["nextPutAll:", "lf"],
|
4353
|
+
referencedClasses: ["String"]
|
4354
|
+
}),
|
4355
|
+
smalltalk.StringStream);
|
4356
|
+
|
4357
|
+
smalltalk.addMethod(
|
4358
|
+
unescape('_next_'),
|
4359
|
+
smalltalk.method({
|
4360
|
+
selector: unescape('next%3A'),
|
4361
|
+
category: 'reading',
|
4362
|
+
fn: function (anInteger){
|
4363
|
+
var self=this;
|
4364
|
+
var tempCollection=nil;
|
4365
|
+
(tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []));
|
4366
|
+
smalltalk.send(anInteger, "_timesRepeat_", [(function(){return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (tempCollection=smalltalk.send(tempCollection, "__comma", [smalltalk.send(self, "_next", [])]));})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (tempCollection=smalltalk.send(tempCollection, "__comma", [smalltalk.send(self, "_next", [])]));})]));})]);
|
4367
|
+
return tempCollection;
|
4368
|
+
return self;},
|
4369
|
+
args: ["anInteger"],
|
4370
|
+
source: unescape('next%3A%20anInteger%0A%09%7C%20tempCollection%20%7C%0A%09tempCollection%20%3A%3D%20self%20collection%20class%20new.%0A%09anInteger%20timesRepeat%3A%20%5B%0A%09%20%20%20%20self%20atEnd%20ifFalse%3A%20%5B%0A%09%09tempCollection%20%3A%3D%20tempCollection%2C%20self%20next%5D%5D.%0A%09%5EtempCollection'),
|
4371
|
+
messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", unescape("%2C"), "next"],
|
4372
|
+
referencedClasses: []
|
4373
|
+
}),
|
4374
|
+
smalltalk.StringStream);
|
4375
|
+
|
4376
|
+
smalltalk.addMethod(
|
4377
|
+
unescape('_nextPut_'),
|
4378
|
+
smalltalk.method({
|
4379
|
+
selector: unescape('nextPut%3A'),
|
4380
|
+
category: 'writing',
|
4381
|
+
fn: function (aString){
|
4382
|
+
var self=this;
|
4383
|
+
smalltalk.send(self, "_nextPutAll_", [aString]);
|
4384
|
+
return self;},
|
4385
|
+
args: ["aString"],
|
4386
|
+
source: unescape('nextPut%3A%20aString%0A%09self%20nextPutAll%3A%20aString'),
|
4387
|
+
messageSends: ["nextPutAll:"],
|
4388
|
+
referencedClasses: []
|
4389
|
+
}),
|
4390
|
+
smalltalk.StringStream);
|
4391
|
+
|
4392
|
+
smalltalk.addMethod(
|
4393
|
+
unescape('_nextPutAll_'),
|
4394
|
+
smalltalk.method({
|
4395
|
+
selector: unescape('nextPutAll%3A'),
|
4396
|
+
category: 'writing',
|
4397
|
+
fn: function (aString){
|
4398
|
+
var self=this;
|
4399
|
+
smalltalk.send(self, "_setCollection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_position", [])]), "__comma", [aString]), "__comma", [smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [((($receiver = ((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])])), smalltalk.send(smalltalk.send(self, "_collection", []), "_size", [])])])]);
|
4400
|
+
smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])]))]);
|
4401
|
+
smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
|
4402
|
+
return self;},
|
4403
|
+
args: ["aString"],
|
4404
|
+
source: unescape('nextPutAll%3A%20aString%0A%09self%20setCollection%3A%20%0A%09%20%20%20%20%28self%20collection%20copyFrom%3A%201%20to%3A%20self%20position%29%2C%0A%09%20%20%20%20aString%2C%0A%09%20%20%20%20%28self%20collection%20copyFrom%3A%20%28self%20position%20+%201%20+%20aString%20size%29%20to%3A%20self%20collection%20size%29.%0A%09self%20position%3A%20self%20position%20+%20aString%20size.%0A%09self%20setStreamSize%3A%20%28self%20streamSize%20max%3A%20self%20position%29'),
|
4405
|
+
messageSends: ["setCollection:", unescape("%2C"), "copyFrom:to:", "collection", "position", unescape("+"), "size", "position:", "setStreamSize:", "max:", "streamSize"],
|
4406
|
+
referencedClasses: []
|
4407
|
+
}),
|
4408
|
+
smalltalk.StringStream);
|
4409
|
+
|
4410
|
+
smalltalk.addMethod(
|
4411
|
+
unescape('_space'),
|
4412
|
+
smalltalk.method({
|
4413
|
+
selector: unescape('space'),
|
4414
|
+
category: 'writing',
|
4415
|
+
fn: function (){
|
4416
|
+
var self=this;
|
4417
|
+
smalltalk.send(self, "_nextPut_", [" "]);
|
4418
|
+
return self;},
|
4419
|
+
args: [],
|
4420
|
+
source: unescape('space%0A%09self%20nextPut%3A%20%27%20%27'),
|
4421
|
+
messageSends: ["nextPut:"],
|
4422
|
+
referencedClasses: []
|
4423
|
+
}),
|
4424
|
+
smalltalk.StringStream);
|
4425
|
+
|
4426
|
+
|
4427
|
+
|