gump 0.1.6
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 +7 -0
- data/.gitignore +24 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +71 -0
- data/Rakefile +2 -0
- data/bin/gump +37 -0
- data/gump.gemspec +17 -0
- data/lib/gump.rb +50 -0
- data/lib/version.rb +3 -0
- data/server/assets/css/style.css +6949 -0
- data/server/assets/images/arrow.png +0 -0
- data/server/assets/images/logo.png +0 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap-theme.css +347 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap-theme.css.map +1 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap-theme.min.css +7 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap.css +5785 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap.css.map +1 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap.min.css +7 -0
- data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
- data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +229 -0
- data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
- data/server/assets/js/bootstrap/dist/js/bootstrap.js +1951 -0
- data/server/assets/js/bootstrap/dist/js/bootstrap.min.js +6 -0
- data/server/assets/js/jquery.codemirror/.gitattributes +8 -0
- data/server/assets/js/jquery.codemirror/.gitignore +6 -0
- data/server/assets/js/jquery.codemirror/.travis.yml +3 -0
- data/server/assets/js/jquery.codemirror/AUTHORS +255 -0
- data/server/assets/js/jquery.codemirror/CONTRIBUTING.md +72 -0
- data/server/assets/js/jquery.codemirror/LICENSE +19 -0
- data/server/assets/js/jquery.codemirror/README.md +11 -0
- data/server/assets/js/jquery.codemirror/addon/comment/comment.js +145 -0
- data/server/assets/js/jquery.codemirror/addon/comment/continuecomment.js +54 -0
- data/server/assets/js/jquery.codemirror/addon/dialog/dialog.css +32 -0
- data/server/assets/js/jquery.codemirror/addon/dialog/dialog.js +121 -0
- data/server/assets/js/jquery.codemirror/addon/display/fullscreen.css +6 -0
- data/server/assets/js/jquery.codemirror/addon/display/fullscreen.js +31 -0
- data/server/assets/js/jquery.codemirror/addon/display/placeholder.js +48 -0
- data/server/assets/js/jquery.codemirror/addon/edit/closebrackets.js +82 -0
- data/server/assets/js/jquery.codemirror/addon/edit/closetag.js +89 -0
- data/server/assets/js/jquery.codemirror/addon/edit/continuelist.js +25 -0
- data/server/assets/js/jquery.codemirror/addon/edit/matchbrackets.js +87 -0
- data/server/assets/js/jquery.codemirror/addon/edit/matchtags.js +56 -0
- data/server/assets/js/jquery.codemirror/addon/edit/trailingspace.js +15 -0
- data/server/assets/js/jquery.codemirror/addon/fold/brace-fold.js +93 -0
- data/server/assets/js/jquery.codemirror/addon/fold/comment-fold.js +40 -0
- data/server/assets/js/jquery.codemirror/addon/fold/foldcode.js +75 -0
- data/server/assets/js/jquery.codemirror/addon/fold/foldgutter.css +21 -0
- data/server/assets/js/jquery.codemirror/addon/fold/foldgutter.js +124 -0
- data/server/assets/js/jquery.codemirror/addon/fold/indent-fold.js +30 -0
- data/server/assets/js/jquery.codemirror/addon/fold/xml-fold.js +167 -0
- data/server/assets/js/jquery.codemirror/addon/hint/anyword-hint.js +34 -0
- data/server/assets/js/jquery.codemirror/addon/hint/css-hint.js +50 -0
- data/server/assets/js/jquery.codemirror/addon/hint/html-hint.js +337 -0
- data/server/assets/js/jquery.codemirror/addon/hint/javascript-hint.js +131 -0
- data/server/assets/js/jquery.codemirror/addon/hint/pig-hint.js +121 -0
- data/server/assets/js/jquery.codemirror/addon/hint/python-hint.js +95 -0
- data/server/assets/js/jquery.codemirror/addon/hint/show-hint.css +38 -0
- data/server/assets/js/jquery.codemirror/addon/hint/show-hint.js +286 -0
- data/server/assets/js/jquery.codemirror/addon/hint/sql-hint.js +105 -0
- data/server/assets/js/jquery.codemirror/addon/hint/xml-hint.js +69 -0
- data/server/assets/js/jquery.codemirror/addon/lint/coffeescript-lint.js +27 -0
- data/server/assets/js/jquery.codemirror/addon/lint/css-lint.js +19 -0
- data/server/assets/js/jquery.codemirror/addon/lint/javascript-lint.js +126 -0
- data/server/assets/js/jquery.codemirror/addon/lint/json-lint.js +17 -0
- data/server/assets/js/jquery.codemirror/addon/lint/lint.css +73 -0
- data/server/assets/js/jquery.codemirror/addon/lint/lint.js +203 -0
- data/server/assets/js/jquery.codemirror/addon/merge/dep/diff_match_patch.js +50 -0
- data/server/assets/js/jquery.codemirror/addon/merge/merge.css +92 -0
- data/server/assets/js/jquery.codemirror/addon/merge/merge.js +474 -0
- data/server/assets/js/jquery.codemirror/addon/mode/loadmode.js +51 -0
- data/server/assets/js/jquery.codemirror/addon/mode/multiplex.js +101 -0
- data/server/assets/js/jquery.codemirror/addon/mode/multiplex_test.js +30 -0
- data/server/assets/js/jquery.codemirror/addon/mode/overlay.js +59 -0
- data/server/assets/js/jquery.codemirror/addon/runmode/colorize.js +29 -0
- data/server/assets/js/jquery.codemirror/addon/runmode/runmode-standalone.js +136 -0
- data/server/assets/js/jquery.codemirror/addon/runmode/runmode.js +56 -0
- data/server/assets/js/jquery.codemirror/addon/runmode/runmode.node.js +103 -0
- data/server/assets/js/jquery.codemirror/addon/scroll/scrollpastend.js +34 -0
- data/server/assets/js/jquery.codemirror/addon/search/match-highlighter.js +91 -0
- data/server/assets/js/jquery.codemirror/addon/search/search.js +133 -0
- data/server/assets/js/jquery.codemirror/addon/search/searchcursor.js +143 -0
- data/server/assets/js/jquery.codemirror/addon/selection/active-line.js +39 -0
- data/server/assets/js/jquery.codemirror/addon/selection/mark-selection.js +108 -0
- data/server/assets/js/jquery.codemirror/addon/tern/tern.css +85 -0
- data/server/assets/js/jquery.codemirror/addon/tern/tern.js +632 -0
- data/server/assets/js/jquery.codemirror/addon/tern/worker.js +41 -0
- data/server/assets/js/jquery.codemirror/addon/wrap/hardwrap.js +99 -0
- data/server/assets/js/jquery.codemirror/bin/authors.sh +6 -0
- data/server/assets/js/jquery.codemirror/bin/compress +92 -0
- data/server/assets/js/jquery.codemirror/bin/lint +16 -0
- data/server/assets/js/jquery.codemirror/bin/source-highlight +61 -0
- data/server/assets/js/jquery.codemirror/bower.json +15 -0
- data/server/assets/js/jquery.codemirror/demo/activeline.html +78 -0
- data/server/assets/js/jquery.codemirror/demo/anywordhint.html +79 -0
- data/server/assets/js/jquery.codemirror/demo/bidi.html +74 -0
- data/server/assets/js/jquery.codemirror/demo/btree.html +86 -0
- data/server/assets/js/jquery.codemirror/demo/buffers.html +109 -0
- data/server/assets/js/jquery.codemirror/demo/changemode.html +59 -0
- data/server/assets/js/jquery.codemirror/demo/closebrackets.html +63 -0
- data/server/assets/js/jquery.codemirror/demo/closetag.html +40 -0
- data/server/assets/js/jquery.codemirror/demo/complete.html +80 -0
- data/server/assets/js/jquery.codemirror/demo/emacs.html +75 -0
- data/server/assets/js/jquery.codemirror/demo/folding.html +75 -0
- data/server/assets/js/jquery.codemirror/demo/fullscreen.html +130 -0
- data/server/assets/js/jquery.codemirror/demo/hardwrap.html +69 -0
- data/server/assets/js/jquery.codemirror/demo/html5complete.html +54 -0
- data/server/assets/js/jquery.codemirror/demo/indentwrap.html +58 -0
- data/server/assets/js/jquery.codemirror/demo/lint.html +171 -0
- data/server/assets/js/jquery.codemirror/demo/loadmode.html +49 -0
- data/server/assets/js/jquery.codemirror/demo/marker.html +52 -0
- data/server/assets/js/jquery.codemirror/demo/markselection.html +45 -0
- data/server/assets/js/jquery.codemirror/demo/matchhighlighter.html +47 -0
- data/server/assets/js/jquery.codemirror/demo/matchtags.html +49 -0
- data/server/assets/js/jquery.codemirror/demo/merge.html +82 -0
- data/server/assets/js/jquery.codemirror/demo/multiplex.html +75 -0
- data/server/assets/js/jquery.codemirror/demo/mustache.html +68 -0
- data/server/assets/js/jquery.codemirror/demo/placeholder.html +45 -0
- data/server/assets/js/jquery.codemirror/demo/preview.html +88 -0
- data/server/assets/js/jquery.codemirror/demo/resize.html +58 -0
- data/server/assets/js/jquery.codemirror/demo/runmode.html +62 -0
- data/server/assets/js/jquery.codemirror/demo/search.html +94 -0
- data/server/assets/js/jquery.codemirror/demo/spanaffectswrapping_shim.html +85 -0
- data/server/assets/js/jquery.codemirror/demo/tern.html +129 -0
- data/server/assets/js/jquery.codemirror/demo/theme.html +121 -0
- data/server/assets/js/jquery.codemirror/demo/trailingspace.html +48 -0
- data/server/assets/js/jquery.codemirror/demo/variableheight.html +67 -0
- data/server/assets/js/jquery.codemirror/demo/vim.html +74 -0
- data/server/assets/js/jquery.codemirror/demo/visibletabs.html +62 -0
- data/server/assets/js/jquery.codemirror/demo/widget.html +85 -0
- data/server/assets/js/jquery.codemirror/demo/xmlcomplete.html +116 -0
- data/server/assets/js/jquery.codemirror/index.html +192 -0
- data/server/assets/js/jquery.codemirror/keymap/emacs.js +387 -0
- data/server/assets/js/jquery.codemirror/keymap/extra.js +43 -0
- data/server/assets/js/jquery.codemirror/keymap/vim.js +3703 -0
- data/server/assets/js/jquery.codemirror/lib/codemirror.css +263 -0
- data/server/assets/js/jquery.codemirror/lib/codemirror.js +5944 -0
- data/server/assets/js/jquery.codemirror/mode/apl/apl.js +160 -0
- data/server/assets/js/jquery.codemirror/mode/apl/index.html +72 -0
- data/server/assets/js/jquery.codemirror/mode/asterisk/asterisk.js +183 -0
- data/server/assets/js/jquery.codemirror/mode/asterisk/index.html +154 -0
- data/server/assets/js/jquery.codemirror/mode/clike/clike.js +362 -0
- data/server/assets/js/jquery.codemirror/mode/clike/index.html +195 -0
- data/server/assets/js/jquery.codemirror/mode/clike/scala.html +767 -0
- data/server/assets/js/jquery.codemirror/mode/clojure/clojure.js +224 -0
- data/server/assets/js/jquery.codemirror/mode/clojure/index.html +88 -0
- data/server/assets/js/jquery.codemirror/mode/cobol/cobol.js +240 -0
- data/server/assets/js/jquery.codemirror/mode/cobol/index.html +210 -0
- data/server/assets/js/jquery.codemirror/mode/coffeescript/coffeescript.js +354 -0
- data/server/assets/js/jquery.codemirror/mode/coffeescript/index.html +740 -0
- data/server/assets/js/jquery.codemirror/mode/commonlisp/commonlisp.js +105 -0
- data/server/assets/js/jquery.codemirror/mode/commonlisp/index.html +177 -0
- data/server/assets/js/jquery.codemirror/mode/css/css.js +639 -0
- data/server/assets/js/jquery.codemirror/mode/css/index.html +70 -0
- data/server/assets/js/jquery.codemirror/mode/css/scss.html +157 -0
- data/server/assets/js/jquery.codemirror/mode/css/scss_test.js +93 -0
- data/server/assets/js/jquery.codemirror/mode/css/test.js +142 -0
- data/server/assets/js/jquery.codemirror/mode/d/d.js +205 -0
- data/server/assets/js/jquery.codemirror/mode/d/index.html +273 -0
- data/server/assets/js/jquery.codemirror/mode/diff/diff.js +32 -0
- data/server/assets/js/jquery.codemirror/mode/diff/index.html +117 -0
- data/server/assets/js/jquery.codemirror/mode/dtd/dtd.js +127 -0
- data/server/assets/js/jquery.codemirror/mode/dtd/index.html +89 -0
- data/server/assets/js/jquery.codemirror/mode/ecl/ecl.js +192 -0
- data/server/assets/js/jquery.codemirror/mode/ecl/index.html +52 -0
- data/server/assets/js/jquery.codemirror/mode/eiffel/eiffel.js +147 -0
- data/server/assets/js/jquery.codemirror/mode/eiffel/index.html +430 -0
- data/server/assets/js/jquery.codemirror/mode/erlang/erlang.js +484 -0
- data/server/assets/js/jquery.codemirror/mode/erlang/index.html +75 -0
- data/server/assets/js/jquery.codemirror/mode/fortran/fortran.js +173 -0
- data/server/assets/js/jquery.codemirror/mode/fortran/index.html +81 -0
- data/server/assets/js/jquery.codemirror/mode/gas/gas.js +330 -0
- data/server/assets/js/jquery.codemirror/mode/gas/index.html +68 -0
- data/server/assets/js/jquery.codemirror/mode/gfm/gfm.js +97 -0
- data/server/assets/js/jquery.codemirror/mode/gfm/index.html +82 -0
- data/server/assets/js/jquery.codemirror/mode/gfm/test.js +112 -0
- data/server/assets/js/jquery.codemirror/mode/gherkin/gherkin.js +168 -0
- data/server/assets/js/jquery.codemirror/mode/gherkin/index.html +48 -0
- data/server/assets/js/jquery.codemirror/mode/go/go.js +168 -0
- data/server/assets/js/jquery.codemirror/mode/go/index.html +85 -0
- data/server/assets/js/jquery.codemirror/mode/groovy/groovy.js +211 -0
- data/server/assets/js/jquery.codemirror/mode/groovy/index.html +84 -0
- data/server/assets/js/jquery.codemirror/mode/haml/haml.js +153 -0
- data/server/assets/js/jquery.codemirror/mode/haml/index.html +79 -0
- data/server/assets/js/jquery.codemirror/mode/haml/test.js +94 -0
- data/server/assets/js/jquery.codemirror/mode/haskell/haskell.js +250 -0
- data/server/assets/js/jquery.codemirror/mode/haskell/index.html +73 -0
- data/server/assets/js/jquery.codemirror/mode/haxe/haxe.js +429 -0
- data/server/assets/js/jquery.codemirror/mode/haxe/index.html +103 -0
- data/server/assets/js/jquery.codemirror/mode/htmlembedded/htmlembedded.js +73 -0
- data/server/assets/js/jquery.codemirror/mode/htmlembedded/index.html +60 -0
- data/server/assets/js/jquery.codemirror/mode/htmlmixed/htmlmixed.js +104 -0
- data/server/assets/js/jquery.codemirror/mode/htmlmixed/index.html +85 -0
- data/server/assets/js/jquery.codemirror/mode/http/http.js +98 -0
- data/server/assets/js/jquery.codemirror/mode/http/index.html +45 -0
- data/server/assets/js/jquery.codemirror/mode/index.html +114 -0
- data/server/assets/js/jquery.codemirror/mode/jade/index.html +66 -0
- data/server/assets/js/jquery.codemirror/mode/jade/jade.js +90 -0
- data/server/assets/js/jquery.codemirror/mode/javascript/index.html +107 -0
- data/server/assets/js/jquery.codemirror/mode/javascript/javascript.js +617 -0
- data/server/assets/js/jquery.codemirror/mode/javascript/test.js +72 -0
- data/server/assets/js/jquery.codemirror/mode/javascript/typescript.html +61 -0
- data/server/assets/js/jquery.codemirror/mode/jinja2/index.html +50 -0
- data/server/assets/js/jquery.codemirror/mode/jinja2/jinja2.js +42 -0
- data/server/assets/js/jquery.codemirror/mode/julia/index.html +187 -0
- data/server/assets/js/jquery.codemirror/mode/julia/julia.js +262 -0
- data/server/assets/js/jquery.codemirror/mode/less/index.html +753 -0
- data/server/assets/js/jquery.codemirror/mode/less/less.js +346 -0
- data/server/assets/js/jquery.codemirror/mode/livescript/index.html +459 -0
- data/server/assets/js/jquery.codemirror/mode/livescript/livescript.js +267 -0
- data/server/assets/js/jquery.codemirror/mode/livescript/livescript.ls +266 -0
- data/server/assets/js/jquery.codemirror/mode/lua/index.html +86 -0
- data/server/assets/js/jquery.codemirror/mode/lua/lua.js +144 -0
- data/server/assets/js/jquery.codemirror/mode/markdown/index.html +359 -0
- data/server/assets/js/jquery.codemirror/mode/markdown/markdown.js +560 -0
- data/server/assets/js/jquery.codemirror/mode/markdown/test.js +664 -0
- data/server/assets/js/jquery.codemirror/mode/meta.js +91 -0
- data/server/assets/js/jquery.codemirror/mode/mirc/index.html +161 -0
- data/server/assets/js/jquery.codemirror/mode/mirc/mirc.js +177 -0
- data/server/assets/js/jquery.codemirror/mode/nginx/index.html +181 -0
- data/server/assets/js/jquery.codemirror/mode/nginx/nginx.js +163 -0
- data/server/assets/js/jquery.codemirror/mode/ntriples/index.html +45 -0
- data/server/assets/js/jquery.codemirror/mode/ntriples/ntriples.js +170 -0
- data/server/assets/js/jquery.codemirror/mode/ocaml/index.html +146 -0
- data/server/assets/js/jquery.codemirror/mode/ocaml/ocaml.js +116 -0
- data/server/assets/js/jquery.codemirror/mode/octave/index.html +95 -0
- data/server/assets/js/jquery.codemirror/mode/octave/octave.js +118 -0
- data/server/assets/js/jquery.codemirror/mode/pascal/index.html +61 -0
- data/server/assets/js/jquery.codemirror/mode/pascal/pascal.js +94 -0
- data/server/assets/js/jquery.codemirror/mode/pegjs/index.html +66 -0
- data/server/assets/js/jquery.codemirror/mode/pegjs/pegjs.js +103 -0
- data/server/assets/js/jquery.codemirror/mode/perl/index.html +75 -0
- data/server/assets/js/jquery.codemirror/mode/perl/perl.js +816 -0
- data/server/assets/js/jquery.codemirror/mode/php/index.html +62 -0
- data/server/assets/js/jquery.codemirror/mode/php/php.js +132 -0
- data/server/assets/js/jquery.codemirror/mode/pig/index.html +55 -0
- data/server/assets/js/jquery.codemirror/mode/pig/pig.js +171 -0
- data/server/assets/js/jquery.codemirror/mode/properties/index.html +53 -0
- data/server/assets/js/jquery.codemirror/mode/properties/properties.js +63 -0
- data/server/assets/js/jquery.codemirror/mode/python/index.html +187 -0
- data/server/assets/js/jquery.codemirror/mode/python/python.js +368 -0
- data/server/assets/js/jquery.codemirror/mode/q/index.html +144 -0
- data/server/assets/js/jquery.codemirror/mode/q/q.js +124 -0
- data/server/assets/js/jquery.codemirror/mode/r/index.html +86 -0
- data/server/assets/js/jquery.codemirror/mode/r/r.js +141 -0
- data/server/assets/js/jquery.codemirror/mode/rpm/changes/changes.js +19 -0
- data/server/assets/js/jquery.codemirror/mode/rpm/changes/index.html +67 -0
- data/server/assets/js/jquery.codemirror/mode/rpm/spec/index.html +114 -0
- data/server/assets/js/jquery.codemirror/mode/rpm/spec/spec.css +5 -0
- data/server/assets/js/jquery.codemirror/mode/rpm/spec/spec.js +66 -0
- data/server/assets/js/jquery.codemirror/mode/rst/index.html +534 -0
- data/server/assets/js/jquery.codemirror/mode/rst/rst.js +560 -0
- data/server/assets/js/jquery.codemirror/mode/ruby/index.html +185 -0
- data/server/assets/js/jquery.codemirror/mode/ruby/ruby.js +247 -0
- data/server/assets/js/jquery.codemirror/mode/rust/index.html +61 -0
- data/server/assets/js/jquery.codemirror/mode/rust/rust.js +436 -0
- data/server/assets/js/jquery.codemirror/mode/sass/index.html +66 -0
- data/server/assets/js/jquery.codemirror/mode/sass/sass.js +330 -0
- data/server/assets/js/jquery.codemirror/mode/scheme/index.html +77 -0
- data/server/assets/js/jquery.codemirror/mode/scheme/scheme.js +232 -0
- data/server/assets/js/jquery.codemirror/mode/shell/index.html +66 -0
- data/server/assets/js/jquery.codemirror/mode/shell/shell.js +118 -0
- data/server/assets/js/jquery.codemirror/mode/sieve/index.html +93 -0
- data/server/assets/js/jquery.codemirror/mode/sieve/sieve.js +183 -0
- data/server/assets/js/jquery.codemirror/mode/smalltalk/index.html +68 -0
- data/server/assets/js/jquery.codemirror/mode/smalltalk/smalltalk.js +151 -0
- data/server/assets/js/jquery.codemirror/mode/smarty/index.html +136 -0
- data/server/assets/js/jquery.codemirror/mode/smarty/smarty.js +205 -0
- data/server/assets/js/jquery.codemirror/mode/smartymixed/index.html +114 -0
- data/server/assets/js/jquery.codemirror/mode/smartymixed/smartymixed.js +175 -0
- data/server/assets/js/jquery.codemirror/mode/sparql/index.html +54 -0
- data/server/assets/js/jquery.codemirror/mode/sparql/sparql.js +145 -0
- data/server/assets/js/jquery.codemirror/mode/sql/index.html +75 -0
- data/server/assets/js/jquery.codemirror/mode/sql/sql.js +365 -0
- data/server/assets/js/jquery.codemirror/mode/stex/index.html +110 -0
- data/server/assets/js/jquery.codemirror/mode/stex/stex.js +246 -0
- data/server/assets/js/jquery.codemirror/mode/stex/test.js +120 -0
- data/server/assets/js/jquery.codemirror/mode/tcl/index.html +143 -0
- data/server/assets/js/jquery.codemirror/mode/tcl/tcl.js +131 -0
- data/server/assets/js/jquery.codemirror/mode/tiddlywiki/index.html +155 -0
- data/server/assets/js/jquery.codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
- data/server/assets/js/jquery.codemirror/mode/tiddlywiki/tiddlywiki.js +353 -0
- data/server/assets/js/jquery.codemirror/mode/tiki/index.html +95 -0
- data/server/assets/js/jquery.codemirror/mode/tiki/tiki.css +26 -0
- data/server/assets/js/jquery.codemirror/mode/tiki/tiki.js +308 -0
- data/server/assets/js/jquery.codemirror/mode/toml/index.html +73 -0
- data/server/assets/js/jquery.codemirror/mode/toml/toml.js +71 -0
- data/server/assets/js/jquery.codemirror/mode/turtle/index.html +51 -0
- data/server/assets/js/jquery.codemirror/mode/turtle/turtle.js +145 -0
- data/server/assets/js/jquery.codemirror/mode/vb/index.html +103 -0
- data/server/assets/js/jquery.codemirror/mode/vb/vb.js +259 -0
- data/server/assets/js/jquery.codemirror/mode/vbscript/index.html +55 -0
- data/server/assets/js/jquery.codemirror/mode/vbscript/vbscript.js +334 -0
- data/server/assets/js/jquery.codemirror/mode/velocity/index.html +119 -0
- data/server/assets/js/jquery.codemirror/mode/velocity/velocity.js +186 -0
- data/server/assets/js/jquery.codemirror/mode/verilog/index.html +132 -0
- data/server/assets/js/jquery.codemirror/mode/verilog/verilog.js +182 -0
- data/server/assets/js/jquery.codemirror/mode/xml/index.html +57 -0
- data/server/assets/js/jquery.codemirror/mode/xml/xml.js +345 -0
- data/server/assets/js/jquery.codemirror/mode/xquery/index.html +210 -0
- data/server/assets/js/jquery.codemirror/mode/xquery/test.js +64 -0
- data/server/assets/js/jquery.codemirror/mode/xquery/xquery.js +432 -0
- data/server/assets/js/jquery.codemirror/mode/yaml/index.html +80 -0
- data/server/assets/js/jquery.codemirror/mode/yaml/yaml.js +97 -0
- data/server/assets/js/jquery.codemirror/mode/z80/index.html +52 -0
- data/server/assets/js/jquery.codemirror/mode/z80/z80.js +85 -0
- data/server/assets/js/jquery.codemirror/package.json +19 -0
- data/server/assets/js/jquery.codemirror/test/comment_test.js +51 -0
- data/server/assets/js/jquery.codemirror/test/doc_test.js +329 -0
- data/server/assets/js/jquery.codemirror/test/driver.js +139 -0
- data/server/assets/js/jquery.codemirror/test/emacs_test.js +135 -0
- data/server/assets/js/jquery.codemirror/test/index.html +209 -0
- data/server/assets/js/jquery.codemirror/test/lint/acorn.js +1593 -0
- data/server/assets/js/jquery.codemirror/test/lint/lint.js +139 -0
- data/server/assets/js/jquery.codemirror/test/lint/walk.js +216 -0
- data/server/assets/js/jquery.codemirror/test/mode_test.css +10 -0
- data/server/assets/js/jquery.codemirror/test/mode_test.js +200 -0
- data/server/assets/js/jquery.codemirror/test/phantom_driver.js +31 -0
- data/server/assets/js/jquery.codemirror/test/run.js +34 -0
- data/server/assets/js/jquery.codemirror/test/test.js +1562 -0
- data/server/assets/js/jquery.codemirror/test/vim_test.js +2391 -0
- data/server/assets/js/jquery.codemirror/theme/3024-day.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/3024-night.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/ambiance-mobile.css +5 -0
- data/server/assets/js/jquery.codemirror/theme/ambiance.css +70 -0
- data/server/assets/js/jquery.codemirror/theme/base16-dark.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/base16-light.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/blackboard.css +28 -0
- data/server/assets/js/jquery.codemirror/theme/cobalt.css +21 -0
- data/server/assets/js/jquery.codemirror/theme/eclipse.css +23 -0
- data/server/assets/js/jquery.codemirror/theme/elegant.css +13 -0
- data/server/assets/js/jquery.codemirror/theme/erlang-dark.css +30 -0
- data/server/assets/js/jquery.codemirror/theme/lesser-dark.css +47 -0
- data/server/assets/js/jquery.codemirror/theme/mbo.css +37 -0
- data/server/assets/js/jquery.codemirror/theme/midnight.css +43 -0
- data/server/assets/js/jquery.codemirror/theme/monokai.css +29 -0
- data/server/assets/js/jquery.codemirror/theme/neat.css +12 -0
- data/server/assets/js/jquery.codemirror/theme/night.css +24 -0
- data/server/assets/js/jquery.codemirror/theme/paraiso-dark.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/paraiso-light.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/rubyblue.css +23 -0
- data/server/assets/js/jquery.codemirror/theme/solarized.css +180 -0
- data/server/assets/js/jquery.codemirror/theme/the-matrix.css +26 -0
- data/server/assets/js/jquery.codemirror/theme/tomorrow-night-eighties.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/twilight.css +28 -0
- data/server/assets/js/jquery.codemirror/theme/vibrant-ink.css +30 -0
- data/server/assets/js/jquery.codemirror/theme/xq-dark.css +49 -0
- data/server/assets/js/jquery.codemirror/theme/xq-light.css +43 -0
- data/server/assets/js/jquery.js +4 -0
- data/server/assets/js/jquery.nanoscroller/jquery.nanoscroller.js +2 -0
- data/server/assets/js/jquery.nanoscroller/nanoscroller.css +49 -0
- data/server/assets/js/tester.js +161 -0
- data/server/config.ru +2 -0
- data/server/server.rb +41 -0
- data/server/views/_content.erb +65 -0
- data/server/views/_sidebar.erb +32 -0
- data/server/views/index.erb +40 -0
- metadata +402 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
|
|
3
|
+
<title>CodeMirror: VBScript mode</title>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<link rel=stylesheet href="../../doc/docs.css">
|
|
6
|
+
|
|
7
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
|
8
|
+
<script src="../../lib/codemirror.js"></script>
|
|
9
|
+
<script src="vbscript.js"></script>
|
|
10
|
+
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
|
|
11
|
+
<div id=nav>
|
|
12
|
+
<a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
|
|
13
|
+
|
|
14
|
+
<ul>
|
|
15
|
+
<li><a href="../../index.html">Home</a>
|
|
16
|
+
<li><a href="../../doc/manual.html">Manual</a>
|
|
17
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
|
18
|
+
</ul>
|
|
19
|
+
<ul>
|
|
20
|
+
<li><a href="../index.html">Language modes</a>
|
|
21
|
+
<li><a class=active href="#">VBScript</a>
|
|
22
|
+
</ul>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<article>
|
|
26
|
+
<h2>VBScript mode</h2>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
<div><textarea id="code" name="code">
|
|
30
|
+
' Pete Guhl
|
|
31
|
+
' 03-04-2012
|
|
32
|
+
'
|
|
33
|
+
' Basic VBScript support for codemirror2
|
|
34
|
+
|
|
35
|
+
Const ForReading = 1, ForWriting = 2, ForAppending = 8
|
|
36
|
+
|
|
37
|
+
Call Sub020_PostBroadcastToUrbanAirship(strUserName, strPassword, intTransmitID, strResponse)
|
|
38
|
+
|
|
39
|
+
If Not IsNull(strResponse) AND Len(strResponse) = 0 Then
|
|
40
|
+
boolTransmitOkYN = False
|
|
41
|
+
Else
|
|
42
|
+
' WScript.Echo "Oh Happy Day! Oh Happy DAY!"
|
|
43
|
+
boolTransmitOkYN = True
|
|
44
|
+
End If
|
|
45
|
+
</textarea></div>
|
|
46
|
+
|
|
47
|
+
<script>
|
|
48
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
|
49
|
+
lineNumbers: true,
|
|
50
|
+
indentUnit: 4
|
|
51
|
+
});
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<p><strong>MIME types defined:</strong> <code>text/vbscript</code>.</p>
|
|
55
|
+
</article>
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
/*
|
|
2
|
+
For extra ASP classic objects, initialize CodeMirror instance with this option:
|
|
3
|
+
isASP: true
|
|
4
|
+
|
|
5
|
+
E.G.:
|
|
6
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
|
7
|
+
lineNumbers: true,
|
|
8
|
+
isASP: true
|
|
9
|
+
});
|
|
10
|
+
*/
|
|
11
|
+
CodeMirror.defineMode("vbscript", function(conf, parserConf) {
|
|
12
|
+
var ERRORCLASS = 'error';
|
|
13
|
+
|
|
14
|
+
function wordRegexp(words) {
|
|
15
|
+
return new RegExp("^((" + words.join(")|(") + "))\\b", "i");
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var singleOperators = new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]");
|
|
19
|
+
var doubleOperators = new RegExp("^((<>)|(<=)|(>=))");
|
|
20
|
+
var singleDelimiters = new RegExp('^[\\.,]');
|
|
21
|
+
var brakets = new RegExp('^[\\(\\)]');
|
|
22
|
+
var identifiers = new RegExp("^[A-Za-z][_A-Za-z0-9]*");
|
|
23
|
+
|
|
24
|
+
var openingKeywords = ['class','sub','select','while','if','function', 'property', 'with', 'for'];
|
|
25
|
+
var middleKeywords = ['else','elseif','case'];
|
|
26
|
+
var endKeywords = ['next','loop','wend'];
|
|
27
|
+
|
|
28
|
+
var wordOperators = wordRegexp(['and', 'or', 'not', 'xor', 'is', 'mod', 'eqv', 'imp']);
|
|
29
|
+
var commonkeywords = ['dim', 'redim', 'then', 'until', 'randomize',
|
|
30
|
+
'byval','byref','new','property', 'exit', 'in',
|
|
31
|
+
'const','private', 'public',
|
|
32
|
+
'get','set','let', 'stop', 'on error resume next', 'on error goto 0', 'option explicit', 'call', 'me'];
|
|
33
|
+
|
|
34
|
+
//This list was from: http://msdn.microsoft.com/en-us/library/f8tbc79x(v=vs.84).aspx
|
|
35
|
+
var atomWords = ['true', 'false', 'nothing', 'empty', 'null'];
|
|
36
|
+
//This list was from: http://msdn.microsoft.com/en-us/library/3ca8tfek(v=vs.84).aspx
|
|
37
|
+
var builtinFuncsWords = ['abs', 'array', 'asc', 'atn', 'cbool', 'cbyte', 'ccur', 'cdate', 'cdbl', 'chr', 'cint', 'clng', 'cos', 'csng', 'cstr', 'date', 'dateadd', 'datediff', 'datepart',
|
|
38
|
+
'dateserial', 'datevalue', 'day', 'escape', 'eval', 'execute', 'exp', 'filter', 'formatcurrency', 'formatdatetime', 'formatnumber', 'formatpercent', 'getlocale', 'getobject',
|
|
39
|
+
'getref', 'hex', 'hour', 'inputbox', 'instr', 'instrrev', 'int', 'fix', 'isarray', 'isdate', 'isempty', 'isnull', 'isnumeric', 'isobject', 'join', 'lbound', 'lcase', 'left',
|
|
40
|
+
'len', 'loadpicture', 'log', 'ltrim', 'rtrim', 'trim', 'maths', 'mid', 'minute', 'month', 'monthname', 'msgbox', 'now', 'oct', 'replace', 'rgb', 'right', 'rnd', 'round',
|
|
41
|
+
'scriptengine', 'scriptenginebuildversion', 'scriptenginemajorversion', 'scriptengineminorversion', 'second', 'setlocale', 'sgn', 'sin', 'space', 'split', 'sqr', 'strcomp',
|
|
42
|
+
'string', 'strreverse', 'tan', 'time', 'timer', 'timeserial', 'timevalue', 'typename', 'ubound', 'ucase', 'unescape', 'vartype', 'weekday', 'weekdayname', 'year'];
|
|
43
|
+
|
|
44
|
+
//This list was from: http://msdn.microsoft.com/en-us/library/ydz4cfk3(v=vs.84).aspx
|
|
45
|
+
var builtinConsts = ['vbBlack', 'vbRed', 'vbGreen', 'vbYellow', 'vbBlue', 'vbMagenta', 'vbCyan', 'vbWhite', 'vbBinaryCompare', 'vbTextCompare',
|
|
46
|
+
'vbSunday', 'vbMonday', 'vbTuesday', 'vbWednesday', 'vbThursday', 'vbFriday', 'vbSaturday', 'vbUseSystemDayOfWeek', 'vbFirstJan1', 'vbFirstFourDays', 'vbFirstFullWeek',
|
|
47
|
+
'vbGeneralDate', 'vbLongDate', 'vbShortDate', 'vbLongTime', 'vbShortTime', 'vbObjectError',
|
|
48
|
+
'vbOKOnly', 'vbOKCancel', 'vbAbortRetryIgnore', 'vbYesNoCancel', 'vbYesNo', 'vbRetryCancel', 'vbCritical', 'vbQuestion', 'vbExclamation', 'vbInformation', 'vbDefaultButton1', 'vbDefaultButton2',
|
|
49
|
+
'vbDefaultButton3', 'vbDefaultButton4', 'vbApplicationModal', 'vbSystemModal', 'vbOK', 'vbCancel', 'vbAbort', 'vbRetry', 'vbIgnore', 'vbYes', 'vbNo',
|
|
50
|
+
'vbCr', 'VbCrLf', 'vbFormFeed', 'vbLf', 'vbNewLine', 'vbNullChar', 'vbNullString', 'vbTab', 'vbVerticalTab', 'vbUseDefault', 'vbTrue', 'vbFalse',
|
|
51
|
+
'vbEmpty', 'vbNull', 'vbInteger', 'vbLong', 'vbSingle', 'vbDouble', 'vbCurrency', 'vbDate', 'vbString', 'vbObject', 'vbError', 'vbBoolean', 'vbVariant', 'vbDataObject', 'vbDecimal', 'vbByte', 'vbArray'];
|
|
52
|
+
//This list was from: http://msdn.microsoft.com/en-us/library/hkc375ea(v=vs.84).aspx
|
|
53
|
+
var builtinObjsWords = ['WScript', 'err', 'debug', 'RegExp'];
|
|
54
|
+
var knownProperties = ['description', 'firstindex', 'global', 'helpcontext', 'helpfile', 'ignorecase', 'length', 'number', 'pattern', 'source', 'value', 'count'];
|
|
55
|
+
var knownMethods = ['clear', 'execute', 'raise', 'replace', 'test', 'write', 'writeline', 'close', 'open', 'state', 'eof', 'update', 'addnew', 'end', 'createobject', 'quit'];
|
|
56
|
+
|
|
57
|
+
var aspBuiltinObjsWords = ['server', 'response', 'request', 'session', 'application'];
|
|
58
|
+
var aspKnownProperties = ['buffer', 'cachecontrol', 'charset', 'contenttype', 'expires', 'expiresabsolute', 'isclientconnected', 'pics', 'status', //response
|
|
59
|
+
'clientcertificate', 'cookies', 'form', 'querystring', 'servervariables', 'totalbytes', //request
|
|
60
|
+
'contents', 'staticobjects', //application
|
|
61
|
+
'codepage', 'lcid', 'sessionid', 'timeout', //session
|
|
62
|
+
'scripttimeout']; //server
|
|
63
|
+
var aspKnownMethods = ['addheader', 'appendtolog', 'binarywrite', 'end', 'flush', 'redirect', //response
|
|
64
|
+
'binaryread', //request
|
|
65
|
+
'remove', 'removeall', 'lock', 'unlock', //application
|
|
66
|
+
'abandon', //session
|
|
67
|
+
'getlasterror', 'htmlencode', 'mappath', 'transfer', 'urlencode']; //server
|
|
68
|
+
|
|
69
|
+
var knownWords = knownMethods.concat(knownProperties);
|
|
70
|
+
|
|
71
|
+
builtinObjsWords = builtinObjsWords.concat(builtinConsts);
|
|
72
|
+
|
|
73
|
+
if (conf.isASP){
|
|
74
|
+
builtinObjsWords = builtinObjsWords.concat(aspBuiltinObjsWords);
|
|
75
|
+
knownWords = knownWords.concat(aspKnownMethods, aspKnownProperties);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
var keywords = wordRegexp(commonkeywords);
|
|
79
|
+
var atoms = wordRegexp(atomWords);
|
|
80
|
+
var builtinFuncs = wordRegexp(builtinFuncsWords);
|
|
81
|
+
var builtinObjs = wordRegexp(builtinObjsWords);
|
|
82
|
+
var known = wordRegexp(knownWords);
|
|
83
|
+
var stringPrefixes = '"';
|
|
84
|
+
|
|
85
|
+
var opening = wordRegexp(openingKeywords);
|
|
86
|
+
var middle = wordRegexp(middleKeywords);
|
|
87
|
+
var closing = wordRegexp(endKeywords);
|
|
88
|
+
var doubleClosing = wordRegexp(['end']);
|
|
89
|
+
var doOpening = wordRegexp(['do']);
|
|
90
|
+
var noIndentWords = wordRegexp(['on error resume next', 'exit']);
|
|
91
|
+
var comment = wordRegexp(['rem']);
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
function indent(_stream, state) {
|
|
95
|
+
state.currentIndent++;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function dedent(_stream, state) {
|
|
99
|
+
state.currentIndent--;
|
|
100
|
+
}
|
|
101
|
+
// tokenizers
|
|
102
|
+
function tokenBase(stream, state) {
|
|
103
|
+
if (stream.eatSpace()) {
|
|
104
|
+
return 'space';
|
|
105
|
+
//return null;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
var ch = stream.peek();
|
|
109
|
+
|
|
110
|
+
// Handle Comments
|
|
111
|
+
if (ch === "'") {
|
|
112
|
+
stream.skipToEnd();
|
|
113
|
+
return 'comment';
|
|
114
|
+
}
|
|
115
|
+
if (stream.match(comment)){
|
|
116
|
+
stream.skipToEnd();
|
|
117
|
+
return 'comment';
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
// Handle Number Literals
|
|
122
|
+
if (stream.match(/^((&H)|(&O))?[0-9\.]/i, false) && !stream.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i, false)) {
|
|
123
|
+
var floatLiteral = false;
|
|
124
|
+
// Floats
|
|
125
|
+
if (stream.match(/^\d*\.\d+/i)) { floatLiteral = true; }
|
|
126
|
+
else if (stream.match(/^\d+\.\d*/)) { floatLiteral = true; }
|
|
127
|
+
else if (stream.match(/^\.\d+/)) { floatLiteral = true; }
|
|
128
|
+
|
|
129
|
+
if (floatLiteral) {
|
|
130
|
+
// Float literals may be "imaginary"
|
|
131
|
+
stream.eat(/J/i);
|
|
132
|
+
return 'number';
|
|
133
|
+
}
|
|
134
|
+
// Integers
|
|
135
|
+
var intLiteral = false;
|
|
136
|
+
// Hex
|
|
137
|
+
if (stream.match(/^&H[0-9a-f]+/i)) { intLiteral = true; }
|
|
138
|
+
// Octal
|
|
139
|
+
else if (stream.match(/^&O[0-7]+/i)) { intLiteral = true; }
|
|
140
|
+
// Decimal
|
|
141
|
+
else if (stream.match(/^[1-9]\d*F?/)) {
|
|
142
|
+
// Decimal literals may be "imaginary"
|
|
143
|
+
stream.eat(/J/i);
|
|
144
|
+
// TODO - Can you have imaginary longs?
|
|
145
|
+
intLiteral = true;
|
|
146
|
+
}
|
|
147
|
+
// Zero by itself with no other piece of number.
|
|
148
|
+
else if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; }
|
|
149
|
+
if (intLiteral) {
|
|
150
|
+
// Integer literals may be "long"
|
|
151
|
+
stream.eat(/L/i);
|
|
152
|
+
return 'number';
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Handle Strings
|
|
157
|
+
if (stream.match(stringPrefixes)) {
|
|
158
|
+
state.tokenize = tokenStringFactory(stream.current());
|
|
159
|
+
return state.tokenize(stream, state);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// Handle operators and Delimiters
|
|
163
|
+
if (stream.match(doubleOperators)
|
|
164
|
+
|| stream.match(singleOperators)
|
|
165
|
+
|| stream.match(wordOperators)) {
|
|
166
|
+
return 'operator';
|
|
167
|
+
}
|
|
168
|
+
if (stream.match(singleDelimiters)) {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (stream.match(brakets)) {
|
|
173
|
+
return "bracket";
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (stream.match(noIndentWords)) {
|
|
177
|
+
state.doInCurrentLine = true;
|
|
178
|
+
|
|
179
|
+
return 'keyword';
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (stream.match(doOpening)) {
|
|
183
|
+
indent(stream,state);
|
|
184
|
+
state.doInCurrentLine = true;
|
|
185
|
+
|
|
186
|
+
return 'keyword';
|
|
187
|
+
}
|
|
188
|
+
if (stream.match(opening)) {
|
|
189
|
+
if (! state.doInCurrentLine)
|
|
190
|
+
indent(stream,state);
|
|
191
|
+
else
|
|
192
|
+
state.doInCurrentLine = false;
|
|
193
|
+
|
|
194
|
+
return 'keyword';
|
|
195
|
+
}
|
|
196
|
+
if (stream.match(middle)) {
|
|
197
|
+
return 'keyword';
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
if (stream.match(doubleClosing)) {
|
|
202
|
+
dedent(stream,state);
|
|
203
|
+
dedent(stream,state);
|
|
204
|
+
|
|
205
|
+
return 'keyword';
|
|
206
|
+
}
|
|
207
|
+
if (stream.match(closing)) {
|
|
208
|
+
if (! state.doInCurrentLine)
|
|
209
|
+
dedent(stream,state);
|
|
210
|
+
else
|
|
211
|
+
state.doInCurrentLine = false;
|
|
212
|
+
|
|
213
|
+
return 'keyword';
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
if (stream.match(keywords)) {
|
|
217
|
+
return 'keyword';
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (stream.match(atoms)) {
|
|
221
|
+
return 'atom';
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (stream.match(known)) {
|
|
225
|
+
return 'variable-2';
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if (stream.match(builtinFuncs)) {
|
|
229
|
+
return 'builtin';
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
if (stream.match(builtinObjs)){
|
|
233
|
+
return 'variable-2';
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if (stream.match(identifiers)) {
|
|
237
|
+
return 'variable';
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// Handle non-detected items
|
|
241
|
+
stream.next();
|
|
242
|
+
return ERRORCLASS;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
function tokenStringFactory(delimiter) {
|
|
246
|
+
var singleline = delimiter.length == 1;
|
|
247
|
+
var OUTCLASS = 'string';
|
|
248
|
+
|
|
249
|
+
return function(stream, state) {
|
|
250
|
+
while (!stream.eol()) {
|
|
251
|
+
stream.eatWhile(/[^'"]/);
|
|
252
|
+
if (stream.match(delimiter)) {
|
|
253
|
+
state.tokenize = tokenBase;
|
|
254
|
+
return OUTCLASS;
|
|
255
|
+
} else {
|
|
256
|
+
stream.eat(/['"]/);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if (singleline) {
|
|
260
|
+
if (parserConf.singleLineStringErrors) {
|
|
261
|
+
return ERRORCLASS;
|
|
262
|
+
} else {
|
|
263
|
+
state.tokenize = tokenBase;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return OUTCLASS;
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
function tokenLexer(stream, state) {
|
|
272
|
+
var style = state.tokenize(stream, state);
|
|
273
|
+
var current = stream.current();
|
|
274
|
+
|
|
275
|
+
// Handle '.' connected identifiers
|
|
276
|
+
if (current === '.') {
|
|
277
|
+
style = state.tokenize(stream, state);
|
|
278
|
+
|
|
279
|
+
current = stream.current();
|
|
280
|
+
if (style.substr(0, 8) === 'variable' || style==='builtin' || style==='keyword'){//|| knownWords.indexOf(current.substring(1)) > -1) {
|
|
281
|
+
if (style === 'builtin' || style === 'keyword') style='variable';
|
|
282
|
+
if (knownWords.indexOf(current.substr(1)) > -1) style='variable-2';
|
|
283
|
+
|
|
284
|
+
return style;
|
|
285
|
+
} else {
|
|
286
|
+
return ERRORCLASS;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
return style;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
var external = {
|
|
294
|
+
electricChars:"dDpPtTfFeE ",
|
|
295
|
+
startState: function() {
|
|
296
|
+
return {
|
|
297
|
+
tokenize: tokenBase,
|
|
298
|
+
lastToken: null,
|
|
299
|
+
currentIndent: 0,
|
|
300
|
+
nextLineIndent: 0,
|
|
301
|
+
doInCurrentLine: false,
|
|
302
|
+
ignoreKeyword: false
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
};
|
|
306
|
+
},
|
|
307
|
+
|
|
308
|
+
token: function(stream, state) {
|
|
309
|
+
if (stream.sol()) {
|
|
310
|
+
state.currentIndent += state.nextLineIndent;
|
|
311
|
+
state.nextLineIndent = 0;
|
|
312
|
+
state.doInCurrentLine = 0;
|
|
313
|
+
}
|
|
314
|
+
var style = tokenLexer(stream, state);
|
|
315
|
+
|
|
316
|
+
state.lastToken = {style:style, content: stream.current()};
|
|
317
|
+
|
|
318
|
+
if (style==='space') style=null;
|
|
319
|
+
|
|
320
|
+
return style;
|
|
321
|
+
},
|
|
322
|
+
|
|
323
|
+
indent: function(state, textAfter) {
|
|
324
|
+
var trueText = textAfter.replace(/^\s+|\s+$/g, '') ;
|
|
325
|
+
if (trueText.match(closing) || trueText.match(doubleClosing) || trueText.match(middle)) return conf.indentUnit*(state.currentIndent-1);
|
|
326
|
+
if(state.currentIndent < 0) return 0;
|
|
327
|
+
return state.currentIndent * conf.indentUnit;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
};
|
|
331
|
+
return external;
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
CodeMirror.defineMIME("text/vbscript", "vbscript");
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
|
|
3
|
+
<title>CodeMirror: Velocity mode</title>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<link rel=stylesheet href="../../doc/docs.css">
|
|
6
|
+
|
|
7
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
|
8
|
+
<link rel="stylesheet" href="../../theme/night.css">
|
|
9
|
+
<script src="../../lib/codemirror.js"></script>
|
|
10
|
+
<script src="velocity.js"></script>
|
|
11
|
+
<style>.CodeMirror {border: 1px solid black;}</style>
|
|
12
|
+
<div id=nav>
|
|
13
|
+
<a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
|
|
14
|
+
|
|
15
|
+
<ul>
|
|
16
|
+
<li><a href="../../index.html">Home</a>
|
|
17
|
+
<li><a href="../../doc/manual.html">Manual</a>
|
|
18
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
|
19
|
+
</ul>
|
|
20
|
+
<ul>
|
|
21
|
+
<li><a href="../index.html">Language modes</a>
|
|
22
|
+
<li><a class=active href="#">Velocity</a>
|
|
23
|
+
</ul>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<article>
|
|
27
|
+
<h2>Velocity mode</h2>
|
|
28
|
+
<form><textarea id="code" name="code">
|
|
29
|
+
## Velocity Code Demo
|
|
30
|
+
#*
|
|
31
|
+
based on PL/SQL mode by Peter Raganitsch, adapted to Velocity by Steve O'Hara ( http://www.pivotal-solutions.co.uk )
|
|
32
|
+
August 2011
|
|
33
|
+
*#
|
|
34
|
+
|
|
35
|
+
#*
|
|
36
|
+
This is a multiline comment.
|
|
37
|
+
This is the second line
|
|
38
|
+
*#
|
|
39
|
+
|
|
40
|
+
#[[ hello steve
|
|
41
|
+
This has invalid syntax that would normally need "poor man's escaping" like:
|
|
42
|
+
|
|
43
|
+
#define()
|
|
44
|
+
|
|
45
|
+
${blah
|
|
46
|
+
]]#
|
|
47
|
+
|
|
48
|
+
#include( "disclaimer.txt" "opinion.txt" )
|
|
49
|
+
#include( $foo $bar )
|
|
50
|
+
|
|
51
|
+
#parse( "lecorbusier.vm" )
|
|
52
|
+
#parse( $foo )
|
|
53
|
+
|
|
54
|
+
#evaluate( 'string with VTL #if(true)will be displayed#end' )
|
|
55
|
+
|
|
56
|
+
#define( $hello ) Hello $who #end #set( $who = "World!") $hello ## displays Hello World!
|
|
57
|
+
|
|
58
|
+
#foreach( $customer in $customerList )
|
|
59
|
+
|
|
60
|
+
$foreach.count $customer.Name
|
|
61
|
+
|
|
62
|
+
#if( $foo == ${bar})
|
|
63
|
+
it's true!
|
|
64
|
+
#break
|
|
65
|
+
#{else}
|
|
66
|
+
it's not!
|
|
67
|
+
#stop
|
|
68
|
+
#end
|
|
69
|
+
|
|
70
|
+
#if ($foreach.parent.hasNext)
|
|
71
|
+
$velocityCount
|
|
72
|
+
#end
|
|
73
|
+
#end
|
|
74
|
+
|
|
75
|
+
$someObject.getValues("this is a string split
|
|
76
|
+
across lines")
|
|
77
|
+
|
|
78
|
+
$someObject("This plus $something in the middle").method(7567).property
|
|
79
|
+
|
|
80
|
+
#macro( tablerows $color $somelist )
|
|
81
|
+
#foreach( $something in $somelist )
|
|
82
|
+
<tr><td bgcolor=$color>$something</td></tr>
|
|
83
|
+
<tr><td bgcolor=$color>$bodyContent</td></tr>
|
|
84
|
+
#end
|
|
85
|
+
#end
|
|
86
|
+
|
|
87
|
+
#tablerows("red" ["dadsdf","dsa"])
|
|
88
|
+
#@tablerows("red" ["dadsdf","dsa"]) some body content #end
|
|
89
|
+
|
|
90
|
+
Variable reference: #set( $monkey = $bill )
|
|
91
|
+
String literal: #set( $monkey.Friend = 'monica' )
|
|
92
|
+
Property reference: #set( $monkey.Blame = $whitehouse.Leak )
|
|
93
|
+
Method reference: #set( $monkey.Plan = $spindoctor.weave($web) )
|
|
94
|
+
Number literal: #set( $monkey.Number = 123 )
|
|
95
|
+
Range operator: #set( $monkey.Numbers = [1..3] )
|
|
96
|
+
Object list: #set( $monkey.Say = ["Not", $my, "fault"] )
|
|
97
|
+
Object map: #set( $monkey.Map = {"banana" : "good", "roast beef" : "bad"})
|
|
98
|
+
|
|
99
|
+
The RHS can also be a simple arithmetic expression, such as:
|
|
100
|
+
Addition: #set( $value = $foo + 1 )
|
|
101
|
+
Subtraction: #set( $value = $bar - 1 )
|
|
102
|
+
Multiplication: #set( $value = $foo * $bar )
|
|
103
|
+
Division: #set( $value = $foo / $bar )
|
|
104
|
+
Remainder: #set( $value = $foo % $bar )
|
|
105
|
+
|
|
106
|
+
</textarea></form>
|
|
107
|
+
<script>
|
|
108
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
|
109
|
+
tabMode: "indent",
|
|
110
|
+
theme: "night",
|
|
111
|
+
lineNumbers: true,
|
|
112
|
+
indentUnit: 4,
|
|
113
|
+
mode: "text/velocity"
|
|
114
|
+
});
|
|
115
|
+
</script>
|
|
116
|
+
|
|
117
|
+
<p><strong>MIME types defined:</strong> <code>text/velocity</code>.</p>
|
|
118
|
+
|
|
119
|
+
</article>
|