chess_engine 0.0.2 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/chess_engine +4 -0
- metadata +5 -288
- data/Gemfile +0 -5
- data/Gemfile.lock +0 -21
- data/README.md +0 -26
- data/chess_engine-0.0.1.gem +0 -0
- data/chess_engine.gemspec +0 -14
- data/lib/chess_engine/board.rb +0 -95
- data/lib/chess_engine/cli.rb +0 -105
- data/lib/chess_engine/game.rb +0 -148
- data/lib/chess_engine/input.rb +0 -19
- data/lib/chess_engine/move.rb +0 -35
- data/lib/chess_engine/piece.rb +0 -97
- data/lib/chess_engine/validator.rb +0 -87
- data/vendor/bundle/bin/coderay +0 -27
- data/vendor/bundle/bin/pry +0 -27
- data/vendor/bundle/cache/coderay-1.1.2.gem +0 -0
- data/vendor/bundle/cache/colorize-0.8.1.gem +0 -0
- data/vendor/bundle/cache/method_source-0.9.2.gem +0 -0
- data/vendor/bundle/cache/pry-0.12.2.gem +0 -0
- data/vendor/bundle/cache/rb-readline-0.5.5.gem +0 -0
- data/vendor/bundle/gems/coderay-1.1.2/MIT-LICENSE +0 -22
- data/vendor/bundle/gems/coderay-1.1.2/README_INDEX.rdoc +0 -123
- data/vendor/bundle/gems/coderay-1.1.2/bin/coderay +0 -215
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/duo.rb +0 -81
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/_map.rb +0 -17
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/comment_filter.rb +0 -25
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/count.rb +0 -39
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/debug.rb +0 -49
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/debug_lint.rb +0 -63
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/div.rb +0 -23
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/encoder.rb +0 -190
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/filter.rb +0 -58
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html/css.rb +0 -65
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html/numbering.rb +0 -108
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html/output.rb +0 -166
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html.rb +0 -333
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/json.rb +0 -83
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/lines_of_code.rb +0 -45
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/lint.rb +0 -59
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/null.rb +0 -18
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/page.rb +0 -24
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/span.rb +0 -23
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/statistic.rb +0 -95
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/terminal.rb +0 -195
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/text.rb +0 -46
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/token_kind_filter.rb +0 -111
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/xml.rb +0 -72
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/yaml.rb +0 -50
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders.rb +0 -18
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/for_redcloth.rb +0 -95
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/file_type.rb +0 -151
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/plugin.rb +0 -55
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/plugin_host.rb +0 -221
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/word_list.rb +0 -72
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/_map.rb +0 -24
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/c.rb +0 -189
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/clojure.rb +0 -217
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/cpp.rb +0 -217
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/css.rb +0 -196
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/debug.rb +0 -75
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/delphi.rb +0 -144
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/diff.rb +0 -221
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/erb.rb +0 -81
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/go.rb +0 -208
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/groovy.rb +0 -268
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/haml.rb +0 -168
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/html.rb +0 -275
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/java/builtin_types.rb +0 -421
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/java.rb +0 -174
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/java_script.rb +0 -237
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/json.rb +0 -98
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/lua.rb +0 -280
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/php.rb +0 -527
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/python.rb +0 -287
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/raydebug.rb +0 -75
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/ruby/patterns.rb +0 -178
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/ruby/string_state.rb +0 -79
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/ruby.rb +0 -477
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/sass.rb +0 -232
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/scanner.rb +0 -337
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/sql.rb +0 -169
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb +0 -36
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/text.rb +0 -26
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/xml.rb +0 -17
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/yaml.rb +0 -140
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners.rb +0 -27
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles/_map.rb +0 -7
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles/alpha.rb +0 -153
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles/style.rb +0 -18
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles.rb +0 -15
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/token_kinds.rb +0 -85
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/tokens.rb +0 -161
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/tokens_proxy.rb +0 -55
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/version.rb +0 -3
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay.rb +0 -284
- data/vendor/bundle/gems/colorize-0.8.1/CHANGELOG +0 -65
- data/vendor/bundle/gems/colorize-0.8.1/LICENSE +0 -339
- data/vendor/bundle/gems/colorize-0.8.1/README.md +0 -105
- data/vendor/bundle/gems/colorize-0.8.1/Rakefile +0 -13
- data/vendor/bundle/gems/colorize-0.8.1/colorize.gemspec +0 -36
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorize/class_methods.rb +0 -120
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorize/instance_methods.rb +0 -132
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorize.rb +0 -12
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorized_string.rb +0 -19
- data/vendor/bundle/gems/colorize-0.8.1/test/test_colorize.rb +0 -164
- data/vendor/bundle/gems/method_source-0.9.2/Gemfile +0 -2
- data/vendor/bundle/gems/method_source-0.9.2/LICENSE +0 -25
- data/vendor/bundle/gems/method_source-0.9.2/README.markdown +0 -91
- data/vendor/bundle/gems/method_source-0.9.2/Rakefile +0 -81
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source/code_helpers.rb +0 -154
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source/source_location.rb +0 -138
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source/version.rb +0 -3
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source.rb +0 -141
- data/vendor/bundle/gems/method_source-0.9.2/method_source.gemspec +0 -35
- data/vendor/bundle/gems/method_source-0.9.2/spec/method_source/code_helpers_spec.rb +0 -43
- data/vendor/bundle/gems/method_source-0.9.2/spec/method_source_spec.rb +0 -143
- data/vendor/bundle/gems/method_source-0.9.2/spec/spec_helper.rb +0 -101
- data/vendor/bundle/gems/pry-0.12.2/CHANGELOG.md +0 -953
- data/vendor/bundle/gems/pry-0.12.2/LICENSE +0 -25
- data/vendor/bundle/gems/pry-0.12.2/README.md +0 -390
- data/vendor/bundle/gems/pry-0.12.2/bin/pry +0 -8
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/basic_object.rb +0 -6
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/cli.rb +0 -218
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code/code_file.rb +0 -110
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code/code_range.rb +0 -71
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code/loc.rb +0 -98
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code.rb +0 -353
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code_object.rb +0 -195
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/color_printer.rb +0 -65
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/command.rb +0 -723
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/command_set.rb +0 -415
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/amend_line.rb +0 -98
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/bang.rb +0 -20
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/bang_pry.rb +0 -17
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/abstract_formatter.rb +0 -27
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/exception_formatter.rb +0 -79
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/file_formatter.rb +0 -71
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/input_expression_formatter.rb +0 -43
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat.rb +0 -63
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cd.rb +0 -41
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/change_inspector.rb +0 -27
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/change_prompt.rb +0 -46
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/clear_screen.rb +0 -14
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/code_collector.rb +0 -167
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/disable_pry.rb +0 -27
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/disabled_commands.rb +0 -2
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/easter_eggs.rb +0 -112
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/edit/exception_patcher.rb +0 -25
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/edit/file_and_line_locator.rb +0 -36
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/edit.rb +0 -200
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/exit.rb +0 -43
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/exit_all.rb +0 -29
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/exit_program.rb +0 -23
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/find_method.rb +0 -191
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/fix_indent.rb +0 -19
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_cd.rb +0 -26
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_install.rb +0 -32
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_list.rb +0 -33
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_open.rb +0 -29
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_readme.rb +0 -25
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_search.rb +0 -40
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_stats.rb +0 -83
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gist.rb +0 -102
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/help.rb +0 -164
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/hist.rb +0 -181
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/import_set.rb +0 -23
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/install_command.rb +0 -54
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/jump_to.rb +0 -29
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/list_inspectors.rb +0 -35
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/constants.rb +0 -58
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/formatter.rb +0 -51
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/globals.rb +0 -46
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/grep.rb +0 -19
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/instance_vars.rb +0 -38
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/interrogatable.rb +0 -18
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/jruby_hacks.rb +0 -49
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/local_names.rb +0 -33
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/local_vars.rb +0 -37
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/ls_entity.rb +0 -69
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/methods.rb +0 -54
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/methods_helper.rb +0 -46
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/self_methods.rb +0 -33
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls.rb +0 -113
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/nesting.rb +0 -25
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/play.rb +0 -102
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/pry_backtrace.rb +0 -25
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/pry_version.rb +0 -17
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/raise_up.rb +0 -33
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/reload_code.rb +0 -62
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/reset.rb +0 -18
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ri.rb +0 -65
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/save_file.rb +0 -61
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/shell_command.rb +0 -75
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/shell_mode.rb +0 -25
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_doc.rb +0 -81
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_info.rb +0 -216
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_input.rb +0 -17
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_source.rb +0 -53
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/stat.rb +0 -40
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/switch_to.rb +0 -23
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/toggle_color.rb +0 -24
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/watch_expression/expression.rb +0 -38
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/watch_expression.rb +0 -107
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/whereami.rb +0 -197
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/wtf.rb +0 -70
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands.rb +0 -6
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/behavior.rb +0 -255
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/convenience.rb +0 -28
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/default.rb +0 -159
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/memoization.rb +0 -48
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config.rb +0 -35
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/core_extensions.rb +0 -142
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/editor.rb +0 -128
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/exceptions.rb +0 -76
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/forwardable.rb +0 -23
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/base_helpers.rb +0 -200
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/command_helpers.rb +0 -157
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/documentation_helpers.rb +0 -76
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/options_helpers.rb +0 -27
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/platform.rb +0 -58
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/table.rb +0 -114
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/text.rb +0 -115
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers.rb +0 -6
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/history.rb +0 -161
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/hooks.rb +0 -171
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/indent.rb +0 -408
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/input_completer.rb +0 -265
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/input_lock.rb +0 -130
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/inspector.rb +0 -27
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/last_exception.rb +0 -61
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method/disowned.rb +0 -55
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method/patcher.rb +0 -122
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method/weird_method_locator.rb +0 -198
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method.rb +0 -552
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/object_path.rb +0 -83
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/output.rb +0 -50
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/pager.rb +0 -250
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/platform.rb +0 -91
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/plugins.rb +0 -122
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/prompt.rb +0 -145
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/pry_class.rb +0 -425
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/pry_instance.rb +0 -699
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/repl.rb +0 -261
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/repl_file_loader.rb +0 -73
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/ring.rb +0 -84
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/rubygem.rb +0 -84
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop/LICENSE +0 -20
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop/commands.rb +0 -195
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop/option.rb +0 -206
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop.rb +0 -661
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/terminal.rb +0 -91
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/evalable.rb +0 -15
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/mockable.rb +0 -14
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/pry_tester.rb +0 -73
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/utility.rb +0 -26
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/variables.rb +0 -46
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable.rb +0 -70
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/version.rb +0 -3
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/wrapped_module/candidate.rb +0 -131
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/wrapped_module.rb +0 -378
- data/vendor/bundle/gems/pry-0.12.2/lib/pry.rb +0 -132
- data/vendor/bundle/gems/rb-readline-0.5.5/CHANGES +0 -94
- data/vendor/bundle/gems/rb-readline-0.5.5/LICENSE +0 -25
- data/vendor/bundle/gems/rb-readline-0.5.5/README.md +0 -81
- data/vendor/bundle/gems/rb-readline-0.5.5/Rakefile +0 -25
- data/vendor/bundle/gems/rb-readline-0.5.5/bench/_rl_adjust_point.rb +0 -26
- data/vendor/bundle/gems/rb-readline-0.5.5/examples/example_readline.rb +0 -8
- data/vendor/bundle/gems/rb-readline-0.5.5/examples/example_readline_with_completion.rb +0 -18
- data/vendor/bundle/gems/rb-readline-0.5.5/examples/tinyirb.rb +0 -11
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/rb-readline.rb +0 -18
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/rbreadline/version.rb +0 -3
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/rbreadline.rb +0 -8920
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/readline.rb +0 -539
- data/vendor/bundle/gems/rb-readline-0.5.5/rb-readline.gemspec +0 -51
- data/vendor/bundle/gems/rb-readline-0.5.5/setup.rb +0 -1585
- data/vendor/bundle/gems/rb-readline-0.5.5/test/support/filesystem_completion_helper.rb +0 -53
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_completion.rb +0 -100
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_filename_completion_proc.rb +0 -88
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_history.rb +0 -29
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_rbreadline.rb +0 -23
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_readline.rb +0 -221
- data/vendor/bundle/specifications/coderay-1.1.2.gemspec +0 -26
- data/vendor/bundle/specifications/colorize-0.8.1.gemspec +0 -38
- data/vendor/bundle/specifications/method_source-0.9.2.gemspec +0 -35
- data/vendor/bundle/specifications/pry-0.12.2.gemspec +0 -38
- data/vendor/bundle/specifications/rb-readline-0.5.5.gemspec +0 -39
@@ -1,208 +0,0 @@
|
|
1
|
-
module CodeRay
|
2
|
-
module Scanners
|
3
|
-
|
4
|
-
class Go < Scanner
|
5
|
-
|
6
|
-
register_for :go
|
7
|
-
file_extension 'go'
|
8
|
-
|
9
|
-
# http://golang.org/ref/spec#Keywords
|
10
|
-
KEYWORDS = [
|
11
|
-
'break', 'default', 'func', 'interface', 'select',
|
12
|
-
'case', 'defer', 'go', 'map', 'struct',
|
13
|
-
'chan', 'else', 'goto', 'package', 'switch',
|
14
|
-
'const', 'fallthrough', 'if', 'range', 'type',
|
15
|
-
'continue', 'for', 'import', 'return', 'var',
|
16
|
-
] # :nodoc:
|
17
|
-
|
18
|
-
# http://golang.org/ref/spec#Types
|
19
|
-
PREDEFINED_TYPES = [
|
20
|
-
'bool',
|
21
|
-
'uint8', 'uint16', 'uint32', 'uint64',
|
22
|
-
'int8', 'int16', 'int32', 'int64',
|
23
|
-
'float32', 'float64',
|
24
|
-
'complex64', 'complex128',
|
25
|
-
'byte', 'rune', 'string', 'error',
|
26
|
-
'uint', 'int', 'uintptr',
|
27
|
-
] # :nodoc:
|
28
|
-
|
29
|
-
PREDEFINED_CONSTANTS = [
|
30
|
-
'nil', 'iota',
|
31
|
-
'true', 'false',
|
32
|
-
] # :nodoc:
|
33
|
-
|
34
|
-
PREDEFINED_FUNCTIONS = %w[
|
35
|
-
append cap close complex copy delete imag len
|
36
|
-
make new panic print println real recover
|
37
|
-
] # :nodoc:
|
38
|
-
|
39
|
-
IDENT_KIND = WordList.new(:ident).
|
40
|
-
add(KEYWORDS, :keyword).
|
41
|
-
add(PREDEFINED_TYPES, :predefined_type).
|
42
|
-
add(PREDEFINED_CONSTANTS, :predefined_constant).
|
43
|
-
add(PREDEFINED_FUNCTIONS, :predefined) # :nodoc:
|
44
|
-
|
45
|
-
ESCAPE = / [rbfntv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x # :nodoc:
|
46
|
-
UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x # :nodoc:
|
47
|
-
|
48
|
-
protected
|
49
|
-
|
50
|
-
def scan_tokens encoder, options
|
51
|
-
|
52
|
-
state = :initial
|
53
|
-
label_expected = true
|
54
|
-
case_expected = false
|
55
|
-
label_expected_before_preproc_line = nil
|
56
|
-
in_preproc_line = false
|
57
|
-
|
58
|
-
until eos?
|
59
|
-
|
60
|
-
case state
|
61
|
-
|
62
|
-
when :initial
|
63
|
-
|
64
|
-
if match = scan(/ \s+ | \\\n /x)
|
65
|
-
if in_preproc_line && match != "\\\n" && match.index(?\n)
|
66
|
-
in_preproc_line = false
|
67
|
-
case_expected = false
|
68
|
-
label_expected = label_expected_before_preproc_line
|
69
|
-
end
|
70
|
-
encoder.text_token match, :space
|
71
|
-
|
72
|
-
elsif match = scan(%r! // [^\n\\]* (?: \\. [^\n\\]* )* | /\* (?: .*? \*/ | .* ) !mx)
|
73
|
-
encoder.text_token match, :comment
|
74
|
-
|
75
|
-
elsif match = scan(/ <?- (?![\d.]) | [+*=<>?:;,!&^|()\[\]{}~%]+ | \/=? | \.(?!\d) /x)
|
76
|
-
if case_expected
|
77
|
-
label_expected = true if match == ':'
|
78
|
-
case_expected = false
|
79
|
-
end
|
80
|
-
encoder.text_token match, :operator
|
81
|
-
|
82
|
-
elsif match = scan(/ [A-Za-z_][A-Za-z_0-9]* /x)
|
83
|
-
kind = IDENT_KIND[match]
|
84
|
-
if kind == :ident && label_expected && !in_preproc_line && scan(/:(?!:)/)
|
85
|
-
kind = :label
|
86
|
-
label_expected = false
|
87
|
-
match << matched
|
88
|
-
else
|
89
|
-
label_expected = false
|
90
|
-
if kind == :keyword
|
91
|
-
case match
|
92
|
-
when 'case', 'default'
|
93
|
-
case_expected = true
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
encoder.text_token match, kind
|
98
|
-
|
99
|
-
elsif match = scan(/L?"/)
|
100
|
-
encoder.begin_group :string
|
101
|
-
if match[0] == ?L
|
102
|
-
encoder.text_token 'L', :modifier
|
103
|
-
match = '"'
|
104
|
-
end
|
105
|
-
encoder.text_token match, :delimiter
|
106
|
-
state = :string
|
107
|
-
|
108
|
-
elsif match = scan(/ ` ([^`]+)? (`)? /x)
|
109
|
-
encoder.begin_group :shell
|
110
|
-
encoder.text_token '`', :delimiter
|
111
|
-
encoder.text_token self[1], :content if self[1]
|
112
|
-
encoder.text_token self[2], :delimiter if self[2]
|
113
|
-
encoder.end_group :shell
|
114
|
-
|
115
|
-
elsif match = scan(/ \# \s* if \s* 0 /x)
|
116
|
-
match << scan_until(/ ^\# (?:elif|else|endif) .*? $ | \z /xm) unless eos?
|
117
|
-
encoder.text_token match, :comment
|
118
|
-
|
119
|
-
elsif match = scan(/#[ \t]*(\w*)/)
|
120
|
-
encoder.text_token match, :preprocessor
|
121
|
-
in_preproc_line = true
|
122
|
-
label_expected_before_preproc_line = label_expected
|
123
|
-
state = :include_expected if self[1] == 'include'
|
124
|
-
|
125
|
-
elsif match = scan(/ L?' (?: [^\'\n\\] | \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) )? '? /ox)
|
126
|
-
label_expected = false
|
127
|
-
encoder.text_token match, :char
|
128
|
-
|
129
|
-
elsif match = scan(/\$/)
|
130
|
-
encoder.text_token match, :ident
|
131
|
-
|
132
|
-
elsif match = scan(/-?\d*(\.\d*)?([eE][+-]?\d+)?i/)
|
133
|
-
label_expected = false
|
134
|
-
encoder.text_token match, :imaginary
|
135
|
-
|
136
|
-
elsif match = scan(/-?0[xX][0-9A-Fa-f]+/)
|
137
|
-
label_expected = false
|
138
|
-
encoder.text_token match, :hex
|
139
|
-
|
140
|
-
elsif match = scan(/-?(?:0[0-7]+)(?![89.eEfF])/)
|
141
|
-
label_expected = false
|
142
|
-
encoder.text_token match, :octal
|
143
|
-
|
144
|
-
elsif match = scan(/-?(?:\d*\.\d+|\d+\.)(?:[eE][+-]?\d+)?|\d+[eE][+-]?\d+/)
|
145
|
-
label_expected = false
|
146
|
-
encoder.text_token match, :float
|
147
|
-
|
148
|
-
elsif match = scan(/-?(?:\d+)(?![.eEfF])L?L?/)
|
149
|
-
label_expected = false
|
150
|
-
encoder.text_token match, :integer
|
151
|
-
|
152
|
-
else
|
153
|
-
encoder.text_token getch, :error
|
154
|
-
|
155
|
-
end
|
156
|
-
|
157
|
-
when :string
|
158
|
-
if match = scan(/[^\\\n"]+/)
|
159
|
-
encoder.text_token match, :content
|
160
|
-
elsif match = scan(/"/)
|
161
|
-
encoder.text_token match, :delimiter
|
162
|
-
encoder.end_group :string
|
163
|
-
state = :initial
|
164
|
-
label_expected = false
|
165
|
-
elsif match = scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox)
|
166
|
-
encoder.text_token match, :char
|
167
|
-
elsif match = scan(/ \\ /x)
|
168
|
-
encoder.text_token match, :error
|
169
|
-
elsif match = scan(/$/)
|
170
|
-
encoder.end_group :string
|
171
|
-
state = :initial
|
172
|
-
label_expected = false
|
173
|
-
else
|
174
|
-
raise_inspect "else case \" reached; %p not handled." % peek(1), encoder
|
175
|
-
end
|
176
|
-
|
177
|
-
when :include_expected
|
178
|
-
if match = scan(/<[^>\n]+>?|"[^"\n\\]*(?:\\.[^"\n\\]*)*"?/)
|
179
|
-
encoder.text_token match, :include
|
180
|
-
state = :initial
|
181
|
-
|
182
|
-
elsif match = scan(/\s+/)
|
183
|
-
encoder.text_token match, :space
|
184
|
-
state = :initial if match.index ?\n
|
185
|
-
|
186
|
-
else
|
187
|
-
state = :initial
|
188
|
-
|
189
|
-
end
|
190
|
-
|
191
|
-
else
|
192
|
-
raise_inspect 'Unknown state', encoder
|
193
|
-
|
194
|
-
end
|
195
|
-
|
196
|
-
end
|
197
|
-
|
198
|
-
if state == :string
|
199
|
-
encoder.end_group :string
|
200
|
-
end
|
201
|
-
|
202
|
-
encoder
|
203
|
-
end
|
204
|
-
|
205
|
-
end
|
206
|
-
|
207
|
-
end
|
208
|
-
end
|
@@ -1,268 +0,0 @@
|
|
1
|
-
module CodeRay
|
2
|
-
module Scanners
|
3
|
-
|
4
|
-
load :java
|
5
|
-
|
6
|
-
# Scanner for Groovy.
|
7
|
-
class Groovy < Java
|
8
|
-
|
9
|
-
register_for :groovy
|
10
|
-
|
11
|
-
# TODO: check list of keywords
|
12
|
-
GROOVY_KEYWORDS = %w[
|
13
|
-
as assert def in
|
14
|
-
] # :nodoc:
|
15
|
-
KEYWORDS_EXPECTING_VALUE = WordList.new.add %w[
|
16
|
-
case instanceof new return throw typeof while as assert in
|
17
|
-
] # :nodoc:
|
18
|
-
GROOVY_MAGIC_VARIABLES = %w[ it ] # :nodoc:
|
19
|
-
|
20
|
-
IDENT_KIND = Java::IDENT_KIND.dup.
|
21
|
-
add(GROOVY_KEYWORDS, :keyword).
|
22
|
-
add(GROOVY_MAGIC_VARIABLES, :local_variable) # :nodoc:
|
23
|
-
|
24
|
-
ESCAPE = / [bfnrtv$\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x # :nodoc:
|
25
|
-
UNICODE_ESCAPE = / u[a-fA-F0-9]{4} /x # :nodoc: no 4-byte unicode chars? U[a-fA-F0-9]{8}
|
26
|
-
REGEXP_ESCAPE = / [bfnrtv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} | \d | [bBdDsSwW\/] /x # :nodoc:
|
27
|
-
|
28
|
-
# TODO: interpretation inside ', ", /
|
29
|
-
STRING_CONTENT_PATTERN = {
|
30
|
-
"'" => /(?>\\[^\\'\n]+|[^\\'\n]+)+/,
|
31
|
-
'"' => /[^\\$"\n]+/,
|
32
|
-
"'''" => /(?>[^\\']+|'(?!''))+/,
|
33
|
-
'"""' => /(?>[^\\$"]+|"(?!""))+/,
|
34
|
-
'/' => /[^\\$\/\n]+/,
|
35
|
-
} # :nodoc:
|
36
|
-
|
37
|
-
protected
|
38
|
-
|
39
|
-
def setup
|
40
|
-
@state = :initial
|
41
|
-
end
|
42
|
-
|
43
|
-
def scan_tokens encoder, options
|
44
|
-
state = options[:state] || @state
|
45
|
-
inline_block_stack = []
|
46
|
-
inline_block_paren_depth = nil
|
47
|
-
string_delimiter = nil
|
48
|
-
import_clause = class_name_follows = last_token = after_def = false
|
49
|
-
value_expected = true
|
50
|
-
|
51
|
-
until eos?
|
52
|
-
|
53
|
-
case state
|
54
|
-
|
55
|
-
when :initial
|
56
|
-
|
57
|
-
if match = scan(/ \s+ | \\\n /x)
|
58
|
-
encoder.text_token match, :space
|
59
|
-
if match.index ?\n
|
60
|
-
import_clause = after_def = false
|
61
|
-
value_expected = true unless value_expected
|
62
|
-
end
|
63
|
-
next
|
64
|
-
|
65
|
-
elsif match = scan(%r! // [^\n\\]* (?: \\. [^\n\\]* )* | /\* (?: .*? \*/ | .* ) !mx)
|
66
|
-
value_expected = true
|
67
|
-
after_def = false
|
68
|
-
encoder.text_token match, :comment
|
69
|
-
|
70
|
-
elsif bol? && match = scan(/ \#!.* /x)
|
71
|
-
encoder.text_token match, :doctype
|
72
|
-
|
73
|
-
elsif import_clause && match = scan(/ (?!as) #{IDENT} (?: \. #{IDENT} )* (?: \.\* )? /ox)
|
74
|
-
after_def = value_expected = false
|
75
|
-
encoder.text_token match, :include
|
76
|
-
|
77
|
-
elsif match = scan(/ #{IDENT} | \[\] /ox)
|
78
|
-
kind = IDENT_KIND[match]
|
79
|
-
value_expected = (kind == :keyword) && KEYWORDS_EXPECTING_VALUE[match]
|
80
|
-
if last_token == '.'
|
81
|
-
kind = :ident
|
82
|
-
elsif class_name_follows
|
83
|
-
kind = :class
|
84
|
-
class_name_follows = false
|
85
|
-
elsif after_def && check(/\s*[({]/)
|
86
|
-
kind = :method
|
87
|
-
after_def = false
|
88
|
-
elsif kind == :ident && last_token != '?' && check(/:/)
|
89
|
-
kind = :key
|
90
|
-
else
|
91
|
-
class_name_follows = true if match == 'class' || (import_clause && match == 'as')
|
92
|
-
import_clause = match == 'import'
|
93
|
-
after_def = true if match == 'def'
|
94
|
-
end
|
95
|
-
encoder.text_token match, kind
|
96
|
-
|
97
|
-
elsif match = scan(/;/)
|
98
|
-
import_clause = after_def = false
|
99
|
-
value_expected = true
|
100
|
-
encoder.text_token match, :operator
|
101
|
-
|
102
|
-
elsif match = scan(/\{/)
|
103
|
-
class_name_follows = after_def = false
|
104
|
-
value_expected = true
|
105
|
-
encoder.text_token match, :operator
|
106
|
-
if !inline_block_stack.empty?
|
107
|
-
inline_block_paren_depth += 1
|
108
|
-
end
|
109
|
-
|
110
|
-
# TODO: ~'...', ~"..." and ~/.../ style regexps
|
111
|
-
elsif match = scan(/ \.\.<? | \*?\.(?!\d)@? | \.& | \?:? | [,?:(\[] | -[->] | \+\+ |
|
112
|
-
&& | \|\| | \*\*=? | ==?~ | <=?>? | [-+*%^~&|>=!]=? | <<<?=? | >>>?=? /x)
|
113
|
-
value_expected = true
|
114
|
-
value_expected = :regexp if match == '~'
|
115
|
-
after_def = false
|
116
|
-
encoder.text_token match, :operator
|
117
|
-
|
118
|
-
elsif match = scan(/ [)\]}] /x)
|
119
|
-
value_expected = after_def = false
|
120
|
-
if !inline_block_stack.empty? && match == '}'
|
121
|
-
inline_block_paren_depth -= 1
|
122
|
-
if inline_block_paren_depth == 0 # closing brace of inline block reached
|
123
|
-
encoder.text_token match, :inline_delimiter
|
124
|
-
encoder.end_group :inline
|
125
|
-
state, string_delimiter, inline_block_paren_depth = inline_block_stack.pop
|
126
|
-
next
|
127
|
-
end
|
128
|
-
end
|
129
|
-
encoder.text_token match, :operator
|
130
|
-
|
131
|
-
elsif check(/[\d.]/)
|
132
|
-
after_def = value_expected = false
|
133
|
-
if match = scan(/0[xX][0-9A-Fa-f]+/)
|
134
|
-
encoder.text_token match, :hex
|
135
|
-
elsif match = scan(/(?>0[0-7]+)(?![89.eEfF])/)
|
136
|
-
encoder.text_token match, :octal
|
137
|
-
elsif match = scan(/\d+[fFdD]|\d*\.\d+(?:[eE][+-]?\d+)?[fFdD]?|\d+[eE][+-]?\d+[fFdD]?/)
|
138
|
-
encoder.text_token match, :float
|
139
|
-
elsif match = scan(/\d+[lLgG]?/)
|
140
|
-
encoder.text_token match, :integer
|
141
|
-
end
|
142
|
-
|
143
|
-
elsif match = scan(/'''|"""/)
|
144
|
-
after_def = value_expected = false
|
145
|
-
state = :multiline_string
|
146
|
-
encoder.begin_group :string
|
147
|
-
string_delimiter = match
|
148
|
-
encoder.text_token match, :delimiter
|
149
|
-
|
150
|
-
# TODO: record.'name' syntax
|
151
|
-
elsif match = scan(/["']/)
|
152
|
-
after_def = value_expected = false
|
153
|
-
state = match == '/' ? :regexp : :string
|
154
|
-
encoder.begin_group state
|
155
|
-
string_delimiter = match
|
156
|
-
encoder.text_token match, :delimiter
|
157
|
-
|
158
|
-
elsif value_expected && match = scan(/\//)
|
159
|
-
after_def = value_expected = false
|
160
|
-
encoder.begin_group :regexp
|
161
|
-
state = :regexp
|
162
|
-
string_delimiter = '/'
|
163
|
-
encoder.text_token match, :delimiter
|
164
|
-
|
165
|
-
elsif match = scan(/ @ #{IDENT} /ox)
|
166
|
-
after_def = value_expected = false
|
167
|
-
encoder.text_token match, :annotation
|
168
|
-
|
169
|
-
elsif match = scan(/\//)
|
170
|
-
after_def = false
|
171
|
-
value_expected = true
|
172
|
-
encoder.text_token match, :operator
|
173
|
-
|
174
|
-
else
|
175
|
-
encoder.text_token getch, :error
|
176
|
-
|
177
|
-
end
|
178
|
-
|
179
|
-
when :string, :regexp, :multiline_string
|
180
|
-
if match = scan(STRING_CONTENT_PATTERN[string_delimiter])
|
181
|
-
encoder.text_token match, :content
|
182
|
-
|
183
|
-
elsif match = scan(state == :multiline_string ? /'''|"""/ : /["'\/]/)
|
184
|
-
encoder.text_token match, :delimiter
|
185
|
-
if state == :regexp
|
186
|
-
# TODO: regexp modifiers? s, m, x, i?
|
187
|
-
modifiers = scan(/[ix]+/)
|
188
|
-
encoder.text_token modifiers, :modifier if modifiers && !modifiers.empty?
|
189
|
-
end
|
190
|
-
state = :string if state == :multiline_string
|
191
|
-
encoder.end_group state
|
192
|
-
string_delimiter = nil
|
193
|
-
after_def = value_expected = false
|
194
|
-
state = :initial
|
195
|
-
next
|
196
|
-
|
197
|
-
elsif (state == :string || state == :multiline_string) &&
|
198
|
-
(match = scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox))
|
199
|
-
if string_delimiter[0] == ?' && !(match == "\\\\" || match == "\\'")
|
200
|
-
encoder.text_token match, :content
|
201
|
-
else
|
202
|
-
encoder.text_token match, :char
|
203
|
-
end
|
204
|
-
elsif state == :regexp && match = scan(/ \\ (?: #{REGEXP_ESCAPE} | #{UNICODE_ESCAPE} ) /mox)
|
205
|
-
encoder.text_token match, :char
|
206
|
-
|
207
|
-
elsif match = scan(/ \$ #{IDENT} /mox)
|
208
|
-
encoder.begin_group :inline
|
209
|
-
encoder.text_token '$', :inline_delimiter
|
210
|
-
match = match[1..-1]
|
211
|
-
encoder.text_token match, IDENT_KIND[match]
|
212
|
-
encoder.end_group :inline
|
213
|
-
next
|
214
|
-
elsif match = scan(/ \$ \{ /x)
|
215
|
-
encoder.begin_group :inline
|
216
|
-
encoder.text_token match, :inline_delimiter
|
217
|
-
inline_block_stack << [state, string_delimiter, inline_block_paren_depth]
|
218
|
-
inline_block_paren_depth = 1
|
219
|
-
state = :initial
|
220
|
-
next
|
221
|
-
|
222
|
-
elsif match = scan(/ \$ /mx)
|
223
|
-
encoder.text_token match, :content
|
224
|
-
|
225
|
-
elsif match = scan(/ \\. /mx)
|
226
|
-
encoder.text_token match, :content # TODO: Shouldn't this be :error?
|
227
|
-
|
228
|
-
elsif match = scan(/ \\ | \n /x)
|
229
|
-
encoder.end_group state == :regexp ? :regexp : :string
|
230
|
-
encoder.text_token match, :error
|
231
|
-
after_def = value_expected = false
|
232
|
-
state = :initial
|
233
|
-
|
234
|
-
else
|
235
|
-
raise_inspect "else case \" reached; %p not handled." % peek(1), encoder
|
236
|
-
|
237
|
-
end
|
238
|
-
|
239
|
-
else
|
240
|
-
raise_inspect 'Unknown state', encoder
|
241
|
-
|
242
|
-
end
|
243
|
-
|
244
|
-
last_token = match unless [:space, :comment, :doctype].include? kind
|
245
|
-
|
246
|
-
end
|
247
|
-
|
248
|
-
if [:multiline_string, :string, :regexp].include? state
|
249
|
-
encoder.end_group state == :regexp ? :regexp : :string
|
250
|
-
end
|
251
|
-
|
252
|
-
if options[:keep_state]
|
253
|
-
@state = state
|
254
|
-
end
|
255
|
-
|
256
|
-
until inline_block_stack.empty?
|
257
|
-
state, = *inline_block_stack.pop
|
258
|
-
encoder.end_group :inline
|
259
|
-
encoder.end_group state == :regexp ? :regexp : :string
|
260
|
-
end
|
261
|
-
|
262
|
-
encoder
|
263
|
-
end
|
264
|
-
|
265
|
-
end
|
266
|
-
|
267
|
-
end
|
268
|
-
end
|