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,72 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
var mode = CodeMirror.getMode({indentUnit: 2}, "javascript");
|
|
3
|
+
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
|
|
4
|
+
|
|
5
|
+
MT("locals",
|
|
6
|
+
"[keyword function] [variable foo]([def a], [def b]) { [keyword var] [def c] = [number 10]; [keyword return] [variable-2 a] + [variable-2 c] + [variable d]; }");
|
|
7
|
+
|
|
8
|
+
MT("comma-and-binop",
|
|
9
|
+
"[keyword function](){ [keyword var] [def x] = [number 1] + [number 2], [def y]; }");
|
|
10
|
+
|
|
11
|
+
MT("destructuring",
|
|
12
|
+
"([keyword function]([def a], [[[def b], [def c] ]]) {",
|
|
13
|
+
" [keyword let] {[def d], [property foo]: [def c]=[number 10], [def x]} = [variable foo]([variable-2 a]);",
|
|
14
|
+
" [[[variable-2 c], [variable y] ]] = [variable-2 c];",
|
|
15
|
+
"})();");
|
|
16
|
+
|
|
17
|
+
MT("class",
|
|
18
|
+
"[keyword class] [variable Point] [keyword extends] [variable SuperThing] {",
|
|
19
|
+
" [[ [string-2 /expr/] ]]: [number 24],",
|
|
20
|
+
" [property constructor]([def x], [def y]) {",
|
|
21
|
+
" [keyword super]([string 'something']);",
|
|
22
|
+
" [keyword this].[property x] = [variable-2 x];",
|
|
23
|
+
" }",
|
|
24
|
+
"}");
|
|
25
|
+
|
|
26
|
+
MT("module",
|
|
27
|
+
"[keyword module] [string 'foo'] {",
|
|
28
|
+
" [keyword export] [keyword let] [def x] = [number 42];",
|
|
29
|
+
" [keyword export] [keyword *] [keyword from] [string 'somewhere'];",
|
|
30
|
+
"}");
|
|
31
|
+
|
|
32
|
+
MT("import",
|
|
33
|
+
"[keyword function] [variable foo]() {",
|
|
34
|
+
" [keyword import] [def $] [keyword from] [string 'jquery'];",
|
|
35
|
+
" [keyword module] [def crypto] [keyword from] [string 'crypto'];",
|
|
36
|
+
" [keyword import] { [def encrypt], [def decrypt] } [keyword from] [string 'crypto'];",
|
|
37
|
+
"}");
|
|
38
|
+
|
|
39
|
+
MT("const",
|
|
40
|
+
"[keyword function] [variable f]() {",
|
|
41
|
+
" [keyword const] [[ [def a], [def b] ]] = [[ [number 1], [number 2] ]];",
|
|
42
|
+
"}");
|
|
43
|
+
|
|
44
|
+
MT("for/of",
|
|
45
|
+
"[keyword for]([keyword let] [variable of] [keyword of] [variable something]) {}");
|
|
46
|
+
|
|
47
|
+
MT("generator",
|
|
48
|
+
"[keyword function*] [variable repeat]([def n]) {",
|
|
49
|
+
" [keyword for]([keyword var] [def i] = [number 0]; [variable-2 i] < [variable-2 n]; ++[variable-2 i])",
|
|
50
|
+
" [keyword yield] [variable-2 i];",
|
|
51
|
+
"}");
|
|
52
|
+
|
|
53
|
+
MT("fatArrow",
|
|
54
|
+
"[variable array].[property filter]([def a] => [variable-2 a] + [number 1]);",
|
|
55
|
+
"[variable a];", // No longer in scope
|
|
56
|
+
"[keyword let] [variable f] = ([[ [def a], [def b] ]], [def c]) => [variable-2 a] + [variable-2 c];",
|
|
57
|
+
"[variable c];");
|
|
58
|
+
|
|
59
|
+
MT("spread",
|
|
60
|
+
"[keyword function] [variable f]([def a], [meta ...][def b]) {",
|
|
61
|
+
" [variable something]([variable-2 a], [meta ...][variable-2 b]);",
|
|
62
|
+
"}");
|
|
63
|
+
|
|
64
|
+
MT("comprehension",
|
|
65
|
+
"[keyword function] [variable f]() {",
|
|
66
|
+
" [[ [variable x] + [number 1] [keyword for] ([keyword var] [def x] [keyword in] [variable y]) [keyword if] [variable pred]([variable-2 x]) ]];",
|
|
67
|
+
" ([variable u] [keyword for] ([keyword var] [def u] [keyword of] [variable generateValues]()) [keyword if] ([variable-2 u].[property color] === [string 'blue']));",
|
|
68
|
+
"}");
|
|
69
|
+
|
|
70
|
+
MT("quasi",
|
|
71
|
+
"[variable re][string-2 `fofdlakj${][variable x] + ([variable re][string-2 `foo`]) + [number 1][string-2 }fdsa`] + [number 2]");
|
|
72
|
+
})();
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
|
|
3
|
+
<title>CodeMirror: TypeScript 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="javascript.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="#">TypeScript</a>
|
|
22
|
+
</ul>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<article>
|
|
26
|
+
<h2>TypeScript mode</h2>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
<div><textarea id="code" name="code">
|
|
30
|
+
class Greeter {
|
|
31
|
+
greeting: string;
|
|
32
|
+
constructor (message: string) {
|
|
33
|
+
this.greeting = message;
|
|
34
|
+
}
|
|
35
|
+
greet() {
|
|
36
|
+
return "Hello, " + this.greeting;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
var greeter = new Greeter("world");
|
|
41
|
+
|
|
42
|
+
var button = document.createElement('button')
|
|
43
|
+
button.innerText = "Say Hello"
|
|
44
|
+
button.onclick = function() {
|
|
45
|
+
alert(greeter.greet())
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
document.body.appendChild(button)
|
|
49
|
+
|
|
50
|
+
</textarea></div>
|
|
51
|
+
|
|
52
|
+
<script>
|
|
53
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
|
54
|
+
lineNumbers: true,
|
|
55
|
+
matchBrackets: true,
|
|
56
|
+
mode: "text/typescript"
|
|
57
|
+
});
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<p>This is a specialization of the <a href="index.html">JavaScript mode</a>.</p>
|
|
61
|
+
</article>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
|
|
3
|
+
<title>CodeMirror: Jinja2 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="jinja2.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="#">Jinja2</a>
|
|
22
|
+
</ul>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<article>
|
|
26
|
+
<h2>Jinja2 mode</h2>
|
|
27
|
+
<form><textarea id="code" name="code">
|
|
28
|
+
<html style="color: green">
|
|
29
|
+
<!-- this is a comment -->
|
|
30
|
+
<head>
|
|
31
|
+
<title>Jinja2 Example</title>
|
|
32
|
+
</head>
|
|
33
|
+
<body>
|
|
34
|
+
<ul>
|
|
35
|
+
{# this is a comment #}
|
|
36
|
+
{%- for item in li -%}
|
|
37
|
+
<li>
|
|
38
|
+
{{ item.label }}
|
|
39
|
+
</li>
|
|
40
|
+
{% endfor -%}
|
|
41
|
+
</ul>
|
|
42
|
+
</body>
|
|
43
|
+
</html>
|
|
44
|
+
</textarea></form>
|
|
45
|
+
<script>
|
|
46
|
+
var editor =
|
|
47
|
+
CodeMirror.fromTextArea(document.getElementById("code"), {mode:
|
|
48
|
+
{name: "jinja2", htmlMode: true}});
|
|
49
|
+
</script>
|
|
50
|
+
</article>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
CodeMirror.defineMode("jinja2", function() {
|
|
2
|
+
var keywords = ["block", "endblock", "for", "endfor", "in", "true", "false",
|
|
3
|
+
"loop", "none", "self", "super", "if", "as", "not", "and",
|
|
4
|
+
"else", "import", "with", "without", "context"];
|
|
5
|
+
keywords = new RegExp("^((" + keywords.join(")|(") + "))\\b");
|
|
6
|
+
|
|
7
|
+
function tokenBase (stream, state) {
|
|
8
|
+
var ch = stream.next();
|
|
9
|
+
if (ch == "{") {
|
|
10
|
+
if (ch = stream.eat(/\{|%|#/)) {
|
|
11
|
+
stream.eat("-");
|
|
12
|
+
state.tokenize = inTag(ch);
|
|
13
|
+
return "tag";
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function inTag (close) {
|
|
18
|
+
if (close == "{") {
|
|
19
|
+
close = "}";
|
|
20
|
+
}
|
|
21
|
+
return function (stream, state) {
|
|
22
|
+
var ch = stream.next();
|
|
23
|
+
if ((ch == close || (ch == "-" && stream.eat(close)))
|
|
24
|
+
&& stream.eat("}")) {
|
|
25
|
+
state.tokenize = tokenBase;
|
|
26
|
+
return "tag";
|
|
27
|
+
}
|
|
28
|
+
if (stream.match(keywords)) {
|
|
29
|
+
return "keyword";
|
|
30
|
+
}
|
|
31
|
+
return close == "#" ? "comment" : "string";
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
startState: function () {
|
|
36
|
+
return {tokenize: tokenBase};
|
|
37
|
+
},
|
|
38
|
+
token: function (stream, state) {
|
|
39
|
+
return state.tokenize(stream, state);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
});
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
|
|
3
|
+
<title>CodeMirror: Julia 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="julia.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="#">Julia</a>
|
|
22
|
+
</ul>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<article>
|
|
26
|
+
<h2>Julia mode</h2>
|
|
27
|
+
|
|
28
|
+
<div><textarea id="code" name="code">
|
|
29
|
+
#numbers
|
|
30
|
+
1234
|
|
31
|
+
1234im
|
|
32
|
+
.234
|
|
33
|
+
.234im
|
|
34
|
+
2.23im
|
|
35
|
+
2.3f3
|
|
36
|
+
23e2
|
|
37
|
+
0x234
|
|
38
|
+
|
|
39
|
+
#strings
|
|
40
|
+
'a'
|
|
41
|
+
"asdf"
|
|
42
|
+
r"regex"
|
|
43
|
+
b"bytestring"
|
|
44
|
+
|
|
45
|
+
"""
|
|
46
|
+
multiline string
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
#identifiers
|
|
50
|
+
a
|
|
51
|
+
as123
|
|
52
|
+
function_name!
|
|
53
|
+
|
|
54
|
+
#literal identifier multiples
|
|
55
|
+
3x
|
|
56
|
+
4[1, 2, 3]
|
|
57
|
+
|
|
58
|
+
#dicts and indexing
|
|
59
|
+
x=[1, 2, 3]
|
|
60
|
+
x[end-1]
|
|
61
|
+
x={"julia"=>"language of technical computing"}
|
|
62
|
+
|
|
63
|
+
#exception handling
|
|
64
|
+
try
|
|
65
|
+
f()
|
|
66
|
+
catch
|
|
67
|
+
@printf "Error"
|
|
68
|
+
finally
|
|
69
|
+
g()
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
#types
|
|
73
|
+
immutable Color{T<:Number}
|
|
74
|
+
r::T
|
|
75
|
+
g::T
|
|
76
|
+
b::T
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
#functions
|
|
80
|
+
function change!(x::Vector{Float64})
|
|
81
|
+
for i = 1:length(x)
|
|
82
|
+
x[i] *= 2
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
#function invocation
|
|
87
|
+
f('b', (2, 3)...)
|
|
88
|
+
|
|
89
|
+
#operators
|
|
90
|
+
|=
|
|
91
|
+
&=
|
|
92
|
+
^=
|
|
93
|
+
\-
|
|
94
|
+
%=
|
|
95
|
+
*=
|
|
96
|
+
+=
|
|
97
|
+
-=
|
|
98
|
+
<=
|
|
99
|
+
>=
|
|
100
|
+
!=
|
|
101
|
+
==
|
|
102
|
+
%
|
|
103
|
+
*
|
|
104
|
+
+
|
|
105
|
+
-
|
|
106
|
+
<
|
|
107
|
+
>
|
|
108
|
+
!
|
|
109
|
+
=
|
|
110
|
+
|
|
|
111
|
+
&
|
|
112
|
+
^
|
|
113
|
+
\
|
|
114
|
+
?
|
|
115
|
+
~
|
|
116
|
+
:
|
|
117
|
+
$
|
|
118
|
+
<:
|
|
119
|
+
.<
|
|
120
|
+
.>
|
|
121
|
+
<<
|
|
122
|
+
<<=
|
|
123
|
+
>>
|
|
124
|
+
>>>>
|
|
125
|
+
>>=
|
|
126
|
+
>>>=
|
|
127
|
+
<<=
|
|
128
|
+
<<<=
|
|
129
|
+
.<=
|
|
130
|
+
.>=
|
|
131
|
+
.==
|
|
132
|
+
->
|
|
133
|
+
//
|
|
134
|
+
in
|
|
135
|
+
...
|
|
136
|
+
//
|
|
137
|
+
:=
|
|
138
|
+
.//=
|
|
139
|
+
.*=
|
|
140
|
+
./=
|
|
141
|
+
.^=
|
|
142
|
+
.%=
|
|
143
|
+
.+=
|
|
144
|
+
.-=
|
|
145
|
+
\=
|
|
146
|
+
\\=
|
|
147
|
+
||
|
|
148
|
+
===
|
|
149
|
+
&&
|
|
150
|
+
|=
|
|
151
|
+
.|=
|
|
152
|
+
<:
|
|
153
|
+
>:
|
|
154
|
+
|>
|
|
155
|
+
<|
|
|
156
|
+
::
|
|
157
|
+
x ? y : z
|
|
158
|
+
|
|
159
|
+
#macros
|
|
160
|
+
@spawnat 2 1+1
|
|
161
|
+
@eval(:x)
|
|
162
|
+
|
|
163
|
+
#keywords and operators
|
|
164
|
+
if else elseif while for
|
|
165
|
+
begin let end do
|
|
166
|
+
try catch finally return break continue
|
|
167
|
+
global local const
|
|
168
|
+
export import importall using
|
|
169
|
+
function macro module baremodule
|
|
170
|
+
type immutable quote
|
|
171
|
+
true false enumerate
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
</textarea></div>
|
|
175
|
+
<script>
|
|
176
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
|
177
|
+
mode: {name: "julia",
|
|
178
|
+
},
|
|
179
|
+
lineNumbers: true,
|
|
180
|
+
indentUnit: 4,
|
|
181
|
+
tabMode: "shift",
|
|
182
|
+
matchBrackets: true
|
|
183
|
+
});
|
|
184
|
+
</script>
|
|
185
|
+
|
|
186
|
+
<p><strong>MIME types defined:</strong> <code>text/x-julia</code>.</p>
|
|
187
|
+
</article>
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
CodeMirror.defineMode("julia", function(_conf, parserConf) {
|
|
2
|
+
var ERRORCLASS = 'error';
|
|
3
|
+
|
|
4
|
+
function wordRegexp(words) {
|
|
5
|
+
return new RegExp("^((" + words.join(")|(") + "))\\b");
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
var operators = parserConf.operators || /^(?:\.?[|&^\\%*+\-<>!=\/]=?|\?|~|:|\$|<:|\.[<>]|<<=?|>>>?=?|\.[<>=]=|->?|\/\/|\bin\b|\.{3})/;
|
|
9
|
+
var delimiters = parserConf.delimiters || /^[;,()[\]{}]/;
|
|
10
|
+
var identifiers = parserConf.identifiers|| /^[_A-Za-z][_A-Za-z0-9]*!*/;
|
|
11
|
+
var blockOpeners = ["begin", "function", "type", "immutable", "let", "macro", "for", "while", "quote", "if", "else", "elseif", "try", "finally", "catch"];
|
|
12
|
+
var blockClosers = ["end", "else", "elseif", "catch", "finally"];
|
|
13
|
+
var keywordList = ['if', 'else', 'elseif', 'while', 'for', 'begin', 'let', 'end', 'do', 'try', 'catch', 'finally', 'return', 'break', 'continue', 'global', 'local', 'const', 'export', 'import', 'importall', 'using', 'function', 'macro', 'module', 'baremodule', 'type', 'immutable', 'quote', 'typealias', 'abstract', 'bitstype', 'ccall'];
|
|
14
|
+
var builtinList = ['true', 'false', 'enumerate', 'open', 'close', 'nothing', 'NaN', 'Inf', 'print', 'println', 'Int8', 'Uint8', 'Int16', 'Uint16', 'Int32', 'Uint32', 'Int64', 'Uint64', 'Int128', 'Uint128', 'Bool', 'Char', 'Float16', 'Float32', 'Float64', 'Array', 'Vector', 'Matrix', 'String', 'UTF8String', 'ASCIIString', 'error', 'warn', 'info', '@printf'];
|
|
15
|
+
|
|
16
|
+
//var stringPrefixes = new RegExp("^[br]?('|\")")
|
|
17
|
+
var stringPrefixes = /^[br]?('|"{3}|")/;
|
|
18
|
+
var keywords = wordRegexp(keywordList);
|
|
19
|
+
var builtins = wordRegexp(builtinList);
|
|
20
|
+
var openers = wordRegexp(blockOpeners);
|
|
21
|
+
var closers = wordRegexp(blockClosers);
|
|
22
|
+
var macro = /@[_A-Za-z][_A-Za-z0-9]*!*/;
|
|
23
|
+
var indentInfo = null;
|
|
24
|
+
|
|
25
|
+
function in_array(state) {
|
|
26
|
+
var ch = cur_scope(state);
|
|
27
|
+
if(ch=="[" || ch=="{") {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function cur_scope(state) {
|
|
36
|
+
if(state.scopes.length==0) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
return state.scopes[state.scopes.length - 1];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// tokenizers
|
|
43
|
+
function tokenBase(stream, state) {
|
|
44
|
+
// Handle scope changes
|
|
45
|
+
var leaving_expr = state.leaving_expr;
|
|
46
|
+
state.leaving_expr = false;
|
|
47
|
+
if(leaving_expr) {
|
|
48
|
+
if(stream.match(/^'+/)) {
|
|
49
|
+
return 'operator';
|
|
50
|
+
}
|
|
51
|
+
if(stream.match("...")) {
|
|
52
|
+
return 'operator';
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (stream.eatSpace()) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
var ch = stream.peek();
|
|
61
|
+
// Handle Comments
|
|
62
|
+
if (ch === '#') {
|
|
63
|
+
stream.skipToEnd();
|
|
64
|
+
return 'comment';
|
|
65
|
+
}
|
|
66
|
+
if(ch==='[') {
|
|
67
|
+
state.scopes.push("[");
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if(ch==='{') {
|
|
71
|
+
state.scopes.push("{");
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
var scope=cur_scope(state);
|
|
75
|
+
|
|
76
|
+
if(scope==='[' && ch===']') {
|
|
77
|
+
state.scopes.pop();
|
|
78
|
+
state.leaving_expr=true;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if(scope==='{' && ch==='}') {
|
|
82
|
+
state.scopes.pop();
|
|
83
|
+
state.leaving_expr=true;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
var match;
|
|
87
|
+
if(match=stream.match(openers, false)) {
|
|
88
|
+
state.scopes.push(match);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if(!in_array(state) && stream.match(closers, false)) {
|
|
92
|
+
state.scopes.pop();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if(in_array(state)) {
|
|
96
|
+
if(stream.match("end")) {
|
|
97
|
+
return 'number';
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
}
|
|
101
|
+
if(stream.match("=>")) {
|
|
102
|
+
return 'operator';
|
|
103
|
+
}
|
|
104
|
+
// Handle Number Literals
|
|
105
|
+
if (stream.match(/^[0-9\.]/, false)) {
|
|
106
|
+
var imMatcher = RegExp(/^im\b/);
|
|
107
|
+
var floatLiteral = false;
|
|
108
|
+
// Floats
|
|
109
|
+
if (stream.match(/^\d*\.\d+([ef][\+\-]?\d+)?/i)) { floatLiteral = true; }
|
|
110
|
+
if (stream.match(/^\d+\.\d*/)) { floatLiteral = true; }
|
|
111
|
+
if (stream.match(/^\.\d+/)) { floatLiteral = true; }
|
|
112
|
+
if (floatLiteral) {
|
|
113
|
+
// Float literals may be "imaginary"
|
|
114
|
+
stream.match(imMatcher);
|
|
115
|
+
return 'number';
|
|
116
|
+
}
|
|
117
|
+
// Integers
|
|
118
|
+
var intLiteral = false;
|
|
119
|
+
// Hex
|
|
120
|
+
if (stream.match(/^0x[0-9a-f]+/i)) { intLiteral = true; }
|
|
121
|
+
// Binary
|
|
122
|
+
if (stream.match(/^0b[01]+/i)) { intLiteral = true; }
|
|
123
|
+
// Octal
|
|
124
|
+
if (stream.match(/^0o[0-7]+/i)) { intLiteral = true; }
|
|
125
|
+
// Decimal
|
|
126
|
+
if (stream.match(/^[1-9]\d*(e[\+\-]?\d+)?/)) {
|
|
127
|
+
// Decimal literals may be "imaginary"
|
|
128
|
+
stream.eat(/J/i);
|
|
129
|
+
// TODO - Can you have imaginary longs?
|
|
130
|
+
intLiteral = true;
|
|
131
|
+
}
|
|
132
|
+
// Zero by itself with no other piece of number.
|
|
133
|
+
if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; }
|
|
134
|
+
if (intLiteral) {
|
|
135
|
+
// Integer literals may be "long"
|
|
136
|
+
stream.match(imMatcher);
|
|
137
|
+
return 'number';
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Handle Strings
|
|
142
|
+
if (stream.match(stringPrefixes)) {
|
|
143
|
+
state.tokenize = tokenStringFactory(stream.current());
|
|
144
|
+
return state.tokenize(stream, state);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Handle operators and Delimiters
|
|
148
|
+
if (stream.match(operators)) {
|
|
149
|
+
return 'operator';
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (stream.match(delimiters)) {
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (stream.match(keywords)) {
|
|
157
|
+
return 'keyword';
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (stream.match(builtins)) {
|
|
161
|
+
return 'builtin';
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (stream.match(macro)) {
|
|
165
|
+
return 'meta';
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (stream.match(identifiers)) {
|
|
169
|
+
state.leaving_expr=true;
|
|
170
|
+
return 'variable';
|
|
171
|
+
}
|
|
172
|
+
// Handle non-detected items
|
|
173
|
+
stream.next();
|
|
174
|
+
return ERRORCLASS;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function tokenStringFactory(delimiter) {
|
|
178
|
+
while ('rub'.indexOf(delimiter.charAt(0).toLowerCase()) >= 0) {
|
|
179
|
+
delimiter = delimiter.substr(1);
|
|
180
|
+
}
|
|
181
|
+
var singleline = delimiter.length == 1;
|
|
182
|
+
var OUTCLASS = 'string';
|
|
183
|
+
|
|
184
|
+
function tokenString(stream, state) {
|
|
185
|
+
while (!stream.eol()) {
|
|
186
|
+
stream.eatWhile(/[^'"\\]/);
|
|
187
|
+
if (stream.eat('\\')) {
|
|
188
|
+
stream.next();
|
|
189
|
+
if (singleline && stream.eol()) {
|
|
190
|
+
return OUTCLASS;
|
|
191
|
+
}
|
|
192
|
+
} else if (stream.match(delimiter)) {
|
|
193
|
+
state.tokenize = tokenBase;
|
|
194
|
+
return OUTCLASS;
|
|
195
|
+
} else {
|
|
196
|
+
stream.eat(/['"]/);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
if (singleline) {
|
|
200
|
+
if (parserConf.singleLineStringErrors) {
|
|
201
|
+
return ERRORCLASS;
|
|
202
|
+
} else {
|
|
203
|
+
state.tokenize = tokenBase;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return OUTCLASS;
|
|
207
|
+
}
|
|
208
|
+
tokenString.isString = true;
|
|
209
|
+
return tokenString;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function tokenLexer(stream, state) {
|
|
213
|
+
indentInfo = null;
|
|
214
|
+
var style = state.tokenize(stream, state);
|
|
215
|
+
var current = stream.current();
|
|
216
|
+
|
|
217
|
+
// Handle '.' connected identifiers
|
|
218
|
+
if (current === '.') {
|
|
219
|
+
style = stream.match(identifiers, false) ? null : ERRORCLASS;
|
|
220
|
+
if (style === null && state.lastStyle === 'meta') {
|
|
221
|
+
// Apply 'meta' style to '.' connected identifiers when
|
|
222
|
+
// appropriate.
|
|
223
|
+
style = 'meta';
|
|
224
|
+
}
|
|
225
|
+
return style;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
return style;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
var external = {
|
|
232
|
+
startState: function() {
|
|
233
|
+
return {
|
|
234
|
+
tokenize: tokenBase,
|
|
235
|
+
scopes: [],
|
|
236
|
+
leaving_expr: false
|
|
237
|
+
};
|
|
238
|
+
},
|
|
239
|
+
|
|
240
|
+
token: function(stream, state) {
|
|
241
|
+
var style = tokenLexer(stream, state);
|
|
242
|
+
state.lastStyle = style;
|
|
243
|
+
return style;
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
indent: function(state, textAfter) {
|
|
247
|
+
var delta = 0;
|
|
248
|
+
if(textAfter=="end" || textAfter=="]" || textAfter=="}" || textAfter=="else" || textAfter=="elseif" || textAfter=="catch" || textAfter=="finally") {
|
|
249
|
+
delta = -1;
|
|
250
|
+
}
|
|
251
|
+
return (state.scopes.length + delta) * 2;
|
|
252
|
+
},
|
|
253
|
+
|
|
254
|
+
lineComment: "#",
|
|
255
|
+
fold: "indent",
|
|
256
|
+
electricChars: "edlsifyh]}"
|
|
257
|
+
};
|
|
258
|
+
return external;
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
CodeMirror.defineMIME("text/x-julia", "julia");
|