gollum 2.4.4 → 2.4.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of gollum might be problematic. Click here for more details.
- data/gollum.gemspec +100 -19
- data/lib/gollum.rb +2 -3
- data/lib/gollum/frontend/public/gollum/css/gollum.css +3 -1
- data/lib/gollum/frontend/public/gollum/css/template.css +8 -12
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ace.js +64 -60
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/anchor.js +56 -62
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/anchor_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/background_tokenizer.js +56 -63
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/background_tokenizer_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/command_manager.js +11 -11
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/command_manager_test.js +59 -53
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/default_commands.js +46 -39
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/multi_select_commands.js +32 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/config.js +62 -47
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/config_test.js +71 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/css/editor.css +82 -41
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/document.js +126 -145
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/document_test.js +25 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session.js +484 -467
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/bracket_match.js +30 -63
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/fold.js +29 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/fold_line.js +27 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/folding.js +47 -55
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session_test.js +61 -41
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor.js +506 -517
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_change_document_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_highlight_selected_word_test.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_navigation_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_text_edit_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ext/static_highlight.js +28 -38
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ext/static_highlight_test.js +9 -14
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ext/textarea.js +26 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/emacs.js +44 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/hash_handler.js +45 -52
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/keybinding.js +25 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/state_handler.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/textinput.js +230 -165
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim.js +76 -49
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/commands.js +66 -61
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/aliases.js +36 -43
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/motions.js +138 -156
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/operators.js +35 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/util.js +18 -18
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/registers.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/cursor.js +116 -101
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/gutter.js +117 -83
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/marker.js +60 -71
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/text.js +163 -102
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/text_test.js +60 -41
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/browser_focus.js +26 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/dom.js +26 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/es5-shim.js +24 -1
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/event.js +52 -54
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/event_emitter.js +32 -39
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/event_emitter_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/keys.js +9 -1
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/lang.js +73 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/net.js +10 -3
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/oop.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/regexp.js +2 -2
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/useragent.js +55 -58
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/package.json +8 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/test_highlight_rules.js +144 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_javascript.txt +52 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_c9search.json +175 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_c_cpp.json +124 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_clojure.json +248 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_coffee.json +188 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_coldfusion.json +41 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_csharp.json +42 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_css.json +231 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_diff.json +732 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_glsl.json +185 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_golang.json +362 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_groovy.json +529 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_haxe.json +195 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_html.json +150 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_java.json +139 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_javascript.json +555 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_json.json +611 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jsx.json +79 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_latex.json +196 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_less.json +292 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_liquid.json +698 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lua.json +451 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_luapage.json +824 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_markdown.json +1202 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ocaml.json +260 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_perl.json +311 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_pgsql.json +1020 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_php.json +238 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_powershell.json +255 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_python.json +205 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ruby.json +104 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scad.json +267 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scala.json +748 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scss.json +181 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sh.json +434 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sql.json +73 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_svg.json +931 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_tcl.json +536 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_text.json +58 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_textile.json +195 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_xml.json +705 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_xquery.json +64 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_yaml.json +260 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/abap.js +77 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/abap_highlight_rules.js +133 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/asciidoc.js +64 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/asciidoc_highlight_rules.js +234 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/cstyle.js +195 -55
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/html.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xml.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xquery.js +31 -31
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c9search.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c9search_highlight_rules.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c_cpp.js +25 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c_cpp_highlight_rules.js +67 -60
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/clojure.js +25 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/clojure_highlight_rules.js +112 -130
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee.js +29 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/coffee-script.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/helpers.js +22 -7
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/lexer.js +140 -64
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/nodes.js +479 -237
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser.js +321 -230
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/rewriter.js +62 -28
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/scope.js +39 -20
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules.js +183 -82
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules_test.js +226 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_worker.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_highlight_rules.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/csharp_highlight_rules.js +7 -21
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css.js +36 -47
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css/csslint.js +202 -697
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_highlight_rules.js +51 -84
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_highlight_rules_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_worker.js +68 -40
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_worker_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/dart.js +62 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/dart_highlight_rules.js +192 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/diff.js +25 -31
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/diff_highlight_rules.js +27 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/doc_comment_highlight_rules.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/asciidoc.js +142 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/c9search.js +31 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/coffee.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/coffee_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle.js +30 -51
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/diff.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/fold_mode.js +35 -30
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/html.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/html_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/latex.js +162 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/lua.js +163 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/markdown.js +125 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/mixed.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/pythonic.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/pythonic_test.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/xml.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/xml_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/glsl.js +52 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/glsl_highlight_rules.js +81 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/golang.js +0 -1
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/golang_highlight_rules.js +15 -22
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/groovy_highlight_rules.js +28 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/haml.js +62 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/haml_highlight_rules.js +132 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/haxe.js +20 -25
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/haxe_highlight_rules.js +11 -15
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html_highlight_rules.js +32 -38
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html_highlight_rules_test.js +162 -69
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/jade.js +58 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/jade_highlight_rules.js +347 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/java_highlight_rules.js +18 -29
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript.js +28 -51
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript/jshint.js +4838 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_highlight_rules.js +98 -180
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_highlight_rules_test.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker.js +163 -64
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker_test.js +38 -40
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json_highlight_rules.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json_worker.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json_worker_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/jsp.js +56 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/jsp_highlight_rules.js +85 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/latex.js +3 -2
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js +1 -1
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/less.js +25 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/less_highlight_rules.js +25 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/liquid.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/liquid_highlight_rules.js +146 -161
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/liquid_highlight_rules_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lisp.js +60 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lisp_highlight_rules.js +127 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lua.js +116 -56
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lua_highlight_rules.js +75 -101
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lucene.js +16 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lucene_highlight_rules.js +49 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lucene_highlight_rules_test.js +99 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/makefile.js +62 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/makefile_highlight_rules.js +75 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/markdown.js +35 -41
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/markdown_highlight_rules.js +29 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/markdown_highlight_rules_test.js +100 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/matching_brace_outdent.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/matching_parens_outdent.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/objectivec.js +62 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/objectivec_highlight_rules.js +343 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ocaml.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ocaml_highlight_rules.js +39 -53
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/perl.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/perl_highlight_rules.js +39 -52
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/pgsql.js +33 -24
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/pgsql_highlight_rules.js +55 -51
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/php.js +57 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/php_highlight_rules.js +53 -153
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/powershell_highlight_rules.js +31 -21
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/python.js +28 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/python_highlight_rules.js +44 -61
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/python_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/r.js +135 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/r_highlight_rules.js +190 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/rdoc.js +36 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/rdoc_highlight_rules.js +99 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/rhtml.js +67 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/rhtml_highlight_rules.js +49 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ruby.js +27 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ruby_highlight_rules.js +102 -90
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ruby_highlight_rules_test.js +29 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scad.js +25 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scad_highlight_rules.js +32 -54
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scala_highlight_rules.js +18 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scss.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scss_highlight_rules.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sh.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sh_highlight_rules.js +48 -64
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sql.js +28 -18
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sql_highlight_rules.js +41 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/stylus.js +62 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/stylus_highlight_rules.js +175 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/svg.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/svg_highlight_rules.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/tcl.js +110 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/tcl_highlight_rules.js +180 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/tex.js +48 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/tex_highlight_rules.js +107 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/text.js +26 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/text_highlight_rules.js +57 -46
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/text_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/textile.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/textile_highlight_rules.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/typescript.js +68 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/typescript_highlight_rules.js +98 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_highlight_rules.js +27 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_highlight_rules_test.js +183 -78
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_util.js +30 -38
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery.js +32 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/JSONParseTreeHandler.js +92 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQueryParser.js +32954 -42497
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/visitors/SyntaxHighlighter.js +316 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery_highlight_rules.js +31 -44
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery_worker.js +48 -57
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/yaml.js +30 -18
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/yaml_highlight_rules.js +48 -40
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/model/editor.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/default_gutter_handler.js +126 -40
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/default_handlers.js +35 -43
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/dragdrop.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/fold_handler.js +78 -39
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/mouse_event.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/mouse_handler.js +39 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/multi_select_handler.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/multi_select.js +234 -103
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/multi_select_test.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/placeholder.js +30 -39
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/placeholder_test.js +27 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range.js +190 -201
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range_list.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range_list_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/renderloop.js +31 -49
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/requirejs/text.js +27 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/scrollbar.js +52 -55
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/search.js +91 -105
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/search_highlight.js +31 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/search_test.js +47 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/selection.js +138 -153
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/selection_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/split.js +67 -105
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/all.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/all_browser.js +3 -2
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/assertions.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/benchmark.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/mockrenderer.js +30 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/ambiance.css +217 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/ambiance.js +33 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/chrome.css +37 -38
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/chrome.js +27 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds.css +53 -47
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.css +54 -48
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/cobalt.css +58 -59
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/cobalt.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/crimson_editor.css +33 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/crimson_editor.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dawn.css +52 -64
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dawn.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dreamweaver.css +33 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dreamweaver.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/eclipse.css +29 -25
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/eclipse.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/github.css +14 -21
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/github.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.css +48 -60
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.css +52 -57
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore.css +53 -71
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.css +54 -77
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.css +60 -70
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/monokai.css +55 -72
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/monokai.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.css +55 -64
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.css +48 -66
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.css +49 -61
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/textmate.css +38 -44
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/textmate.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.css +59 -87
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.css +59 -87
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.css +59 -90
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.css +59 -87
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.css +57 -85
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/twilight.css +54 -78
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/twilight.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.css +45 -68
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/xcode.css +111 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/xcode.js +39 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/token_iterator.js +37 -50
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/token_iterator_test.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/tokenizer.js +40 -41
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/tokenizer_dev.js +205 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/undomanager.js +48 -55
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/virtual_renderer.js +254 -277
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/virtual_renderer_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/worker.js +22 -4
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/worker_client.js +97 -56
- data/lib/gollum/frontend/public/gollum/livepreview/licenses/ace/LICENSE.txt +24 -476
- data/lib/gollum/frontend/public/gollum/livepreview/licenses/licenses.txt +2 -2
- data/lib/gollum/frontend/views/page.rb +3 -2
- metadata +102 -21
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/Position.js +0 -59
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/StringLexer.js +0 -1686
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XMLLexer.js +0 -2993
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQDTLexer.js +0 -69
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQDTParser.js +0 -63
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQueryLexer.js +0 -10363
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQuerySemanticHighlighter.js +0 -165
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/antlr3-all.js +0 -6177
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/xquery.js +0 -55
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/definitions.js +0 -696
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/lexer.js +0 -598
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/options.js +0 -61
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/parser.js +0 -2072
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/jshint.js +0 -4469
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/jslint.js +0 -6396
@@ -1,598 +0,0 @@
|
|
1
|
-
/* vim: set sw=4 ts=4 et tw=78: */
|
2
|
-
/* ***** BEGIN LICENSE BLOCK *****
|
3
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
4
|
-
*
|
5
|
-
* The contents of this file are subject to the Mozilla Public License Version
|
6
|
-
* 1.1 (the "License"); you may not use this file except in compliance with
|
7
|
-
* the License. You may obtain a copy of the License at
|
8
|
-
* http://www.mozilla.org/MPL/
|
9
|
-
*
|
10
|
-
* Software distributed under the License is distributed on an "AS IS" basis,
|
11
|
-
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
12
|
-
* for the specific language governing rights and limitations under the
|
13
|
-
* License.
|
14
|
-
*
|
15
|
-
* The Original Code is the Narcissus JavaScript engine.
|
16
|
-
*
|
17
|
-
* The Initial Developer of the Original Code is
|
18
|
-
* Brendan Eich <brendan@mozilla.org>.
|
19
|
-
* Portions created by the Initial Developer are Copyright (C) 2004
|
20
|
-
* the Initial Developer. All Rights Reserved.
|
21
|
-
*
|
22
|
-
* Contributor(s):
|
23
|
-
* Tom Austin <taustin@ucsc.edu>
|
24
|
-
* Brendan Eich <brendan@mozilla.org>
|
25
|
-
* Shu-Yu Guo <shu@rfrn.org>
|
26
|
-
* Stephan Herhut <stephan.a.herhut@intel.com>
|
27
|
-
* Dave Herman <dherman@mozilla.com>
|
28
|
-
* Dimitris Vardoulakis <dimvar@ccs.neu.edu>
|
29
|
-
* Patrick Walton <pcwalton@mozilla.com>
|
30
|
-
*
|
31
|
-
* Alternatively, the contents of this file may be used under the terms of
|
32
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
33
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
34
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
35
|
-
* of those above. If you wish to allow use of your version of this file only
|
36
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
37
|
-
* use your version of this file under the terms of the MPL, indicate your
|
38
|
-
* decision by deleting the provisions above and replace them with the notice
|
39
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
40
|
-
* the provisions above, a recipient may use your version of this file under
|
41
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
42
|
-
*
|
43
|
-
* ***** END LICENSE BLOCK ***** */
|
44
|
-
|
45
|
-
/*
|
46
|
-
* Narcissus - JS implemented in JS.
|
47
|
-
*
|
48
|
-
* Lexical scanner.
|
49
|
-
*/
|
50
|
-
|
51
|
-
define(function(require, exports, module) {
|
52
|
-
|
53
|
-
var definitions = require('./definitions');
|
54
|
-
|
55
|
-
// Set constants in the local scope.
|
56
|
-
eval(definitions.consts);
|
57
|
-
|
58
|
-
// Build up a trie of operator tokens.
|
59
|
-
var opTokens = {};
|
60
|
-
for (var op in definitions.opTypeNames) {
|
61
|
-
if (op === '\n' || op === '.')
|
62
|
-
continue;
|
63
|
-
|
64
|
-
var node = opTokens;
|
65
|
-
for (var i = 0; i < op.length; i++) {
|
66
|
-
var ch = op[i];
|
67
|
-
if (!(ch in node))
|
68
|
-
node[ch] = {};
|
69
|
-
node = node[ch];
|
70
|
-
node.op = op;
|
71
|
-
}
|
72
|
-
}
|
73
|
-
|
74
|
-
/*
|
75
|
-
* Since JavaScript provides no convenient way to determine if a
|
76
|
-
* character is in a particular Unicode category, we use
|
77
|
-
* metacircularity to accomplish this (oh yeaaaah!)
|
78
|
-
*/
|
79
|
-
function isValidIdentifierChar(ch, first) {
|
80
|
-
// check directly for ASCII
|
81
|
-
if (ch <= "\u007F") {
|
82
|
-
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch === '$' || ch === '_' ||
|
83
|
-
(!first && (ch >= '0' && ch <= '9'))) {
|
84
|
-
return true;
|
85
|
-
}
|
86
|
-
return false;
|
87
|
-
}
|
88
|
-
|
89
|
-
// create an object to test this in
|
90
|
-
var x = {};
|
91
|
-
x["x"+ch] = true;
|
92
|
-
x[ch] = true;
|
93
|
-
|
94
|
-
// then use eval to determine if it's a valid character
|
95
|
-
var valid = false;
|
96
|
-
try {
|
97
|
-
valid = (Function("x", "return (x." + (first?"":"x") + ch + ");")(x) === true);
|
98
|
-
} catch (ex) {}
|
99
|
-
|
100
|
-
return valid;
|
101
|
-
}
|
102
|
-
|
103
|
-
function isIdentifier(str) {
|
104
|
-
if (typeof str !== "string")
|
105
|
-
return false;
|
106
|
-
|
107
|
-
if (str.length === 0)
|
108
|
-
return false;
|
109
|
-
|
110
|
-
if (!isValidIdentifierChar(str[0], true))
|
111
|
-
return false;
|
112
|
-
|
113
|
-
for (var i = 1; i < str.length; i++) {
|
114
|
-
if (!isValidIdentifierChar(str[i], false))
|
115
|
-
return false;
|
116
|
-
}
|
117
|
-
|
118
|
-
return true;
|
119
|
-
}
|
120
|
-
|
121
|
-
/*
|
122
|
-
* Tokenizer :: (source, filename, line number, boolean) -> Tokenizer
|
123
|
-
*/
|
124
|
-
function Tokenizer(s, f, l, allowHTMLComments) {
|
125
|
-
this.cursor = 0;
|
126
|
-
this.source = String(s);
|
127
|
-
this.tokens = [];
|
128
|
-
this.tokenIndex = 0;
|
129
|
-
this.lookahead = 0;
|
130
|
-
this.scanNewlines = false;
|
131
|
-
this.filename = f || "";
|
132
|
-
this.lineno = l || 1;
|
133
|
-
this.allowHTMLComments = allowHTMLComments;
|
134
|
-
this.blockComments = null;
|
135
|
-
}
|
136
|
-
|
137
|
-
Tokenizer.prototype = {
|
138
|
-
get done() {
|
139
|
-
// We need to set scanOperand to true here because the first thing
|
140
|
-
// might be a regexp.
|
141
|
-
return this.peek(true) === END;
|
142
|
-
},
|
143
|
-
|
144
|
-
get token() {
|
145
|
-
return this.tokens[this.tokenIndex];
|
146
|
-
},
|
147
|
-
|
148
|
-
match: function (tt, scanOperand, keywordIsName) {
|
149
|
-
return this.get(scanOperand, keywordIsName) === tt || this.unget();
|
150
|
-
},
|
151
|
-
|
152
|
-
mustMatch: function (tt, keywordIsName) {
|
153
|
-
if (!this.match(tt, false, keywordIsName)) {
|
154
|
-
throw this.newSyntaxError("Missing " +
|
155
|
-
definitions.tokens[tt].toLowerCase());
|
156
|
-
}
|
157
|
-
return this.token;
|
158
|
-
},
|
159
|
-
|
160
|
-
peek: function (scanOperand) {
|
161
|
-
var tt, next;
|
162
|
-
if (this.lookahead) {
|
163
|
-
next = this.tokens[(this.tokenIndex + this.lookahead) & 3];
|
164
|
-
tt = (this.scanNewlines && next.lineno !== this.lineno)
|
165
|
-
? NEWLINE
|
166
|
-
: next.type;
|
167
|
-
} else {
|
168
|
-
tt = this.get(scanOperand);
|
169
|
-
this.unget();
|
170
|
-
}
|
171
|
-
return tt;
|
172
|
-
},
|
173
|
-
|
174
|
-
peekOnSameLine: function (scanOperand) {
|
175
|
-
this.scanNewlines = true;
|
176
|
-
var tt = this.peek(scanOperand);
|
177
|
-
this.scanNewlines = false;
|
178
|
-
return tt;
|
179
|
-
},
|
180
|
-
|
181
|
-
lastBlockComment: function() {
|
182
|
-
var length = this.blockComments.length;
|
183
|
-
return length ? this.blockComments[length - 1] : null;
|
184
|
-
},
|
185
|
-
|
186
|
-
// Eat comments and whitespace.
|
187
|
-
skip: function () {
|
188
|
-
var input = this.source;
|
189
|
-
this.blockComments = [];
|
190
|
-
for (;;) {
|
191
|
-
var ch = input[this.cursor++];
|
192
|
-
var next = input[this.cursor];
|
193
|
-
// handle \r, \r\n and (always preferable) \n
|
194
|
-
if (ch === '\r') {
|
195
|
-
// if the next character is \n, we don't care about this at all
|
196
|
-
if (next === '\n') continue;
|
197
|
-
|
198
|
-
// otherwise, we want to consider this as a newline
|
199
|
-
ch = '\n';
|
200
|
-
}
|
201
|
-
|
202
|
-
if (ch === '\n' && !this.scanNewlines) {
|
203
|
-
this.lineno++;
|
204
|
-
} else if (ch === '/' && next === '*') {
|
205
|
-
var commentStart = ++this.cursor;
|
206
|
-
for (;;) {
|
207
|
-
ch = input[this.cursor++];
|
208
|
-
if (ch === undefined)
|
209
|
-
throw this.newSyntaxError("Unterminated comment");
|
210
|
-
|
211
|
-
if (ch === '*') {
|
212
|
-
next = input[this.cursor];
|
213
|
-
if (next === '/') {
|
214
|
-
var commentEnd = this.cursor - 1;
|
215
|
-
this.cursor++;
|
216
|
-
break;
|
217
|
-
}
|
218
|
-
} else if (ch === '\n') {
|
219
|
-
this.lineno++;
|
220
|
-
}
|
221
|
-
}
|
222
|
-
this.blockComments.push(input.substring(commentStart, commentEnd));
|
223
|
-
} else if ((ch === '/' && next === '/') ||
|
224
|
-
(this.allowHTMLComments && ch === '<' && next === '!' &&
|
225
|
-
input[this.cursor + 1] === '-' && input[this.cursor + 2] === '-' &&
|
226
|
-
(this.cursor += 2))) {
|
227
|
-
this.cursor++;
|
228
|
-
for (;;) {
|
229
|
-
ch = input[this.cursor++];
|
230
|
-
next = input[this.cursor];
|
231
|
-
if (ch === undefined)
|
232
|
-
return;
|
233
|
-
|
234
|
-
if (ch === '\r') {
|
235
|
-
// check for \r\n
|
236
|
-
if (next !== '\n') ch = '\n';
|
237
|
-
}
|
238
|
-
|
239
|
-
if (ch === '\n') {
|
240
|
-
if (this.scanNewlines) {
|
241
|
-
this.cursor--;
|
242
|
-
} else {
|
243
|
-
this.lineno++;
|
244
|
-
}
|
245
|
-
break;
|
246
|
-
}
|
247
|
-
}
|
248
|
-
} else if (!(ch in definitions.whitespace)) {
|
249
|
-
this.cursor--;
|
250
|
-
return;
|
251
|
-
}
|
252
|
-
}
|
253
|
-
},
|
254
|
-
|
255
|
-
// Lex the exponential part of a number, if present. Return true iff an
|
256
|
-
// exponential part was found.
|
257
|
-
lexExponent: function() {
|
258
|
-
var input = this.source;
|
259
|
-
var next = input[this.cursor];
|
260
|
-
if (next === 'e' || next === 'E') {
|
261
|
-
this.cursor++;
|
262
|
-
ch = input[this.cursor++];
|
263
|
-
if (ch === '+' || ch === '-')
|
264
|
-
ch = input[this.cursor++];
|
265
|
-
|
266
|
-
if (ch < '0' || ch > '9')
|
267
|
-
throw this.newSyntaxError("Missing exponent");
|
268
|
-
|
269
|
-
do {
|
270
|
-
ch = input[this.cursor++];
|
271
|
-
} while (ch >= '0' && ch <= '9');
|
272
|
-
this.cursor--;
|
273
|
-
|
274
|
-
return true;
|
275
|
-
}
|
276
|
-
|
277
|
-
return false;
|
278
|
-
},
|
279
|
-
|
280
|
-
lexZeroNumber: function (ch) {
|
281
|
-
var token = this.token, input = this.source;
|
282
|
-
token.type = NUMBER;
|
283
|
-
|
284
|
-
ch = input[this.cursor++];
|
285
|
-
if (ch === '.') {
|
286
|
-
do {
|
287
|
-
ch = input[this.cursor++];
|
288
|
-
} while (ch >= '0' && ch <= '9');
|
289
|
-
this.cursor--;
|
290
|
-
|
291
|
-
this.lexExponent();
|
292
|
-
token.value = parseFloat(
|
293
|
-
input.substring(token.start, this.cursor));
|
294
|
-
} else if (ch === 'x' || ch === 'X') {
|
295
|
-
do {
|
296
|
-
ch = input[this.cursor++];
|
297
|
-
} while ((ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'f') ||
|
298
|
-
(ch >= 'A' && ch <= 'F'));
|
299
|
-
this.cursor--;
|
300
|
-
|
301
|
-
token.value = parseInt(input.substring(token.start, this.cursor));
|
302
|
-
} else if (ch >= '0' && ch <= '7') {
|
303
|
-
do {
|
304
|
-
ch = input[this.cursor++];
|
305
|
-
} while (ch >= '0' && ch <= '7');
|
306
|
-
this.cursor--;
|
307
|
-
|
308
|
-
token.value = parseInt(input.substring(token.start, this.cursor));
|
309
|
-
} else {
|
310
|
-
this.cursor--;
|
311
|
-
this.lexExponent(); // 0E1, &c.
|
312
|
-
token.value = 0;
|
313
|
-
}
|
314
|
-
},
|
315
|
-
|
316
|
-
lexNumber: function (ch) {
|
317
|
-
var token = this.token, input = this.source;
|
318
|
-
token.type = NUMBER;
|
319
|
-
|
320
|
-
var floating = false;
|
321
|
-
do {
|
322
|
-
ch = input[this.cursor++];
|
323
|
-
if (ch === '.' && !floating) {
|
324
|
-
floating = true;
|
325
|
-
ch = input[this.cursor++];
|
326
|
-
}
|
327
|
-
} while (ch >= '0' && ch <= '9');
|
328
|
-
|
329
|
-
this.cursor--;
|
330
|
-
|
331
|
-
var exponent = this.lexExponent();
|
332
|
-
floating = floating || exponent;
|
333
|
-
|
334
|
-
var str = input.substring(token.start, this.cursor);
|
335
|
-
token.value = floating ? parseFloat(str) : parseInt(str);
|
336
|
-
},
|
337
|
-
|
338
|
-
lexDot: function (ch) {
|
339
|
-
var token = this.token, input = this.source;
|
340
|
-
var next = input[this.cursor];
|
341
|
-
if (next >= '0' && next <= '9') {
|
342
|
-
do {
|
343
|
-
ch = input[this.cursor++];
|
344
|
-
} while (ch >= '0' && ch <= '9');
|
345
|
-
this.cursor--;
|
346
|
-
|
347
|
-
this.lexExponent();
|
348
|
-
|
349
|
-
token.type = NUMBER;
|
350
|
-
token.value = parseFloat(
|
351
|
-
input.substring(token.start, this.cursor));
|
352
|
-
} else {
|
353
|
-
token.type = DOT;
|
354
|
-
token.assignOp = null;
|
355
|
-
token.value = '.';
|
356
|
-
}
|
357
|
-
},
|
358
|
-
|
359
|
-
lexString: function (ch) {
|
360
|
-
var token = this.token, input = this.source;
|
361
|
-
token.type = STRING;
|
362
|
-
|
363
|
-
var hasEscapes = false;
|
364
|
-
var delim = ch;
|
365
|
-
if (input.length <= this.cursor)
|
366
|
-
throw this.newSyntaxError("Unterminated string literal");
|
367
|
-
while ((ch = input[this.cursor++]) !== delim) {
|
368
|
-
if (ch == '\n' || ch == '\r')
|
369
|
-
throw this.newSyntaxError("Unterminated string literal");
|
370
|
-
if (this.cursor == input.length)
|
371
|
-
throw this.newSyntaxError("Unterminated string literal");
|
372
|
-
if (ch === '\\') {
|
373
|
-
hasEscapes = true;
|
374
|
-
if (++this.cursor == input.length)
|
375
|
-
throw this.newSyntaxError("Unterminated string literal");
|
376
|
-
}
|
377
|
-
}
|
378
|
-
|
379
|
-
token.value = hasEscapes
|
380
|
-
? eval(input.substring(token.start, this.cursor))
|
381
|
-
: input.substring(token.start + 1, this.cursor - 1);
|
382
|
-
},
|
383
|
-
|
384
|
-
lexRegExp: function (ch) {
|
385
|
-
var token = this.token, input = this.source;
|
386
|
-
token.type = REGEXP;
|
387
|
-
|
388
|
-
do {
|
389
|
-
ch = input[this.cursor++];
|
390
|
-
if (ch === '\\') {
|
391
|
-
this.cursor++;
|
392
|
-
} else if (ch === '[') {
|
393
|
-
do {
|
394
|
-
if (ch === undefined)
|
395
|
-
throw this.newSyntaxError("Unterminated character class");
|
396
|
-
|
397
|
-
if (ch === '\\')
|
398
|
-
this.cursor++;
|
399
|
-
|
400
|
-
ch = input[this.cursor++];
|
401
|
-
} while (ch !== ']');
|
402
|
-
} else if (ch === undefined) {
|
403
|
-
throw this.newSyntaxError("Unterminated regex");
|
404
|
-
}
|
405
|
-
} while (ch !== '/');
|
406
|
-
|
407
|
-
do {
|
408
|
-
ch = input[this.cursor++];
|
409
|
-
} while (ch >= 'a' && ch <= 'z');
|
410
|
-
|
411
|
-
this.cursor--;
|
412
|
-
|
413
|
-
token.value = eval(input.substring(token.start, this.cursor));
|
414
|
-
},
|
415
|
-
|
416
|
-
lexOp: function (ch) {
|
417
|
-
var token = this.token, input = this.source;
|
418
|
-
|
419
|
-
// A bit ugly, but it seems wasteful to write a trie lookup routine
|
420
|
-
// for only 3 characters...
|
421
|
-
var node = opTokens[ch];
|
422
|
-
var next = input[this.cursor];
|
423
|
-
if (next in node) {
|
424
|
-
node = node[next];
|
425
|
-
this.cursor++;
|
426
|
-
next = input[this.cursor];
|
427
|
-
if (next in node) {
|
428
|
-
node = node[next];
|
429
|
-
this.cursor++;
|
430
|
-
next = input[this.cursor];
|
431
|
-
}
|
432
|
-
}
|
433
|
-
|
434
|
-
var op = node.op;
|
435
|
-
if (definitions.assignOps[op] && input[this.cursor] === '=') {
|
436
|
-
this.cursor++;
|
437
|
-
token.type = ASSIGN;
|
438
|
-
token.assignOp = definitions.tokenIds[definitions.opTypeNames[op]];
|
439
|
-
op += '=';
|
440
|
-
} else {
|
441
|
-
token.type = definitions.tokenIds[definitions.opTypeNames[op]];
|
442
|
-
token.assignOp = null;
|
443
|
-
}
|
444
|
-
|
445
|
-
token.value = op;
|
446
|
-
},
|
447
|
-
|
448
|
-
// FIXME: Unicode escape sequences
|
449
|
-
lexIdent: function (ch, keywordIsName) {
|
450
|
-
var token = this.token;
|
451
|
-
var id = ch;
|
452
|
-
|
453
|
-
while ((ch = this.getValidIdentifierChar(false)) !== null) {
|
454
|
-
id += ch;
|
455
|
-
}
|
456
|
-
|
457
|
-
token.type = IDENTIFIER;
|
458
|
-
token.value = id;
|
459
|
-
|
460
|
-
if (keywordIsName)
|
461
|
-
return;
|
462
|
-
|
463
|
-
var kw;
|
464
|
-
|
465
|
-
if (this.parser.mozillaMode) {
|
466
|
-
kw = definitions.mozillaKeywords[id];
|
467
|
-
if (kw) {
|
468
|
-
token.type = kw;
|
469
|
-
return;
|
470
|
-
}
|
471
|
-
}
|
472
|
-
|
473
|
-
if (this.parser.x.strictMode) {
|
474
|
-
kw = definitions.strictKeywords[id];
|
475
|
-
if (kw) {
|
476
|
-
token.type = kw;
|
477
|
-
return;
|
478
|
-
}
|
479
|
-
}
|
480
|
-
|
481
|
-
kw = definitions.keywords[id];
|
482
|
-
if (kw)
|
483
|
-
token.type = kw;
|
484
|
-
},
|
485
|
-
|
486
|
-
/*
|
487
|
-
* Tokenizer.get :: ([boolean[, boolean]]) -> token type
|
488
|
-
*
|
489
|
-
* Consume input *only* if there is no lookahead.
|
490
|
-
* Dispatch to the appropriate lexing function depending on the input.
|
491
|
-
*/
|
492
|
-
get: function (scanOperand, keywordIsName) {
|
493
|
-
var token;
|
494
|
-
while (this.lookahead) {
|
495
|
-
--this.lookahead;
|
496
|
-
this.tokenIndex = (this.tokenIndex + 1) & 3;
|
497
|
-
token = this.tokens[this.tokenIndex];
|
498
|
-
if (token.type !== NEWLINE || this.scanNewlines)
|
499
|
-
return token.type;
|
500
|
-
}
|
501
|
-
|
502
|
-
this.skip();
|
503
|
-
|
504
|
-
this.tokenIndex = (this.tokenIndex + 1) & 3;
|
505
|
-
token = this.tokens[this.tokenIndex];
|
506
|
-
if (!token)
|
507
|
-
this.tokens[this.tokenIndex] = token = {};
|
508
|
-
|
509
|
-
var input = this.source;
|
510
|
-
if (this.cursor >= input.length)
|
511
|
-
return token.type = END;
|
512
|
-
|
513
|
-
token.start = this.cursor;
|
514
|
-
token.lineno = this.lineno;
|
515
|
-
|
516
|
-
var ich = this.getValidIdentifierChar(true);
|
517
|
-
var ch = (ich === null) ? input[this.cursor++] : null;
|
518
|
-
if (ich !== null) {
|
519
|
-
this.lexIdent(ich, keywordIsName);
|
520
|
-
} else if (scanOperand && ch === '/') {
|
521
|
-
this.lexRegExp(ch);
|
522
|
-
} else if (ch in opTokens) {
|
523
|
-
this.lexOp(ch);
|
524
|
-
} else if (ch === '.') {
|
525
|
-
this.lexDot(ch);
|
526
|
-
} else if (ch >= '1' && ch <= '9') {
|
527
|
-
this.lexNumber(ch);
|
528
|
-
} else if (ch === '0') {
|
529
|
-
this.lexZeroNumber(ch);
|
530
|
-
} else if (ch === '"' || ch === "'") {
|
531
|
-
this.lexString(ch);
|
532
|
-
} else if (this.scanNewlines && (ch === '\n' || ch === '\r')) {
|
533
|
-
// if this was a \r, look for \r\n
|
534
|
-
if (ch === '\r' && input[this.cursor] === '\n') this.cursor++;
|
535
|
-
token.type = NEWLINE;
|
536
|
-
token.value = '\n';
|
537
|
-
this.lineno++;
|
538
|
-
} else {
|
539
|
-
throw this.newSyntaxError("Illegal token");
|
540
|
-
}
|
541
|
-
|
542
|
-
token.end = this.cursor;
|
543
|
-
return token.type;
|
544
|
-
},
|
545
|
-
|
546
|
-
/*
|
547
|
-
* Tokenizer.unget :: void -> undefined
|
548
|
-
*
|
549
|
-
* Match depends on unget returning undefined.
|
550
|
-
*/
|
551
|
-
unget: function () {
|
552
|
-
if (++this.lookahead === 4) throw "PANIC: too much lookahead!";
|
553
|
-
this.tokenIndex = (this.tokenIndex - 1) & 3;
|
554
|
-
},
|
555
|
-
|
556
|
-
newSyntaxError: function (m) {
|
557
|
-
m = (this.filename ? this.filename + ":" : "") + this.lineno + ": " + m;
|
558
|
-
var e = new SyntaxError(m, this.filename, this.lineno);
|
559
|
-
e.source = this.source;
|
560
|
-
e.cursor = this.lookahead
|
561
|
-
? this.tokens[(this.tokenIndex + this.lookahead) & 3].start
|
562
|
-
: this.cursor;
|
563
|
-
return e;
|
564
|
-
},
|
565
|
-
|
566
|
-
|
567
|
-
/* Gets a single valid identifier char from the input stream, or null
|
568
|
-
* if there is none.
|
569
|
-
*/
|
570
|
-
getValidIdentifierChar: function(first) {
|
571
|
-
var input = this.source;
|
572
|
-
if (this.cursor >= input.length) return null;
|
573
|
-
var ch = input[this.cursor];
|
574
|
-
|
575
|
-
// first check for \u escapes
|
576
|
-
if (ch === '\\' && input[this.cursor+1] === 'u') {
|
577
|
-
// get the character value
|
578
|
-
try {
|
579
|
-
ch = String.fromCharCode(parseInt(
|
580
|
-
input.substring(this.cursor + 2, this.cursor + 6),
|
581
|
-
16));
|
582
|
-
} catch (ex) {
|
583
|
-
return null;
|
584
|
-
}
|
585
|
-
this.cursor += 5;
|
586
|
-
}
|
587
|
-
|
588
|
-
var valid = isValidIdentifierChar(ch, first);
|
589
|
-
if (valid) this.cursor++;
|
590
|
-
return (valid ? ch : null);
|
591
|
-
},
|
592
|
-
};
|
593
|
-
|
594
|
-
|
595
|
-
exports.isIdentifier = isIdentifier;
|
596
|
-
exports.Tokenizer = Tokenizer;
|
597
|
-
|
598
|
-
});
|