fluentd-ui 0.3.13 → 0.3.14
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fluentd-ui might be problematic. Click here for more details.
- data/ChangeLog +9 -0
- data/Gemfile.lock +47 -44
- data/README.md +4 -4
- data/app/assets/javascripts/vue/in_tail_format.js +7 -2
- data/app/assets/stylesheets/common.css.scss +16 -0
- data/app/controllers/concerns/setting_history_concern.rb +6 -0
- data/app/controllers/fluentd/settings_controller.rb +37 -8
- data/app/models/fluent_gem.rb +6 -3
- data/app/models/fluentd/agent.rb +1 -0
- data/app/models/fluentd/agent/common.rb +4 -0
- data/app/models/fluentd/agent/fluentd_gem.rb +9 -13
- data/app/models/fluentd/agent/local_common.rb +23 -0
- data/app/models/fluentd/agent/td_agent.rb +4 -0
- data/app/models/fluentd/agent/td_agent/macosx.rb +0 -4
- data/app/models/fluentd/agent/td_agent/unix.rb +0 -4
- data/app/views/fluentd/settings/edit.html.haml +1 -3
- data/app/views/fluentd/settings/histories/show.html.haml +10 -0
- data/app/views/fluentd/settings/running_backup/show.html.haml +11 -0
- data/app/views/shared/settings/_diff.html.erb +21 -0
- data/circle.yml +5 -0
- data/config/application.rb +1 -0
- data/config/locales/translation_en.yml +7 -0
- data/config/locales/translation_ja.yml +7 -0
- data/fluentd-ui.gemspec +1 -0
- data/lib/fluentd-ui.rb +5 -1
- data/lib/fluentd-ui/version.rb +1 -1
- data/spec/features/fluentd/setting/histories_spec.rb +23 -1
- data/spec/features/fluentd/setting/running_backup_spec.rb +22 -1
- data/spec/models/fluentd/agent/local_common_spec.rb +4 -2
- data/spec/models/fluentd/agent_spec.rb +1 -48
- data/spec/models/plugin_spec.rb +2 -2
- data/spec/spec_helper.rb +10 -0
- data/spec/support/fluentd_agent_common_behavior.rb +53 -0
- data/vendor/assets/javascripts/bower/.gitignore +10 -0
- data/vendor/assets/javascripts/bower/vue/.bower.json +4 -4
- data/vendor/assets/javascripts/bower/vue/bower.json +17 -0
- data/vendor/assets/javascripts/bower/vue/dist/vue.js +329 -198
- data/vendor/assets/javascripts/bower/vue/dist/vue.min.js +3 -3
- metadata +107 -291
- checksums.yaml +0 -7
- data/vendor/assets/javascripts/bower/codemirror/AUTHORS +0 -423
- data/vendor/assets/javascripts/bower/codemirror/CONTRIBUTING.md +0 -76
- data/vendor/assets/javascripts/bower/codemirror/LICENSE +0 -19
- data/vendor/assets/javascripts/bower/codemirror/README.md +0 -11
- data/vendor/assets/javascripts/bower/codemirror/addon/comment/comment.js +0 -183
- data/vendor/assets/javascripts/bower/codemirror/addon/comment/continuecomment.js +0 -85
- data/vendor/assets/javascripts/bower/codemirror/addon/dialog/dialog.css +0 -32
- data/vendor/assets/javascripts/bower/codemirror/addon/dialog/dialog.js +0 -155
- data/vendor/assets/javascripts/bower/codemirror/addon/display/fullscreen.css +0 -6
- data/vendor/assets/javascripts/bower/codemirror/addon/display/fullscreen.js +0 -41
- data/vendor/assets/javascripts/bower/codemirror/addon/display/panel.js +0 -94
- data/vendor/assets/javascripts/bower/codemirror/addon/display/placeholder.js +0 -58
- data/vendor/assets/javascripts/bower/codemirror/addon/display/rulers.js +0 -64
- data/vendor/assets/javascripts/bower/codemirror/addon/edit/closebrackets.js +0 -159
- data/vendor/assets/javascripts/bower/codemirror/addon/edit/closetag.js +0 -159
- data/vendor/assets/javascripts/bower/codemirror/addon/edit/continuelist.js +0 -51
- data/vendor/assets/javascripts/bower/codemirror/addon/edit/matchbrackets.js +0 -120
- data/vendor/assets/javascripts/bower/codemirror/addon/edit/matchtags.js +0 -66
- data/vendor/assets/javascripts/bower/codemirror/addon/edit/trailingspace.js +0 -27
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/brace-fold.js +0 -105
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/comment-fold.js +0 -57
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/foldcode.js +0 -145
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/foldgutter.css +0 -20
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/foldgutter.js +0 -134
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/indent-fold.js +0 -44
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/markdown-fold.js +0 -49
- data/vendor/assets/javascripts/bower/codemirror/addon/fold/xml-fold.js +0 -182
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/anyword-hint.js +0 -41
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/css-hint.js +0 -56
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/html-hint.js +0 -348
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/javascript-hint.js +0 -146
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/show-hint.css +0 -38
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/show-hint.js +0 -389
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/sql-hint.js +0 -197
- data/vendor/assets/javascripts/bower/codemirror/addon/hint/xml-hint.js +0 -110
- data/vendor/assets/javascripts/bower/codemirror/addon/lint/coffeescript-lint.js +0 -41
- data/vendor/assets/javascripts/bower/codemirror/addon/lint/css-lint.js +0 -35
- data/vendor/assets/javascripts/bower/codemirror/addon/lint/javascript-lint.js +0 -136
- data/vendor/assets/javascripts/bower/codemirror/addon/lint/json-lint.js +0 -31
- data/vendor/assets/javascripts/bower/codemirror/addon/lint/lint.css +0 -73
- data/vendor/assets/javascripts/bower/codemirror/addon/lint/lint.js +0 -204
- data/vendor/assets/javascripts/bower/codemirror/addon/lint/yaml-lint.js +0 -28
- data/vendor/assets/javascripts/bower/codemirror/addon/merge/merge.css +0 -112
- data/vendor/assets/javascripts/bower/codemirror/addon/merge/merge.js +0 -643
- data/vendor/assets/javascripts/bower/codemirror/addon/mode/loadmode.js +0 -64
- data/vendor/assets/javascripts/bower/codemirror/addon/mode/multiplex.js +0 -118
- data/vendor/assets/javascripts/bower/codemirror/addon/mode/multiplex_test.js +0 -33
- data/vendor/assets/javascripts/bower/codemirror/addon/mode/overlay.js +0 -85
- data/vendor/assets/javascripts/bower/codemirror/addon/mode/simple.js +0 -213
- data/vendor/assets/javascripts/bower/codemirror/addon/runmode/colorize.js +0 -40
- data/vendor/assets/javascripts/bower/codemirror/addon/runmode/runmode-standalone.js +0 -157
- data/vendor/assets/javascripts/bower/codemirror/addon/runmode/runmode.js +0 -72
- data/vendor/assets/javascripts/bower/codemirror/addon/runmode/runmode.node.js +0 -120
- data/vendor/assets/javascripts/bower/codemirror/addon/scroll/annotatescrollbar.js +0 -76
- data/vendor/assets/javascripts/bower/codemirror/addon/scroll/scrollpastend.js +0 -46
- data/vendor/assets/javascripts/bower/codemirror/addon/scroll/simplescrollbars.css +0 -66
- data/vendor/assets/javascripts/bower/codemirror/addon/scroll/simplescrollbars.js +0 -139
- data/vendor/assets/javascripts/bower/codemirror/addon/search/match-highlighter.js +0 -128
- data/vendor/assets/javascripts/bower/codemirror/addon/search/matchesonscrollbar.css +0 -8
- data/vendor/assets/javascripts/bower/codemirror/addon/search/matchesonscrollbar.js +0 -90
- data/vendor/assets/javascripts/bower/codemirror/addon/search/search.js +0 -164
- data/vendor/assets/javascripts/bower/codemirror/addon/search/searchcursor.js +0 -189
- data/vendor/assets/javascripts/bower/codemirror/addon/selection/active-line.js +0 -71
- data/vendor/assets/javascripts/bower/codemirror/addon/selection/mark-selection.js +0 -118
- data/vendor/assets/javascripts/bower/codemirror/addon/tern/tern.css +0 -86
- data/vendor/assets/javascripts/bower/codemirror/addon/tern/tern.js +0 -670
- data/vendor/assets/javascripts/bower/codemirror/addon/tern/worker.js +0 -44
- data/vendor/assets/javascripts/bower/codemirror/addon/wrap/hardwrap.js +0 -139
- data/vendor/assets/javascripts/bower/codemirror/keymap/emacs.js +0 -411
- data/vendor/assets/javascripts/bower/codemirror/keymap/sublime.js +0 -540
- data/vendor/assets/javascripts/bower/codemirror/keymap/vim.js +0 -4901
- data/vendor/assets/javascripts/bower/codemirror/mode/apl/apl.js +0 -175
- data/vendor/assets/javascripts/bower/codemirror/mode/asterisk/asterisk.js +0 -198
- data/vendor/assets/javascripts/bower/codemirror/mode/clike/clike.js +0 -489
- data/vendor/assets/javascripts/bower/codemirror/mode/clike/scala.html +0 -767
- data/vendor/assets/javascripts/bower/codemirror/mode/clojure/clojure.js +0 -243
- data/vendor/assets/javascripts/bower/codemirror/mode/cobol/cobol.js +0 -255
- data/vendor/assets/javascripts/bower/codemirror/mode/coffeescript/coffeescript.js +0 -369
- data/vendor/assets/javascripts/bower/codemirror/mode/commonlisp/commonlisp.js +0 -122
- data/vendor/assets/javascripts/bower/codemirror/mode/css/css.js +0 -717
- data/vendor/assets/javascripts/bower/codemirror/mode/css/less.html +0 -152
- data/vendor/assets/javascripts/bower/codemirror/mode/css/less_test.js +0 -51
- data/vendor/assets/javascripts/bower/codemirror/mode/css/scss.html +0 -157
- data/vendor/assets/javascripts/bower/codemirror/mode/css/scss_test.js +0 -110
- data/vendor/assets/javascripts/bower/codemirror/mode/css/test.js +0 -135
- data/vendor/assets/javascripts/bower/codemirror/mode/cypher/cypher.js +0 -146
- data/vendor/assets/javascripts/bower/codemirror/mode/d/d.js +0 -218
- data/vendor/assets/javascripts/bower/codemirror/mode/dart/dart.js +0 -50
- data/vendor/assets/javascripts/bower/codemirror/mode/diff/diff.js +0 -47
- data/vendor/assets/javascripts/bower/codemirror/mode/django/django.js +0 -67
- data/vendor/assets/javascripts/bower/codemirror/mode/dockerfile/dockerfile.js +0 -76
- data/vendor/assets/javascripts/bower/codemirror/mode/dtd/dtd.js +0 -142
- data/vendor/assets/javascripts/bower/codemirror/mode/dylan/dylan.js +0 -299
- data/vendor/assets/javascripts/bower/codemirror/mode/ebnf/ebnf.js +0 -195
- data/vendor/assets/javascripts/bower/codemirror/mode/ecl/ecl.js +0 -207
- data/vendor/assets/javascripts/bower/codemirror/mode/eiffel/eiffel.js +0 -162
- data/vendor/assets/javascripts/bower/codemirror/mode/erlang/erlang.js +0 -622
- data/vendor/assets/javascripts/bower/codemirror/mode/fortran/fortran.js +0 -188
- data/vendor/assets/javascripts/bower/codemirror/mode/gas/gas.js +0 -345
- data/vendor/assets/javascripts/bower/codemirror/mode/gfm/gfm.js +0 -123
- data/vendor/assets/javascripts/bower/codemirror/mode/gfm/test.js +0 -213
- data/vendor/assets/javascripts/bower/codemirror/mode/gherkin/gherkin.js +0 -178
- data/vendor/assets/javascripts/bower/codemirror/mode/go/go.js +0 -184
- data/vendor/assets/javascripts/bower/codemirror/mode/groovy/groovy.js +0 -226
- data/vendor/assets/javascripts/bower/codemirror/mode/haml/haml.js +0 -159
- data/vendor/assets/javascripts/bower/codemirror/mode/haml/test.js +0 -97
- data/vendor/assets/javascripts/bower/codemirror/mode/haskell/haskell.js +0 -267
- data/vendor/assets/javascripts/bower/codemirror/mode/haxe/haxe.js +0 -518
- data/vendor/assets/javascripts/bower/codemirror/mode/htmlembedded/htmlembedded.js +0 -86
- data/vendor/assets/javascripts/bower/codemirror/mode/htmlmixed/htmlmixed.js +0 -121
- data/vendor/assets/javascripts/bower/codemirror/mode/http/http.js +0 -113
- data/vendor/assets/javascripts/bower/codemirror/mode/idl/idl.js +0 -290
- data/vendor/assets/javascripts/bower/codemirror/mode/jade/jade.js +0 -590
- data/vendor/assets/javascripts/bower/codemirror/mode/javascript/javascript.js +0 -686
- data/vendor/assets/javascripts/bower/codemirror/mode/javascript/json-ld.html +0 -72
- data/vendor/assets/javascripts/bower/codemirror/mode/javascript/test.js +0 -200
- data/vendor/assets/javascripts/bower/codemirror/mode/javascript/typescript.html +0 -61
- data/vendor/assets/javascripts/bower/codemirror/mode/jinja2/jinja2.js +0 -142
- data/vendor/assets/javascripts/bower/codemirror/mode/julia/julia.js +0 -301
- data/vendor/assets/javascripts/bower/codemirror/mode/kotlin/kotlin.js +0 -280
- data/vendor/assets/javascripts/bower/codemirror/mode/livescript/livescript.js +0 -280
- data/vendor/assets/javascripts/bower/codemirror/mode/lua/lua.js +0 -159
- data/vendor/assets/javascripts/bower/codemirror/mode/markdown/markdown.js +0 -765
- data/vendor/assets/javascripts/bower/codemirror/mode/markdown/test.js +0 -754
- data/vendor/assets/javascripts/bower/codemirror/mode/meta.js +0 -165
- data/vendor/assets/javascripts/bower/codemirror/mode/mirc/mirc.js +0 -193
- data/vendor/assets/javascripts/bower/codemirror/mode/mllike/mllike.js +0 -205
- data/vendor/assets/javascripts/bower/codemirror/mode/modelica/modelica.js +0 -245
- data/vendor/assets/javascripts/bower/codemirror/mode/nginx/nginx.js +0 -178
- data/vendor/assets/javascripts/bower/codemirror/mode/ntriples/ntriples.js +0 -186
- data/vendor/assets/javascripts/bower/codemirror/mode/octave/octave.js +0 -135
- data/vendor/assets/javascripts/bower/codemirror/mode/pascal/pascal.js +0 -109
- data/vendor/assets/javascripts/bower/codemirror/mode/pegjs/pegjs.js +0 -114
- data/vendor/assets/javascripts/bower/codemirror/mode/perl/perl.js +0 -832
- data/vendor/assets/javascripts/bower/codemirror/mode/php/php.js +0 -226
- data/vendor/assets/javascripts/bower/codemirror/mode/php/test.js +0 -154
- data/vendor/assets/javascripts/bower/codemirror/mode/pig/pig.js +0 -188
- data/vendor/assets/javascripts/bower/codemirror/mode/properties/properties.js +0 -78
- data/vendor/assets/javascripts/bower/codemirror/mode/puppet/puppet.js +0 -220
- data/vendor/assets/javascripts/bower/codemirror/mode/python/python.js +0 -359
- data/vendor/assets/javascripts/bower/codemirror/mode/q/q.js +0 -139
- data/vendor/assets/javascripts/bower/codemirror/mode/r/r.js +0 -162
- data/vendor/assets/javascripts/bower/codemirror/mode/rpm/rpm.js +0 -101
- data/vendor/assets/javascripts/bower/codemirror/mode/rst/rst.js +0 -557
- data/vendor/assets/javascripts/bower/codemirror/mode/ruby/ruby.js +0 -285
- data/vendor/assets/javascripts/bower/codemirror/mode/ruby/test.js +0 -14
- data/vendor/assets/javascripts/bower/codemirror/mode/rust/rust.js +0 -451
- data/vendor/assets/javascripts/bower/codemirror/mode/sass/sass.js +0 -327
- data/vendor/assets/javascripts/bower/codemirror/mode/scheme/scheme.js +0 -248
- data/vendor/assets/javascripts/bower/codemirror/mode/shell/shell.js +0 -139
- data/vendor/assets/javascripts/bower/codemirror/mode/shell/test.js +0 -58
- data/vendor/assets/javascripts/bower/codemirror/mode/sieve/sieve.js +0 -193
- data/vendor/assets/javascripts/bower/codemirror/mode/slim/slim.js +0 -575
- data/vendor/assets/javascripts/bower/codemirror/mode/slim/test.js +0 -96
- data/vendor/assets/javascripts/bower/codemirror/mode/smalltalk/smalltalk.js +0 -168
- data/vendor/assets/javascripts/bower/codemirror/mode/smarty/smarty.js +0 -221
- data/vendor/assets/javascripts/bower/codemirror/mode/smartymixed/smartymixed.js +0 -197
- data/vendor/assets/javascripts/bower/codemirror/mode/solr/solr.js +0 -104
- data/vendor/assets/javascripts/bower/codemirror/mode/soy/soy.js +0 -198
- data/vendor/assets/javascripts/bower/codemirror/mode/sparql/sparql.js +0 -174
- data/vendor/assets/javascripts/bower/codemirror/mode/spreadsheet/spreadsheet.js +0 -109
- data/vendor/assets/javascripts/bower/codemirror/mode/sql/sql.js +0 -391
- data/vendor/assets/javascripts/bower/codemirror/mode/stex/stex.js +0 -251
- data/vendor/assets/javascripts/bower/codemirror/mode/stex/test.js +0 -123
- data/vendor/assets/javascripts/bower/codemirror/mode/tcl/tcl.js +0 -147
- data/vendor/assets/javascripts/bower/codemirror/mode/textile/test.js +0 -417
- data/vendor/assets/javascripts/bower/codemirror/mode/textile/textile.js +0 -469
- data/vendor/assets/javascripts/bower/codemirror/mode/tiddlywiki/tiddlywiki.css +0 -14
- data/vendor/assets/javascripts/bower/codemirror/mode/tiddlywiki/tiddlywiki.js +0 -369
- data/vendor/assets/javascripts/bower/codemirror/mode/tiki/tiki.css +0 -26
- data/vendor/assets/javascripts/bower/codemirror/mode/tiki/tiki.js +0 -323
- data/vendor/assets/javascripts/bower/codemirror/mode/toml/toml.js +0 -88
- data/vendor/assets/javascripts/bower/codemirror/mode/tornado/tornado.js +0 -68
- data/vendor/assets/javascripts/bower/codemirror/mode/turtle/turtle.js +0 -162
- data/vendor/assets/javascripts/bower/codemirror/mode/vb/vb.js +0 -274
- data/vendor/assets/javascripts/bower/codemirror/mode/vbscript/vbscript.js +0 -350
- data/vendor/assets/javascripts/bower/codemirror/mode/velocity/velocity.js +0 -201
- data/vendor/assets/javascripts/bower/codemirror/mode/verilog/test.js +0 -273
- data/vendor/assets/javascripts/bower/codemirror/mode/verilog/verilog.js +0 -364
- data/vendor/assets/javascripts/bower/codemirror/mode/xml/test.js +0 -51
- data/vendor/assets/javascripts/bower/codemirror/mode/xml/xml.js +0 -384
- data/vendor/assets/javascripts/bower/codemirror/mode/xquery/test.js +0 -67
- data/vendor/assets/javascripts/bower/codemirror/mode/xquery/xquery.js +0 -447
- data/vendor/assets/javascripts/bower/codemirror/mode/yaml/yaml.js +0 -117
- data/vendor/assets/javascripts/bower/codemirror/mode/z80/z80.js +0 -100
- data/vendor/assets/javascripts/bower/vue/LICENSE +0 -21
- data/vendor/assets/javascripts/bower/vue/src/api/child.js +0 -53
- data/vendor/assets/javascripts/bower/vue/src/api/data.js +0 -161
- data/vendor/assets/javascripts/bower/vue/src/api/dom.js +0 -211
- data/vendor/assets/javascripts/bower/vue/src/api/events.js +0 -176
- data/vendor/assets/javascripts/bower/vue/src/api/global.js +0 -146
- data/vendor/assets/javascripts/bower/vue/src/api/lifecycle.js +0 -72
- data/vendor/assets/javascripts/bower/vue/src/batcher.js +0 -65
- data/vendor/assets/javascripts/bower/vue/src/cache.js +0 -112
- data/vendor/assets/javascripts/bower/vue/src/compiler/compile.js +0 -549
- data/vendor/assets/javascripts/bower/vue/src/compiler/transclude.js +0 -146
- data/vendor/assets/javascripts/bower/vue/src/config.js +0 -79
- data/vendor/assets/javascripts/bower/vue/src/directive.js +0 -219
- data/vendor/assets/javascripts/bower/vue/src/directives/attr.js +0 -32
- data/vendor/assets/javascripts/bower/vue/src/directives/class.js +0 -18
- data/vendor/assets/javascripts/bower/vue/src/directives/cloak.js +0 -12
- data/vendor/assets/javascripts/bower/vue/src/directives/component.js +0 -196
- data/vendor/assets/javascripts/bower/vue/src/directives/el.js +0 -13
- data/vendor/assets/javascripts/bower/vue/src/directives/html.js +0 -38
- data/vendor/assets/javascripts/bower/vue/src/directives/if.js +0 -87
- data/vendor/assets/javascripts/bower/vue/src/directives/index.js +0 -22
- data/vendor/assets/javascripts/bower/vue/src/directives/model/checkbox.js +0 -25
- data/vendor/assets/javascripts/bower/vue/src/directives/model/default.js +0 -123
- data/vendor/assets/javascripts/bower/vue/src/directives/model/index.js +0 -56
- data/vendor/assets/javascripts/bower/vue/src/directives/model/radio.js +0 -26
- data/vendor/assets/javascripts/bower/vue/src/directives/model/select.js +0 -166
- data/vendor/assets/javascripts/bower/vue/src/directives/on.js +0 -59
- data/vendor/assets/javascripts/bower/vue/src/directives/partial.js +0 -44
- data/vendor/assets/javascripts/bower/vue/src/directives/ref.js +0 -24
- data/vendor/assets/javascripts/bower/vue/src/directives/repeat.js +0 -503
- data/vendor/assets/javascripts/bower/vue/src/directives/show.js +0 -8
- data/vendor/assets/javascripts/bower/vue/src/directives/style.js +0 -58
- data/vendor/assets/javascripts/bower/vue/src/directives/text.js +0 -15
- data/vendor/assets/javascripts/bower/vue/src/directives/transition.js +0 -12
- data/vendor/assets/javascripts/bower/vue/src/directives/with.js +0 -47
- data/vendor/assets/javascripts/bower/vue/src/filters/array-filters.js +0 -87
- data/vendor/assets/javascripts/bower/vue/src/filters/index.js +0 -135
- data/vendor/assets/javascripts/bower/vue/src/instance/compile.js +0 -179
- data/vendor/assets/javascripts/bower/vue/src/instance/events.js +0 -122
- data/vendor/assets/javascripts/bower/vue/src/instance/init.js +0 -76
- data/vendor/assets/javascripts/bower/vue/src/instance/scope.js +0 -217
- data/vendor/assets/javascripts/bower/vue/src/observer/array.js +0 -90
- data/vendor/assets/javascripts/bower/vue/src/observer/dep.js +0 -50
- data/vendor/assets/javascripts/bower/vue/src/observer/index.js +0 -235
- data/vendor/assets/javascripts/bower/vue/src/observer/object.js +0 -66
- data/vendor/assets/javascripts/bower/vue/src/parsers/directive.js +0 -159
- data/vendor/assets/javascripts/bower/vue/src/parsers/expression.js +0 -226
- data/vendor/assets/javascripts/bower/vue/src/parsers/path.js +0 -300
- data/vendor/assets/javascripts/bower/vue/src/parsers/template.js +0 -248
- data/vendor/assets/javascripts/bower/vue/src/parsers/text.js +0 -178
- data/vendor/assets/javascripts/bower/vue/src/transition/css.js +0 -189
- data/vendor/assets/javascripts/bower/vue/src/transition/index.js +0 -151
- data/vendor/assets/javascripts/bower/vue/src/transition/js.js +0 -43
- data/vendor/assets/javascripts/bower/vue/src/util/debug.js +0 -50
- data/vendor/assets/javascripts/bower/vue/src/util/dom.js +0 -197
- data/vendor/assets/javascripts/bower/vue/src/util/env.js +0 -74
- data/vendor/assets/javascripts/bower/vue/src/util/filter.js +0 -72
- data/vendor/assets/javascripts/bower/vue/src/util/index.js +0 -8
- data/vendor/assets/javascripts/bower/vue/src/util/lang.js +0 -175
- data/vendor/assets/javascripts/bower/vue/src/util/merge-option.js +0 -255
- data/vendor/assets/javascripts/bower/vue/src/vue.js +0 -84
- data/vendor/assets/javascripts/bower/vue/src/watcher.js +0 -240
@@ -1,327 +0,0 @@
|
|
1
|
-
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
-
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
-
|
4
|
-
(function(mod) {
|
5
|
-
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
-
mod(require("../../lib/codemirror"));
|
7
|
-
else if (typeof define == "function" && define.amd) // AMD
|
8
|
-
define(["../../lib/codemirror"], mod);
|
9
|
-
else // Plain browser env
|
10
|
-
mod(CodeMirror);
|
11
|
-
})(function(CodeMirror) {
|
12
|
-
"use strict";
|
13
|
-
|
14
|
-
CodeMirror.defineMode("sass", function(config) {
|
15
|
-
function tokenRegexp(words) {
|
16
|
-
return new RegExp("^" + words.join("|"));
|
17
|
-
}
|
18
|
-
|
19
|
-
var keywords = ["true", "false", "null", "auto"];
|
20
|
-
var keywordsRegexp = new RegExp("^" + keywords.join("|"));
|
21
|
-
|
22
|
-
var operators = ["\\(", "\\)", "=", ">", "<", "==", ">=", "<=", "\\+", "-", "\\!=", "/", "\\*", "%", "and", "or", "not"];
|
23
|
-
var opRegexp = tokenRegexp(operators);
|
24
|
-
|
25
|
-
var pseudoElementsRegexp = /^::?[\w\-]+/;
|
26
|
-
|
27
|
-
function urlTokens(stream, state) {
|
28
|
-
var ch = stream.peek();
|
29
|
-
|
30
|
-
if (ch === ")") {
|
31
|
-
stream.next();
|
32
|
-
state.tokenizer = tokenBase;
|
33
|
-
return "operator";
|
34
|
-
} else if (ch === "(") {
|
35
|
-
stream.next();
|
36
|
-
stream.eatSpace();
|
37
|
-
|
38
|
-
return "operator";
|
39
|
-
} else if (ch === "'" || ch === '"') {
|
40
|
-
state.tokenizer = buildStringTokenizer(stream.next());
|
41
|
-
return "string";
|
42
|
-
} else {
|
43
|
-
state.tokenizer = buildStringTokenizer(")", false);
|
44
|
-
return "string";
|
45
|
-
}
|
46
|
-
}
|
47
|
-
function comment(indentation, multiLine) {
|
48
|
-
return function(stream, state) {
|
49
|
-
if (stream.sol() && stream.indentation() <= indentation) {
|
50
|
-
state.tokenizer = tokenBase;
|
51
|
-
return tokenBase(stream, state);
|
52
|
-
}
|
53
|
-
|
54
|
-
if (multiLine && stream.skipTo("*/")) {
|
55
|
-
stream.next();
|
56
|
-
stream.next();
|
57
|
-
state.tokenizer = tokenBase;
|
58
|
-
} else {
|
59
|
-
stream.next();
|
60
|
-
}
|
61
|
-
|
62
|
-
return "comment";
|
63
|
-
};
|
64
|
-
}
|
65
|
-
|
66
|
-
function buildStringTokenizer(quote, greedy) {
|
67
|
-
if(greedy == null) { greedy = true; }
|
68
|
-
|
69
|
-
function stringTokenizer(stream, state) {
|
70
|
-
var nextChar = stream.next();
|
71
|
-
var peekChar = stream.peek();
|
72
|
-
var previousChar = stream.string.charAt(stream.pos-2);
|
73
|
-
|
74
|
-
var endingString = ((nextChar !== "\\" && peekChar === quote) || (nextChar === quote && previousChar !== "\\"));
|
75
|
-
|
76
|
-
if (endingString) {
|
77
|
-
if (nextChar !== quote && greedy) { stream.next(); }
|
78
|
-
state.tokenizer = tokenBase;
|
79
|
-
return "string";
|
80
|
-
} else if (nextChar === "#" && peekChar === "{") {
|
81
|
-
state.tokenizer = buildInterpolationTokenizer(stringTokenizer);
|
82
|
-
stream.next();
|
83
|
-
return "operator";
|
84
|
-
} else {
|
85
|
-
return "string";
|
86
|
-
}
|
87
|
-
}
|
88
|
-
|
89
|
-
return stringTokenizer;
|
90
|
-
}
|
91
|
-
|
92
|
-
function buildInterpolationTokenizer(currentTokenizer) {
|
93
|
-
return function(stream, state) {
|
94
|
-
if (stream.peek() === "}") {
|
95
|
-
stream.next();
|
96
|
-
state.tokenizer = currentTokenizer;
|
97
|
-
return "operator";
|
98
|
-
} else {
|
99
|
-
return tokenBase(stream, state);
|
100
|
-
}
|
101
|
-
};
|
102
|
-
}
|
103
|
-
|
104
|
-
function indent(state) {
|
105
|
-
if (state.indentCount == 0) {
|
106
|
-
state.indentCount++;
|
107
|
-
var lastScopeOffset = state.scopes[0].offset;
|
108
|
-
var currentOffset = lastScopeOffset + config.indentUnit;
|
109
|
-
state.scopes.unshift({ offset:currentOffset });
|
110
|
-
}
|
111
|
-
}
|
112
|
-
|
113
|
-
function dedent(state) {
|
114
|
-
if (state.scopes.length == 1) return;
|
115
|
-
|
116
|
-
state.scopes.shift();
|
117
|
-
}
|
118
|
-
|
119
|
-
function tokenBase(stream, state) {
|
120
|
-
var ch = stream.peek();
|
121
|
-
|
122
|
-
// Comment
|
123
|
-
if (stream.match("/*")) {
|
124
|
-
state.tokenizer = comment(stream.indentation(), true);
|
125
|
-
return state.tokenizer(stream, state);
|
126
|
-
}
|
127
|
-
if (stream.match("//")) {
|
128
|
-
state.tokenizer = comment(stream.indentation(), false);
|
129
|
-
return state.tokenizer(stream, state);
|
130
|
-
}
|
131
|
-
|
132
|
-
// Interpolation
|
133
|
-
if (stream.match("#{")) {
|
134
|
-
state.tokenizer = buildInterpolationTokenizer(tokenBase);
|
135
|
-
return "operator";
|
136
|
-
}
|
137
|
-
|
138
|
-
if (ch === ".") {
|
139
|
-
stream.next();
|
140
|
-
|
141
|
-
// Match class selectors
|
142
|
-
if (stream.match(/^[\w-]+/)) {
|
143
|
-
indent(state);
|
144
|
-
return "atom";
|
145
|
-
} else if (stream.peek() === "#") {
|
146
|
-
indent(state);
|
147
|
-
return "atom";
|
148
|
-
} else {
|
149
|
-
return "operator";
|
150
|
-
}
|
151
|
-
}
|
152
|
-
|
153
|
-
if (ch === "#") {
|
154
|
-
stream.next();
|
155
|
-
|
156
|
-
// Hex numbers
|
157
|
-
if (stream.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/))
|
158
|
-
return "number";
|
159
|
-
|
160
|
-
// ID selectors
|
161
|
-
if (stream.match(/^[\w-]+/)) {
|
162
|
-
indent(state);
|
163
|
-
return "atom";
|
164
|
-
}
|
165
|
-
|
166
|
-
if (stream.peek() === "#") {
|
167
|
-
indent(state);
|
168
|
-
return "atom";
|
169
|
-
}
|
170
|
-
}
|
171
|
-
|
172
|
-
// Numbers
|
173
|
-
if (stream.match(/^-?[0-9\.]+/))
|
174
|
-
return "number";
|
175
|
-
|
176
|
-
// Units
|
177
|
-
if (stream.match(/^(px|em|in)\b/))
|
178
|
-
return "unit";
|
179
|
-
|
180
|
-
if (stream.match(keywordsRegexp))
|
181
|
-
return "keyword";
|
182
|
-
|
183
|
-
if (stream.match(/^url/) && stream.peek() === "(") {
|
184
|
-
state.tokenizer = urlTokens;
|
185
|
-
return "atom";
|
186
|
-
}
|
187
|
-
|
188
|
-
// Variables
|
189
|
-
if (ch === "$") {
|
190
|
-
stream.next();
|
191
|
-
stream.eatWhile(/[\w-]/);
|
192
|
-
|
193
|
-
if (stream.peek() === ":") {
|
194
|
-
stream.next();
|
195
|
-
return "variable-2";
|
196
|
-
} else {
|
197
|
-
return "variable-3";
|
198
|
-
}
|
199
|
-
}
|
200
|
-
|
201
|
-
if (ch === "!") {
|
202
|
-
stream.next();
|
203
|
-
return stream.match(/^[\w]+/) ? "keyword": "operator";
|
204
|
-
}
|
205
|
-
|
206
|
-
if (ch === "=") {
|
207
|
-
stream.next();
|
208
|
-
|
209
|
-
// Match shortcut mixin definition
|
210
|
-
if (stream.match(/^[\w-]+/)) {
|
211
|
-
indent(state);
|
212
|
-
return "meta";
|
213
|
-
} else {
|
214
|
-
return "operator";
|
215
|
-
}
|
216
|
-
}
|
217
|
-
|
218
|
-
if (ch === "+") {
|
219
|
-
stream.next();
|
220
|
-
|
221
|
-
// Match shortcut mixin definition
|
222
|
-
if (stream.match(/^[\w-]+/))
|
223
|
-
return "variable-3";
|
224
|
-
else
|
225
|
-
return "operator";
|
226
|
-
}
|
227
|
-
|
228
|
-
// Indent Directives
|
229
|
-
if (stream.match(/^@(else if|if|media|else|for|each|while|mixin|function)/)) {
|
230
|
-
indent(state);
|
231
|
-
return "meta";
|
232
|
-
}
|
233
|
-
|
234
|
-
// Other Directives
|
235
|
-
if (ch === "@") {
|
236
|
-
stream.next();
|
237
|
-
stream.eatWhile(/[\w-]/);
|
238
|
-
return "meta";
|
239
|
-
}
|
240
|
-
|
241
|
-
// Strings
|
242
|
-
if (ch === '"' || ch === "'") {
|
243
|
-
stream.next();
|
244
|
-
state.tokenizer = buildStringTokenizer(ch);
|
245
|
-
return "string";
|
246
|
-
}
|
247
|
-
|
248
|
-
// Pseudo element selectors
|
249
|
-
if (ch == ":" && stream.match(pseudoElementsRegexp))
|
250
|
-
return "keyword";
|
251
|
-
|
252
|
-
// atoms
|
253
|
-
if (stream.eatWhile(/[\w-&]/)) {
|
254
|
-
// matches a property definition
|
255
|
-
if (stream.peek() === ":" && !stream.match(pseudoElementsRegexp, false))
|
256
|
-
return "property";
|
257
|
-
else
|
258
|
-
return "atom";
|
259
|
-
}
|
260
|
-
|
261
|
-
if (stream.match(opRegexp))
|
262
|
-
return "operator";
|
263
|
-
|
264
|
-
// If we haven't returned by now, we move 1 character
|
265
|
-
// and return an error
|
266
|
-
stream.next();
|
267
|
-
return null;
|
268
|
-
}
|
269
|
-
|
270
|
-
function tokenLexer(stream, state) {
|
271
|
-
if (stream.sol()) state.indentCount = 0;
|
272
|
-
var style = state.tokenizer(stream, state);
|
273
|
-
var current = stream.current();
|
274
|
-
|
275
|
-
if (current === "@return")
|
276
|
-
dedent(state);
|
277
|
-
|
278
|
-
if (style === "atom")
|
279
|
-
indent(state);
|
280
|
-
|
281
|
-
if (style !== null) {
|
282
|
-
var startOfToken = stream.pos - current.length;
|
283
|
-
var withCurrentIndent = startOfToken + (config.indentUnit * state.indentCount);
|
284
|
-
|
285
|
-
var newScopes = [];
|
286
|
-
|
287
|
-
for (var i = 0; i < state.scopes.length; i++) {
|
288
|
-
var scope = state.scopes[i];
|
289
|
-
|
290
|
-
if (scope.offset <= withCurrentIndent)
|
291
|
-
newScopes.push(scope);
|
292
|
-
}
|
293
|
-
|
294
|
-
state.scopes = newScopes;
|
295
|
-
}
|
296
|
-
|
297
|
-
|
298
|
-
return style;
|
299
|
-
}
|
300
|
-
|
301
|
-
return {
|
302
|
-
startState: function() {
|
303
|
-
return {
|
304
|
-
tokenizer: tokenBase,
|
305
|
-
scopes: [{offset: 0, type: "sass"}],
|
306
|
-
indentCount: 0,
|
307
|
-
definedVars: [],
|
308
|
-
definedMixins: []
|
309
|
-
};
|
310
|
-
},
|
311
|
-
token: function(stream, state) {
|
312
|
-
var style = tokenLexer(stream, state);
|
313
|
-
|
314
|
-
state.lastToken = { style: style, content: stream.current() };
|
315
|
-
|
316
|
-
return style;
|
317
|
-
},
|
318
|
-
|
319
|
-
indent: function(state) {
|
320
|
-
return state.scopes[0].offset;
|
321
|
-
}
|
322
|
-
};
|
323
|
-
});
|
324
|
-
|
325
|
-
CodeMirror.defineMIME("text/x-sass", "sass");
|
326
|
-
|
327
|
-
});
|
@@ -1,248 +0,0 @@
|
|
1
|
-
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
-
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
-
|
4
|
-
/**
|
5
|
-
* Author: Koh Zi Han, based on implementation by Koh Zi Chun
|
6
|
-
*/
|
7
|
-
|
8
|
-
(function(mod) {
|
9
|
-
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
10
|
-
mod(require("../../lib/codemirror"));
|
11
|
-
else if (typeof define == "function" && define.amd) // AMD
|
12
|
-
define(["../../lib/codemirror"], mod);
|
13
|
-
else // Plain browser env
|
14
|
-
mod(CodeMirror);
|
15
|
-
})(function(CodeMirror) {
|
16
|
-
"use strict";
|
17
|
-
|
18
|
-
CodeMirror.defineMode("scheme", function () {
|
19
|
-
var BUILTIN = "builtin", COMMENT = "comment", STRING = "string",
|
20
|
-
ATOM = "atom", NUMBER = "number", BRACKET = "bracket";
|
21
|
-
var INDENT_WORD_SKIP = 2;
|
22
|
-
|
23
|
-
function makeKeywords(str) {
|
24
|
-
var obj = {}, words = str.split(" ");
|
25
|
-
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
26
|
-
return obj;
|
27
|
-
}
|
28
|
-
|
29
|
-
var keywords = makeKeywords("λ case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?");
|
30
|
-
var indentKeys = makeKeywords("define let letrec let* lambda");
|
31
|
-
|
32
|
-
function stateStack(indent, type, prev) { // represents a state stack object
|
33
|
-
this.indent = indent;
|
34
|
-
this.type = type;
|
35
|
-
this.prev = prev;
|
36
|
-
}
|
37
|
-
|
38
|
-
function pushStack(state, indent, type) {
|
39
|
-
state.indentStack = new stateStack(indent, type, state.indentStack);
|
40
|
-
}
|
41
|
-
|
42
|
-
function popStack(state) {
|
43
|
-
state.indentStack = state.indentStack.prev;
|
44
|
-
}
|
45
|
-
|
46
|
-
var binaryMatcher = new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i);
|
47
|
-
var octalMatcher = new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i);
|
48
|
-
var hexMatcher = new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i);
|
49
|
-
var decimalMatcher = new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i);
|
50
|
-
|
51
|
-
function isBinaryNumber (stream) {
|
52
|
-
return stream.match(binaryMatcher);
|
53
|
-
}
|
54
|
-
|
55
|
-
function isOctalNumber (stream) {
|
56
|
-
return stream.match(octalMatcher);
|
57
|
-
}
|
58
|
-
|
59
|
-
function isDecimalNumber (stream, backup) {
|
60
|
-
if (backup === true) {
|
61
|
-
stream.backUp(1);
|
62
|
-
}
|
63
|
-
return stream.match(decimalMatcher);
|
64
|
-
}
|
65
|
-
|
66
|
-
function isHexNumber (stream) {
|
67
|
-
return stream.match(hexMatcher);
|
68
|
-
}
|
69
|
-
|
70
|
-
return {
|
71
|
-
startState: function () {
|
72
|
-
return {
|
73
|
-
indentStack: null,
|
74
|
-
indentation: 0,
|
75
|
-
mode: false,
|
76
|
-
sExprComment: false
|
77
|
-
};
|
78
|
-
},
|
79
|
-
|
80
|
-
token: function (stream, state) {
|
81
|
-
if (state.indentStack == null && stream.sol()) {
|
82
|
-
// update indentation, but only if indentStack is empty
|
83
|
-
state.indentation = stream.indentation();
|
84
|
-
}
|
85
|
-
|
86
|
-
// skip spaces
|
87
|
-
if (stream.eatSpace()) {
|
88
|
-
return null;
|
89
|
-
}
|
90
|
-
var returnType = null;
|
91
|
-
|
92
|
-
switch(state.mode){
|
93
|
-
case "string": // multi-line string parsing mode
|
94
|
-
var next, escaped = false;
|
95
|
-
while ((next = stream.next()) != null) {
|
96
|
-
if (next == "\"" && !escaped) {
|
97
|
-
|
98
|
-
state.mode = false;
|
99
|
-
break;
|
100
|
-
}
|
101
|
-
escaped = !escaped && next == "\\";
|
102
|
-
}
|
103
|
-
returnType = STRING; // continue on in scheme-string mode
|
104
|
-
break;
|
105
|
-
case "comment": // comment parsing mode
|
106
|
-
var next, maybeEnd = false;
|
107
|
-
while ((next = stream.next()) != null) {
|
108
|
-
if (next == "#" && maybeEnd) {
|
109
|
-
|
110
|
-
state.mode = false;
|
111
|
-
break;
|
112
|
-
}
|
113
|
-
maybeEnd = (next == "|");
|
114
|
-
}
|
115
|
-
returnType = COMMENT;
|
116
|
-
break;
|
117
|
-
case "s-expr-comment": // s-expr commenting mode
|
118
|
-
state.mode = false;
|
119
|
-
if(stream.peek() == "(" || stream.peek() == "["){
|
120
|
-
// actually start scheme s-expr commenting mode
|
121
|
-
state.sExprComment = 0;
|
122
|
-
}else{
|
123
|
-
// if not we just comment the entire of the next token
|
124
|
-
stream.eatWhile(/[^/s]/); // eat non spaces
|
125
|
-
returnType = COMMENT;
|
126
|
-
break;
|
127
|
-
}
|
128
|
-
default: // default parsing mode
|
129
|
-
var ch = stream.next();
|
130
|
-
|
131
|
-
if (ch == "\"") {
|
132
|
-
state.mode = "string";
|
133
|
-
returnType = STRING;
|
134
|
-
|
135
|
-
} else if (ch == "'") {
|
136
|
-
returnType = ATOM;
|
137
|
-
} else if (ch == '#') {
|
138
|
-
if (stream.eat("|")) { // Multi-line comment
|
139
|
-
state.mode = "comment"; // toggle to comment mode
|
140
|
-
returnType = COMMENT;
|
141
|
-
} else if (stream.eat(/[tf]/i)) { // #t/#f (atom)
|
142
|
-
returnType = ATOM;
|
143
|
-
} else if (stream.eat(';')) { // S-Expr comment
|
144
|
-
state.mode = "s-expr-comment";
|
145
|
-
returnType = COMMENT;
|
146
|
-
} else {
|
147
|
-
var numTest = null, hasExactness = false, hasRadix = true;
|
148
|
-
if (stream.eat(/[ei]/i)) {
|
149
|
-
hasExactness = true;
|
150
|
-
} else {
|
151
|
-
stream.backUp(1); // must be radix specifier
|
152
|
-
}
|
153
|
-
if (stream.match(/^#b/i)) {
|
154
|
-
numTest = isBinaryNumber;
|
155
|
-
} else if (stream.match(/^#o/i)) {
|
156
|
-
numTest = isOctalNumber;
|
157
|
-
} else if (stream.match(/^#x/i)) {
|
158
|
-
numTest = isHexNumber;
|
159
|
-
} else if (stream.match(/^#d/i)) {
|
160
|
-
numTest = isDecimalNumber;
|
161
|
-
} else if (stream.match(/^[-+0-9.]/, false)) {
|
162
|
-
hasRadix = false;
|
163
|
-
numTest = isDecimalNumber;
|
164
|
-
// re-consume the intial # if all matches failed
|
165
|
-
} else if (!hasExactness) {
|
166
|
-
stream.eat('#');
|
167
|
-
}
|
168
|
-
if (numTest != null) {
|
169
|
-
if (hasRadix && !hasExactness) {
|
170
|
-
// consume optional exactness after radix
|
171
|
-
stream.match(/^#[ei]/i);
|
172
|
-
}
|
173
|
-
if (numTest(stream))
|
174
|
-
returnType = NUMBER;
|
175
|
-
}
|
176
|
-
}
|
177
|
-
} else if (/^[-+0-9.]/.test(ch) && isDecimalNumber(stream, true)) { // match non-prefixed number, must be decimal
|
178
|
-
returnType = NUMBER;
|
179
|
-
} else if (ch == ";") { // comment
|
180
|
-
stream.skipToEnd(); // rest of the line is a comment
|
181
|
-
returnType = COMMENT;
|
182
|
-
} else if (ch == "(" || ch == "[") {
|
183
|
-
var keyWord = ''; var indentTemp = stream.column(), letter;
|
184
|
-
/**
|
185
|
-
Either
|
186
|
-
(indent-word ..
|
187
|
-
(non-indent-word ..
|
188
|
-
(;something else, bracket, etc.
|
189
|
-
*/
|
190
|
-
|
191
|
-
while ((letter = stream.eat(/[^\s\(\[\;\)\]]/)) != null) {
|
192
|
-
keyWord += letter;
|
193
|
-
}
|
194
|
-
|
195
|
-
if (keyWord.length > 0 && indentKeys.propertyIsEnumerable(keyWord)) { // indent-word
|
196
|
-
|
197
|
-
pushStack(state, indentTemp + INDENT_WORD_SKIP, ch);
|
198
|
-
} else { // non-indent word
|
199
|
-
// we continue eating the spaces
|
200
|
-
stream.eatSpace();
|
201
|
-
if (stream.eol() || stream.peek() == ";") {
|
202
|
-
// nothing significant after
|
203
|
-
// we restart indentation 1 space after
|
204
|
-
pushStack(state, indentTemp + 1, ch);
|
205
|
-
} else {
|
206
|
-
pushStack(state, indentTemp + stream.current().length, ch); // else we match
|
207
|
-
}
|
208
|
-
}
|
209
|
-
stream.backUp(stream.current().length - 1); // undo all the eating
|
210
|
-
|
211
|
-
if(typeof state.sExprComment == "number") state.sExprComment++;
|
212
|
-
|
213
|
-
returnType = BRACKET;
|
214
|
-
} else if (ch == ")" || ch == "]") {
|
215
|
-
returnType = BRACKET;
|
216
|
-
if (state.indentStack != null && state.indentStack.type == (ch == ")" ? "(" : "[")) {
|
217
|
-
popStack(state);
|
218
|
-
|
219
|
-
if(typeof state.sExprComment == "number"){
|
220
|
-
if(--state.sExprComment == 0){
|
221
|
-
returnType = COMMENT; // final closing bracket
|
222
|
-
state.sExprComment = false; // turn off s-expr commenting mode
|
223
|
-
}
|
224
|
-
}
|
225
|
-
}
|
226
|
-
} else {
|
227
|
-
stream.eatWhile(/[\w\$_\-!$%&*+\.\/:<=>?@\^~]/);
|
228
|
-
|
229
|
-
if (keywords && keywords.propertyIsEnumerable(stream.current())) {
|
230
|
-
returnType = BUILTIN;
|
231
|
-
} else returnType = "variable";
|
232
|
-
}
|
233
|
-
}
|
234
|
-
return (typeof state.sExprComment == "number") ? COMMENT : returnType;
|
235
|
-
},
|
236
|
-
|
237
|
-
indent: function (state) {
|
238
|
-
if (state.indentStack == null) return state.indentation;
|
239
|
-
return state.indentStack.indent;
|
240
|
-
},
|
241
|
-
|
242
|
-
lineComment: ";;"
|
243
|
-
};
|
244
|
-
});
|
245
|
-
|
246
|
-
CodeMirror.defineMIME("text/x-scheme", "scheme");
|
247
|
-
|
248
|
-
});
|