locomotivecms 4.1.1 → 4.2.0.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +4 -3
- data/Rakefile +4 -0
- data/app/api/locomotive/api.rb +1 -1
- data/app/assets/config/locomotive_manifest.js +2 -0
- data/app/assets/javascripts/locomotive.js +2 -2
- data/app/assets/stylesheets/locomotive/account.scss +0 -1
- data/app/assets/stylesheets/locomotive/application.scss +0 -1
- data/app/assets/stylesheets/locomotive/live_editing_error.scss +0 -1
- data/app/assets/stylesheets/locomotive/live_editing_iframe.scss +0 -1
- data/app/controllers/locomotive/base_controller.rb +1 -1
- data/app/controllers/locomotive/concerns/authorization_controller.rb +1 -1
- data/app/controllers/locomotive/concerns/redirect_to_main_host_controller.rb +1 -1
- data/app/controllers/locomotive/concerns/site_dispatcher_controller.rb +1 -1
- data/app/controllers/locomotive/errors_controller.rb +1 -1
- data/app/controllers/locomotive/my_account_controller.rb +1 -1
- data/app/controllers/locomotive/passwords_controller.rb +3 -1
- data/app/controllers/locomotive/registrations_controller.rb +3 -1
- data/app/controllers/locomotive/sessions_controller.rb +3 -1
- data/app/controllers/locomotive/sites_controller.rb +1 -1
- data/app/helpers/locomotive/base_helper.rb +2 -2
- data/app/helpers/locomotive/custom_fields_helper.rb +2 -2
- data/app/helpers/locomotive/shared/activities_helper.rb +1 -1
- data/app/inputs/locomotive/api_key_input.rb +1 -1
- data/app/mailers/locomotive/notifications.rb +1 -1
- data/app/models/locomotive/account.rb +1 -1
- data/app/models/locomotive/concerns/account/api_key.rb +1 -1
- data/app/models/locomotive/concerns/content_entry/csv.rb +1 -1
- data/app/models/locomotive/concerns/content_entry/slug.rb +5 -5
- data/app/models/locomotive/concerns/content_type/entry_template.rb +3 -3
- data/app/models/locomotive/concerns/page/templatized.rb +1 -1
- data/app/models/locomotive/concerns/shared/json_attribute.rb +21 -2
- data/app/models/locomotive/concerns/site/routes.rb +1 -1
- data/app/models/locomotive/content_entry.rb +2 -2
- data/app/models/locomotive/page.rb +3 -3
- data/app/models/locomotive/section.rb +1 -1
- data/app/models/locomotive/snippet.rb +1 -1
- data/app/models/locomotive/translation.rb +1 -1
- data/app/services/locomotive/content_entry_import_service.rb +1 -1
- data/app/services/locomotive/content_entry_service.rb +2 -2
- data/app/services/locomotive/content_type_service.rb +13 -3
- data/app/services/locomotive/custom_field_service.rb +2 -2
- data/app/services/locomotive/editor_service.rb +1 -1
- data/app/uploaders/locomotive/base_uploader.rb +0 -10
- data/app/views/locomotive/dashboard/_activity.html.slim +1 -1
- data/app/views/locomotive/page_content/_edit.json.jbuilder +50 -0
- data/app/views/locomotive/page_content/edit.html.erb +1 -1
- data/app/views/locomotive/page_content/edit.json.jbuilder +52 -50
- data/config/initializers/devise.rb +5 -2
- data/lib/generators/locomotive/install/templates/locomotive.rb +0 -5
- data/lib/locomotive/action_controller/responder.rb +1 -1
- data/lib/locomotive/configuration.rb +2 -2
- data/lib/locomotive/dependencies.rb +0 -2
- data/lib/locomotive/engine.rb +14 -2
- data/lib/locomotive/mongoid/patches.rb +25 -65
- data/lib/locomotive/steam/services/api_entry_submission_service.rb +1 -0
- data/lib/locomotive/version.rb +1 -1
- data/vendor/assets/javascripts/locomotive/codemirror/addons/comment/comment.js +203 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/comment/continuecomment.js +85 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/dialog/dialog.js +157 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/display/autorefresh.js +47 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/display/fullscreen.js +41 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/display/panel.js +112 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/display/placeholder.js +62 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/display/rulers.js +51 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/closebrackets.js +195 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/closetag.js +169 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/continuelist.js +51 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/matchbrackets.js +120 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/matchtags.js +66 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/trailingspace.js +27 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/brace-fold.js +105 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/comment-fold.js +59 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/foldcode.js +150 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/foldgutter.js +146 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/indent-fold.js +44 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/markdown-fold.js +49 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/xml-fold.js +182 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/anyword-hint.js +41 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/css-hint.js +60 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/html-hint.js +348 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/javascript-hint.js +146 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/show-hint.js +437 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/sql-hint.js +271 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/xml-hint.js +110 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/coffeescript-lint.js +41 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/css-lint.js +35 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/html-lint.js +46 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/javascript-lint.js +136 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/json-lint.js +31 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/lint.js +239 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/yaml-lint.js +28 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/merge/merge.js +773 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/loadmode.js +64 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/multiplex.js +123 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/overlay.js +85 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/simple.js +213 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/colorize.js +40 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/runmode-standalone.js +157 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/runmode.js +72 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/runmode.node.js +179 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/scroll/annotatescrollbar.js +118 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/scroll/scrollpastend.js +48 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/scroll/simplescrollbars.js +152 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/search/jump-to-line.js +49 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/search/match-highlighter.js +146 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/search/matchesonscrollbar.js +97 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/search/search.js +249 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/search/searchcursor.js +189 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/selection/active-line.js +74 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/selection/mark-selection.js +118 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/selection/selection-pointer.js +98 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/tern/tern.js +701 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/tern/worker.js +44 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/wrap/hardwrap.js +144 -0
- data/vendor/assets/javascripts/locomotive/codemirror/keymaps/emacs.js +412 -0
- data/vendor/assets/javascripts/locomotive/codemirror/keymaps/sublime.js +580 -0
- data/vendor/assets/javascripts/locomotive/codemirror/keymaps/vim.js +5065 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/apl.js +174 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/asciiarmor.js +73 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/asn.1.js +204 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/asterisk.js +196 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/brainfuck.js +85 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/clike.js +786 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/clojure.js +306 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/cmake.js +97 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/cobol.js +255 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/coffeescript.js +355 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/commonlisp.js +123 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/crystal.js +391 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/css.js +825 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/cypher.js +146 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/d.js +218 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/dart.js +157 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/diff.js +47 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/django.js +356 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/dockerfile.js +79 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/dtd.js +142 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/dylan.js +344 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ebnf.js +195 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ecl.js +206 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/eiffel.js +160 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/elm.js +205 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/erlang.js +618 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/factor.js +83 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/fcl.js +173 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/forth.js +180 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/fortran.js +188 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/gas.js +345 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/gfm.js +130 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/gherkin.js +178 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/go.js +185 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/groovy.js +230 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/haml.js +161 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/handlebars.js +62 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/haskell-literate.js +43 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/haskell.js +267 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/haxe.js +515 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/htmlembedded.js +28 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/htmlmixed.js +152 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/http.js +113 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/idl.js +290 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/jade.js +590 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/javascript.js +748 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/jinja2.js +142 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/jsx.js +147 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/julia.js +392 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/livescript.js +280 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/lua.js +159 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/markdown.js +797 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mathematica.js +176 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mbox.js +129 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mirc.js +193 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mllike.js +205 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/modelica.js +245 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mscgen.js +169 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mumps.js +148 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/nginx.js +178 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/nsis.js +95 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ntriples.js +186 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/octave.js +135 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/oz.js +252 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/pascal.js +109 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/pegjs.js +114 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/perl.js +837 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/php.js +234 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/pig.js +178 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/powershell.js +396 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/properties.js +78 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/protobuf.js +68 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/puppet.js +220 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/python.js +340 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/q.js +139 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/r.js +164 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/rpm.js +109 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/rst.js +557 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ruby.js +285 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/rust.js +71 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/sas.js +315 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/sass.js +414 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/scheme.js +249 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/shell.js +139 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/sieve.js +193 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/slim.js +575 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/smalltalk.js +168 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/smarty.js +225 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/solr.js +104 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/soy.js +199 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/sparql.js +180 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/spreadsheet.js +112 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/sql.js +413 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/stex.js +251 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/stylus.js +769 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/swift.js +202 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/tcl.js +139 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/textile.js +469 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/tiddlywiki.js +308 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/tiki.js +312 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/toml.js +88 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/tornado.js +68 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/troff.js +84 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ttcn-cfg.js +214 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ttcn.js +283 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/turtle.js +162 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/twig.js +141 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/vb.js +276 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/vbscript.js +350 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/velocity.js +201 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/verilog.js +537 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/vhdl.js +189 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/vue.js +69 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/webidl.js +195 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/xml.js +394 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/xquery.js +437 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/yacas.js +204 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/yaml-frontmatter.js +68 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/yaml.js +117 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/z80.js +116 -0
- data/vendor/assets/javascripts/locomotive/codemirror.js +8922 -0
- data/vendor/assets/javascripts/locomotive/select2.js +436 -175
- data/vendor/assets/javascripts/locomotive/wysihtml5x-toolbar.js +1346 -564
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/dialog/dialog.css +32 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/display/fullscreen.css +6 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/fold/foldgutter.css +20 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/hint/show-hint.css +37 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/lint/lint.css +73 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/merge/merge.css +113 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/scroll/simplescrollbars.css +66 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/search/matchesonscrollbar.css +8 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/tern/tern.css +87 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/modes/tiddlywiki.css +14 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/modes/tiki.css +26 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/3024-day.css +41 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/3024-night.css +39 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/abcdef.css +32 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/ambiance-mobile.css +5 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/ambiance.css +74 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/base16-dark.css +38 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/base16-light.css +38 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/bespin.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/blackboard.css +32 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/cobalt.css +25 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/colorforth.css +33 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/dracula.css +41 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/eclipse.css +23 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/elegant.css +13 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/erlang-dark.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/hopscotch.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/icecoder.css +43 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/isotope.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/lesser-dark.css +47 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/liquibyte.css +95 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/material.css +53 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/mbo.css +37 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/mdn-like.css +46 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/midnight.css +45 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/monokai.css +36 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/neat.css +12 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/neo.css +43 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/night.css +27 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/paraiso-dark.css +38 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/paraiso-light.css +38 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/pastel-on-dark.css +53 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/railscasts.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/rubyblue.css +25 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/seti.css +44 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/solarized.css +169 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/the-matrix.css +30 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/tomorrow-night-bright.css +35 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/tomorrow-night-eighties.css +38 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/ttcn.css +64 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/twilight.css +32 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/vibrant-ink.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/xq-dark.css +53 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/xq-light.css +43 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/yeti.css +44 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/zenburn.css +37 -0
- data/vendor/assets/stylesheets/locomotive/codemirror.css +347 -0
- data/vendor/assets/stylesheets/locomotive/select2.css +3 -6
- metadata +349 -128
@@ -0,0 +1,173 @@
|
|
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("fcl", function(config) {
|
15
|
+
var indentUnit = config.indentUnit;
|
16
|
+
|
17
|
+
var keywords = {
|
18
|
+
"term": true,
|
19
|
+
"method": true, "accu": true,
|
20
|
+
"rule": true, "then": true, "is": true, "and": true, "or": true,
|
21
|
+
"if": true, "default": true
|
22
|
+
};
|
23
|
+
|
24
|
+
var start_blocks = {
|
25
|
+
"var_input": true,
|
26
|
+
"var_output": true,
|
27
|
+
"fuzzify": true,
|
28
|
+
"defuzzify": true,
|
29
|
+
"function_block": true,
|
30
|
+
"ruleblock": true
|
31
|
+
};
|
32
|
+
|
33
|
+
var end_blocks = {
|
34
|
+
"end_ruleblock": true,
|
35
|
+
"end_defuzzify": true,
|
36
|
+
"end_function_block": true,
|
37
|
+
"end_fuzzify": true,
|
38
|
+
"end_var": true
|
39
|
+
};
|
40
|
+
|
41
|
+
var atoms = {
|
42
|
+
"true": true, "false": true, "nan": true,
|
43
|
+
"real": true, "min": true, "max": true, "cog": true, "cogs": true
|
44
|
+
};
|
45
|
+
|
46
|
+
var isOperatorChar = /[+\-*&^%:=<>!|\/]/;
|
47
|
+
|
48
|
+
function tokenBase(stream, state) {
|
49
|
+
var ch = stream.next();
|
50
|
+
|
51
|
+
if (/[\d\.]/.test(ch)) {
|
52
|
+
if (ch == ".") {
|
53
|
+
stream.match(/^[0-9]+([eE][\-+]?[0-9]+)?/);
|
54
|
+
} else if (ch == "0") {
|
55
|
+
stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/);
|
56
|
+
} else {
|
57
|
+
stream.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/);
|
58
|
+
}
|
59
|
+
return "number";
|
60
|
+
}
|
61
|
+
|
62
|
+
if (ch == "/" || ch == "(") {
|
63
|
+
if (stream.eat("*")) {
|
64
|
+
state.tokenize = tokenComment;
|
65
|
+
return tokenComment(stream, state);
|
66
|
+
}
|
67
|
+
if (stream.eat("/")) {
|
68
|
+
stream.skipToEnd();
|
69
|
+
return "comment";
|
70
|
+
}
|
71
|
+
}
|
72
|
+
if (isOperatorChar.test(ch)) {
|
73
|
+
stream.eatWhile(isOperatorChar);
|
74
|
+
return "operator";
|
75
|
+
}
|
76
|
+
stream.eatWhile(/[\w\$_\xa1-\uffff]/);
|
77
|
+
|
78
|
+
var cur = stream.current().toLowerCase();
|
79
|
+
if (keywords.propertyIsEnumerable(cur) ||
|
80
|
+
start_blocks.propertyIsEnumerable(cur) ||
|
81
|
+
end_blocks.propertyIsEnumerable(cur)) {
|
82
|
+
return "keyword";
|
83
|
+
}
|
84
|
+
if (atoms.propertyIsEnumerable(cur)) return "atom";
|
85
|
+
return "variable";
|
86
|
+
}
|
87
|
+
|
88
|
+
|
89
|
+
function tokenComment(stream, state) {
|
90
|
+
var maybeEnd = false, ch;
|
91
|
+
while (ch = stream.next()) {
|
92
|
+
if ((ch == "/" || ch == ")") && maybeEnd) {
|
93
|
+
state.tokenize = tokenBase;
|
94
|
+
break;
|
95
|
+
}
|
96
|
+
maybeEnd = (ch == "*");
|
97
|
+
}
|
98
|
+
return "comment";
|
99
|
+
}
|
100
|
+
|
101
|
+
function Context(indented, column, type, align, prev) {
|
102
|
+
this.indented = indented;
|
103
|
+
this.column = column;
|
104
|
+
this.type = type;
|
105
|
+
this.align = align;
|
106
|
+
this.prev = prev;
|
107
|
+
}
|
108
|
+
|
109
|
+
function pushContext(state, col, type) {
|
110
|
+
return state.context = new Context(state.indented, col, type, null, state.context);
|
111
|
+
}
|
112
|
+
|
113
|
+
function popContext(state) {
|
114
|
+
if (!state.context.prev) return;
|
115
|
+
var t = state.context.type;
|
116
|
+
if (t == "end_block")
|
117
|
+
state.indented = state.context.indented;
|
118
|
+
return state.context = state.context.prev;
|
119
|
+
}
|
120
|
+
|
121
|
+
// Interface
|
122
|
+
|
123
|
+
return {
|
124
|
+
startState: function(basecolumn) {
|
125
|
+
return {
|
126
|
+
tokenize: null,
|
127
|
+
context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
|
128
|
+
indented: 0,
|
129
|
+
startOfLine: true
|
130
|
+
};
|
131
|
+
},
|
132
|
+
|
133
|
+
token: function(stream, state) {
|
134
|
+
var ctx = state.context;
|
135
|
+
if (stream.sol()) {
|
136
|
+
if (ctx.align == null) ctx.align = false;
|
137
|
+
state.indented = stream.indentation();
|
138
|
+
state.startOfLine = true;
|
139
|
+
}
|
140
|
+
if (stream.eatSpace()) return null;
|
141
|
+
|
142
|
+
var style = (state.tokenize || tokenBase)(stream, state);
|
143
|
+
if (style == "comment") return style;
|
144
|
+
if (ctx.align == null) ctx.align = true;
|
145
|
+
|
146
|
+
var cur = stream.current().toLowerCase();
|
147
|
+
|
148
|
+
if (start_blocks.propertyIsEnumerable(cur)) pushContext(state, stream.column(), "end_block");
|
149
|
+
else if (end_blocks.propertyIsEnumerable(cur)) popContext(state);
|
150
|
+
|
151
|
+
state.startOfLine = false;
|
152
|
+
return style;
|
153
|
+
},
|
154
|
+
|
155
|
+
indent: function(state, textAfter) {
|
156
|
+
if (state.tokenize != tokenBase && state.tokenize != null) return 0;
|
157
|
+
var ctx = state.context;
|
158
|
+
|
159
|
+
var closing = end_blocks.propertyIsEnumerable(textAfter);
|
160
|
+
if (ctx.align) return ctx.column + (closing ? 0 : 1);
|
161
|
+
else return ctx.indented + (closing ? 0 : indentUnit);
|
162
|
+
},
|
163
|
+
|
164
|
+
electricChars: "ryk",
|
165
|
+
fold: "brace",
|
166
|
+
blockCommentStart: "(*",
|
167
|
+
blockCommentEnd: "*)",
|
168
|
+
lineComment: "//"
|
169
|
+
};
|
170
|
+
});
|
171
|
+
|
172
|
+
CodeMirror.defineMIME("text/x-fcl", "fcl");
|
173
|
+
});
|
@@ -0,0 +1,180 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
// Author: Aliaksei Chapyzhenka
|
5
|
+
|
6
|
+
(function(mod) {
|
7
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
8
|
+
mod(require("../../lib/codemirror"));
|
9
|
+
else if (typeof define == "function" && define.amd) // AMD
|
10
|
+
define(["../../lib/codemirror"], mod);
|
11
|
+
else // Plain browser env
|
12
|
+
mod(CodeMirror);
|
13
|
+
})(function(CodeMirror) {
|
14
|
+
"use strict";
|
15
|
+
|
16
|
+
function toWordList(words) {
|
17
|
+
var ret = [];
|
18
|
+
words.split(' ').forEach(function(e){
|
19
|
+
ret.push({name: e});
|
20
|
+
});
|
21
|
+
return ret;
|
22
|
+
}
|
23
|
+
|
24
|
+
var coreWordList = toWordList(
|
25
|
+
'INVERT AND OR XOR\
|
26
|
+
2* 2/ LSHIFT RSHIFT\
|
27
|
+
0= = 0< < > U< MIN MAX\
|
28
|
+
2DROP 2DUP 2OVER 2SWAP ?DUP DEPTH DROP DUP OVER ROT SWAP\
|
29
|
+
>R R> R@\
|
30
|
+
+ - 1+ 1- ABS NEGATE\
|
31
|
+
S>D * M* UM*\
|
32
|
+
FM/MOD SM/REM UM/MOD */ */MOD / /MOD MOD\
|
33
|
+
HERE , @ ! CELL+ CELLS C, C@ C! CHARS 2@ 2!\
|
34
|
+
ALIGN ALIGNED +! ALLOT\
|
35
|
+
CHAR [CHAR] [ ] BL\
|
36
|
+
FIND EXECUTE IMMEDIATE COUNT LITERAL STATE\
|
37
|
+
; DOES> >BODY\
|
38
|
+
EVALUATE\
|
39
|
+
SOURCE >IN\
|
40
|
+
<# # #S #> HOLD SIGN BASE >NUMBER HEX DECIMAL\
|
41
|
+
FILL MOVE\
|
42
|
+
. CR EMIT SPACE SPACES TYPE U. .R U.R\
|
43
|
+
ACCEPT\
|
44
|
+
TRUE FALSE\
|
45
|
+
<> U> 0<> 0>\
|
46
|
+
NIP TUCK ROLL PICK\
|
47
|
+
2>R 2R@ 2R>\
|
48
|
+
WITHIN UNUSED MARKER\
|
49
|
+
I J\
|
50
|
+
TO\
|
51
|
+
COMPILE, [COMPILE]\
|
52
|
+
SAVE-INPUT RESTORE-INPUT\
|
53
|
+
PAD ERASE\
|
54
|
+
2LITERAL DNEGATE\
|
55
|
+
D- D+ D0< D0= D2* D2/ D< D= DMAX DMIN D>S DABS\
|
56
|
+
M+ M*/ D. D.R 2ROT DU<\
|
57
|
+
CATCH THROW\
|
58
|
+
FREE RESIZE ALLOCATE\
|
59
|
+
CS-PICK CS-ROLL\
|
60
|
+
GET-CURRENT SET-CURRENT FORTH-WORDLIST GET-ORDER SET-ORDER\
|
61
|
+
PREVIOUS SEARCH-WORDLIST WORDLIST FIND ALSO ONLY FORTH DEFINITIONS ORDER\
|
62
|
+
-TRAILING /STRING SEARCH COMPARE CMOVE CMOVE> BLANK SLITERAL');
|
63
|
+
|
64
|
+
var immediateWordList = toWordList('IF ELSE THEN BEGIN WHILE REPEAT UNTIL RECURSE [IF] [ELSE] [THEN] ?DO DO LOOP +LOOP UNLOOP LEAVE EXIT AGAIN CASE OF ENDOF ENDCASE');
|
65
|
+
|
66
|
+
CodeMirror.defineMode('forth', function() {
|
67
|
+
function searchWordList (wordList, word) {
|
68
|
+
var i;
|
69
|
+
for (i = wordList.length - 1; i >= 0; i--) {
|
70
|
+
if (wordList[i].name === word.toUpperCase()) {
|
71
|
+
return wordList[i];
|
72
|
+
}
|
73
|
+
}
|
74
|
+
return undefined;
|
75
|
+
}
|
76
|
+
return {
|
77
|
+
startState: function() {
|
78
|
+
return {
|
79
|
+
state: '',
|
80
|
+
base: 10,
|
81
|
+
coreWordList: coreWordList,
|
82
|
+
immediateWordList: immediateWordList,
|
83
|
+
wordList: []
|
84
|
+
};
|
85
|
+
},
|
86
|
+
token: function (stream, stt) {
|
87
|
+
var mat;
|
88
|
+
if (stream.eatSpace()) {
|
89
|
+
return null;
|
90
|
+
}
|
91
|
+
if (stt.state === '') { // interpretation
|
92
|
+
if (stream.match(/^(\]|:NONAME)(\s|$)/i)) {
|
93
|
+
stt.state = ' compilation';
|
94
|
+
return 'builtin compilation';
|
95
|
+
}
|
96
|
+
mat = stream.match(/^(\:)\s+(\S+)(\s|$)+/);
|
97
|
+
if (mat) {
|
98
|
+
stt.wordList.push({name: mat[2].toUpperCase()});
|
99
|
+
stt.state = ' compilation';
|
100
|
+
return 'def' + stt.state;
|
101
|
+
}
|
102
|
+
mat = stream.match(/^(VARIABLE|2VARIABLE|CONSTANT|2CONSTANT|CREATE|POSTPONE|VALUE|WORD)\s+(\S+)(\s|$)+/i);
|
103
|
+
if (mat) {
|
104
|
+
stt.wordList.push({name: mat[2].toUpperCase()});
|
105
|
+
return 'def' + stt.state;
|
106
|
+
}
|
107
|
+
mat = stream.match(/^(\'|\[\'\])\s+(\S+)(\s|$)+/);
|
108
|
+
if (mat) {
|
109
|
+
return 'builtin' + stt.state;
|
110
|
+
}
|
111
|
+
} else { // compilation
|
112
|
+
// ; [
|
113
|
+
if (stream.match(/^(\;|\[)(\s)/)) {
|
114
|
+
stt.state = '';
|
115
|
+
stream.backUp(1);
|
116
|
+
return 'builtin compilation';
|
117
|
+
}
|
118
|
+
if (stream.match(/^(\;|\[)($)/)) {
|
119
|
+
stt.state = '';
|
120
|
+
return 'builtin compilation';
|
121
|
+
}
|
122
|
+
if (stream.match(/^(POSTPONE)\s+\S+(\s|$)+/)) {
|
123
|
+
return 'builtin';
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
// dynamic wordlist
|
128
|
+
mat = stream.match(/^(\S+)(\s+|$)/);
|
129
|
+
if (mat) {
|
130
|
+
if (searchWordList(stt.wordList, mat[1]) !== undefined) {
|
131
|
+
return 'variable' + stt.state;
|
132
|
+
}
|
133
|
+
|
134
|
+
// comments
|
135
|
+
if (mat[1] === '\\') {
|
136
|
+
stream.skipToEnd();
|
137
|
+
return 'comment' + stt.state;
|
138
|
+
}
|
139
|
+
|
140
|
+
// core words
|
141
|
+
if (searchWordList(stt.coreWordList, mat[1]) !== undefined) {
|
142
|
+
return 'builtin' + stt.state;
|
143
|
+
}
|
144
|
+
if (searchWordList(stt.immediateWordList, mat[1]) !== undefined) {
|
145
|
+
return 'keyword' + stt.state;
|
146
|
+
}
|
147
|
+
|
148
|
+
if (mat[1] === '(') {
|
149
|
+
stream.eatWhile(function (s) { return s !== ')'; });
|
150
|
+
stream.eat(')');
|
151
|
+
return 'comment' + stt.state;
|
152
|
+
}
|
153
|
+
|
154
|
+
// // strings
|
155
|
+
if (mat[1] === '.(') {
|
156
|
+
stream.eatWhile(function (s) { return s !== ')'; });
|
157
|
+
stream.eat(')');
|
158
|
+
return 'string' + stt.state;
|
159
|
+
}
|
160
|
+
if (mat[1] === 'S"' || mat[1] === '."' || mat[1] === 'C"') {
|
161
|
+
stream.eatWhile(function (s) { return s !== '"'; });
|
162
|
+
stream.eat('"');
|
163
|
+
return 'string' + stt.state;
|
164
|
+
}
|
165
|
+
|
166
|
+
// numbers
|
167
|
+
if (mat[1] - 0xfffffffff) {
|
168
|
+
return 'number' + stt.state;
|
169
|
+
}
|
170
|
+
// if (mat[1].match(/^[-+]?[0-9]+\.[0-9]*/)) {
|
171
|
+
// return 'number' + stt.state;
|
172
|
+
// }
|
173
|
+
|
174
|
+
return 'atom' + stt.state;
|
175
|
+
}
|
176
|
+
}
|
177
|
+
};
|
178
|
+
});
|
179
|
+
CodeMirror.defineMIME("text/x-forth", "forth");
|
180
|
+
});
|
@@ -0,0 +1,188 @@
|
|
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("fortran", function() {
|
15
|
+
function words(array) {
|
16
|
+
var keys = {};
|
17
|
+
for (var i = 0; i < array.length; ++i) {
|
18
|
+
keys[array[i]] = true;
|
19
|
+
}
|
20
|
+
return keys;
|
21
|
+
}
|
22
|
+
|
23
|
+
var keywords = words([
|
24
|
+
"abstract", "accept", "allocatable", "allocate",
|
25
|
+
"array", "assign", "asynchronous", "backspace",
|
26
|
+
"bind", "block", "byte", "call", "case",
|
27
|
+
"class", "close", "common", "contains",
|
28
|
+
"continue", "cycle", "data", "deallocate",
|
29
|
+
"decode", "deferred", "dimension", "do",
|
30
|
+
"elemental", "else", "encode", "end",
|
31
|
+
"endif", "entry", "enumerator", "equivalence",
|
32
|
+
"exit", "external", "extrinsic", "final",
|
33
|
+
"forall", "format", "function", "generic",
|
34
|
+
"go", "goto", "if", "implicit", "import", "include",
|
35
|
+
"inquire", "intent", "interface", "intrinsic",
|
36
|
+
"module", "namelist", "non_intrinsic",
|
37
|
+
"non_overridable", "none", "nopass",
|
38
|
+
"nullify", "open", "optional", "options",
|
39
|
+
"parameter", "pass", "pause", "pointer",
|
40
|
+
"print", "private", "program", "protected",
|
41
|
+
"public", "pure", "read", "recursive", "result",
|
42
|
+
"return", "rewind", "save", "select", "sequence",
|
43
|
+
"stop", "subroutine", "target", "then", "to", "type",
|
44
|
+
"use", "value", "volatile", "where", "while",
|
45
|
+
"write"]);
|
46
|
+
var builtins = words(["abort", "abs", "access", "achar", "acos",
|
47
|
+
"adjustl", "adjustr", "aimag", "aint", "alarm",
|
48
|
+
"all", "allocated", "alog", "amax", "amin",
|
49
|
+
"amod", "and", "anint", "any", "asin",
|
50
|
+
"associated", "atan", "besj", "besjn", "besy",
|
51
|
+
"besyn", "bit_size", "btest", "cabs", "ccos",
|
52
|
+
"ceiling", "cexp", "char", "chdir", "chmod",
|
53
|
+
"clog", "cmplx", "command_argument_count",
|
54
|
+
"complex", "conjg", "cos", "cosh", "count",
|
55
|
+
"cpu_time", "cshift", "csin", "csqrt", "ctime",
|
56
|
+
"c_funloc", "c_loc", "c_associated", "c_null_ptr",
|
57
|
+
"c_null_funptr", "c_f_pointer", "c_null_char",
|
58
|
+
"c_alert", "c_backspace", "c_form_feed",
|
59
|
+
"c_new_line", "c_carriage_return",
|
60
|
+
"c_horizontal_tab", "c_vertical_tab", "dabs",
|
61
|
+
"dacos", "dasin", "datan", "date_and_time",
|
62
|
+
"dbesj", "dbesj", "dbesjn", "dbesy", "dbesy",
|
63
|
+
"dbesyn", "dble", "dcos", "dcosh", "ddim", "derf",
|
64
|
+
"derfc", "dexp", "digits", "dim", "dint", "dlog",
|
65
|
+
"dlog", "dmax", "dmin", "dmod", "dnint",
|
66
|
+
"dot_product", "dprod", "dsign", "dsinh",
|
67
|
+
"dsin", "dsqrt", "dtanh", "dtan", "dtime",
|
68
|
+
"eoshift", "epsilon", "erf", "erfc", "etime",
|
69
|
+
"exit", "exp", "exponent", "extends_type_of",
|
70
|
+
"fdate", "fget", "fgetc", "float", "floor",
|
71
|
+
"flush", "fnum", "fputc", "fput", "fraction",
|
72
|
+
"fseek", "fstat", "ftell", "gerror", "getarg",
|
73
|
+
"get_command", "get_command_argument",
|
74
|
+
"get_environment_variable", "getcwd",
|
75
|
+
"getenv", "getgid", "getlog", "getpid",
|
76
|
+
"getuid", "gmtime", "hostnm", "huge", "iabs",
|
77
|
+
"iachar", "iand", "iargc", "ibclr", "ibits",
|
78
|
+
"ibset", "ichar", "idate", "idim", "idint",
|
79
|
+
"idnint", "ieor", "ierrno", "ifix", "imag",
|
80
|
+
"imagpart", "index", "int", "ior", "irand",
|
81
|
+
"isatty", "ishft", "ishftc", "isign",
|
82
|
+
"iso_c_binding", "is_iostat_end", "is_iostat_eor",
|
83
|
+
"itime", "kill", "kind", "lbound", "len", "len_trim",
|
84
|
+
"lge", "lgt", "link", "lle", "llt", "lnblnk", "loc",
|
85
|
+
"log", "logical", "long", "lshift", "lstat", "ltime",
|
86
|
+
"matmul", "max", "maxexponent", "maxloc", "maxval",
|
87
|
+
"mclock", "merge", "move_alloc", "min", "minexponent",
|
88
|
+
"minloc", "minval", "mod", "modulo", "mvbits",
|
89
|
+
"nearest", "new_line", "nint", "not", "or", "pack",
|
90
|
+
"perror", "precision", "present", "product", "radix",
|
91
|
+
"rand", "random_number", "random_seed", "range",
|
92
|
+
"real", "realpart", "rename", "repeat", "reshape",
|
93
|
+
"rrspacing", "rshift", "same_type_as", "scale",
|
94
|
+
"scan", "second", "selected_int_kind",
|
95
|
+
"selected_real_kind", "set_exponent", "shape",
|
96
|
+
"short", "sign", "signal", "sinh", "sin", "sleep",
|
97
|
+
"sngl", "spacing", "spread", "sqrt", "srand", "stat",
|
98
|
+
"sum", "symlnk", "system", "system_clock", "tan",
|
99
|
+
"tanh", "time", "tiny", "transfer", "transpose",
|
100
|
+
"trim", "ttynam", "ubound", "umask", "unlink",
|
101
|
+
"unpack", "verify", "xor", "zabs", "zcos", "zexp",
|
102
|
+
"zlog", "zsin", "zsqrt"]);
|
103
|
+
|
104
|
+
var dataTypes = words(["c_bool", "c_char", "c_double", "c_double_complex",
|
105
|
+
"c_float", "c_float_complex", "c_funptr", "c_int",
|
106
|
+
"c_int16_t", "c_int32_t", "c_int64_t", "c_int8_t",
|
107
|
+
"c_int_fast16_t", "c_int_fast32_t", "c_int_fast64_t",
|
108
|
+
"c_int_fast8_t", "c_int_least16_t", "c_int_least32_t",
|
109
|
+
"c_int_least64_t", "c_int_least8_t", "c_intmax_t",
|
110
|
+
"c_intptr_t", "c_long", "c_long_double",
|
111
|
+
"c_long_double_complex", "c_long_long", "c_ptr",
|
112
|
+
"c_short", "c_signed_char", "c_size_t", "character",
|
113
|
+
"complex", "double", "integer", "logical", "real"]);
|
114
|
+
var isOperatorChar = /[+\-*&=<>\/\:]/;
|
115
|
+
var litOperator = new RegExp("(\.and\.|\.or\.|\.eq\.|\.lt\.|\.le\.|\.gt\.|\.ge\.|\.ne\.|\.not\.|\.eqv\.|\.neqv\.)", "i");
|
116
|
+
|
117
|
+
function tokenBase(stream, state) {
|
118
|
+
|
119
|
+
if (stream.match(litOperator)){
|
120
|
+
return 'operator';
|
121
|
+
}
|
122
|
+
|
123
|
+
var ch = stream.next();
|
124
|
+
if (ch == "!") {
|
125
|
+
stream.skipToEnd();
|
126
|
+
return "comment";
|
127
|
+
}
|
128
|
+
if (ch == '"' || ch == "'") {
|
129
|
+
state.tokenize = tokenString(ch);
|
130
|
+
return state.tokenize(stream, state);
|
131
|
+
}
|
132
|
+
if (/[\[\]\(\),]/.test(ch)) {
|
133
|
+
return null;
|
134
|
+
}
|
135
|
+
if (/\d/.test(ch)) {
|
136
|
+
stream.eatWhile(/[\w\.]/);
|
137
|
+
return "number";
|
138
|
+
}
|
139
|
+
if (isOperatorChar.test(ch)) {
|
140
|
+
stream.eatWhile(isOperatorChar);
|
141
|
+
return "operator";
|
142
|
+
}
|
143
|
+
stream.eatWhile(/[\w\$_]/);
|
144
|
+
var word = stream.current().toLowerCase();
|
145
|
+
|
146
|
+
if (keywords.hasOwnProperty(word)){
|
147
|
+
return 'keyword';
|
148
|
+
}
|
149
|
+
if (builtins.hasOwnProperty(word) || dataTypes.hasOwnProperty(word)) {
|
150
|
+
return 'builtin';
|
151
|
+
}
|
152
|
+
return "variable";
|
153
|
+
}
|
154
|
+
|
155
|
+
function tokenString(quote) {
|
156
|
+
return function(stream, state) {
|
157
|
+
var escaped = false, next, end = false;
|
158
|
+
while ((next = stream.next()) != null) {
|
159
|
+
if (next == quote && !escaped) {
|
160
|
+
end = true;
|
161
|
+
break;
|
162
|
+
}
|
163
|
+
escaped = !escaped && next == "\\";
|
164
|
+
}
|
165
|
+
if (end || !escaped) state.tokenize = null;
|
166
|
+
return "string";
|
167
|
+
};
|
168
|
+
}
|
169
|
+
|
170
|
+
// Interface
|
171
|
+
|
172
|
+
return {
|
173
|
+
startState: function() {
|
174
|
+
return {tokenize: null};
|
175
|
+
},
|
176
|
+
|
177
|
+
token: function(stream, state) {
|
178
|
+
if (stream.eatSpace()) return null;
|
179
|
+
var style = (state.tokenize || tokenBase)(stream, state);
|
180
|
+
if (style == "comment" || style == "meta") return style;
|
181
|
+
return style;
|
182
|
+
}
|
183
|
+
};
|
184
|
+
});
|
185
|
+
|
186
|
+
CodeMirror.defineMIME("text/x-fortran", "fortran");
|
187
|
+
|
188
|
+
});
|