ace-rails-ap 4.2 → 4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ace/rails/version.rb +1 -1
- data/update.sh +1 -1
- data/vendor/assets/javascripts/ace/ace.js +661 -160
- data/vendor/assets/javascripts/ace/ext-beautify.js +1 -0
- data/vendor/assets/javascripts/ace/ext-emmet.js +314 -218
- data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +37 -32
- data/vendor/assets/javascripts/ace/ext-language_tools.js +362 -225
- data/vendor/assets/javascripts/ace/ext-linking.js +1 -1
- data/vendor/assets/javascripts/ace/ext-modelist.js +6 -2
- data/vendor/assets/javascripts/ace/ext-options.js +45 -34
- data/vendor/assets/javascripts/ace/ext-prompt.js +2764 -0
- data/vendor/assets/javascripts/ace/ext-rtl.js +1 -3
- data/vendor/assets/javascripts/ace/ext-settings_menu.js +49 -38
- data/vendor/assets/javascripts/ace/ext-statusbar.js +2 -2
- data/vendor/assets/javascripts/ace/ext-whitespace.js +4 -0
- data/vendor/assets/javascripts/ace/keybinding-emacs.js +1 -0
- data/vendor/assets/javascripts/ace/keybinding-vim.js +296 -66
- data/vendor/assets/javascripts/ace/mode-aql.js +102 -0
- data/vendor/assets/javascripts/ace/mode-autohotkey.js +3 -1
- data/vendor/assets/javascripts/ace/mode-cirru.js +2 -2
- data/vendor/assets/javascripts/ace/mode-crystal.js +642 -0
- data/vendor/assets/javascripts/ace/mode-csound_document.js +42 -29
- data/vendor/assets/javascripts/ace/mode-csound_orchestra.js +35 -25
- data/vendor/assets/javascripts/ace/mode-csound_score.js +29 -21
- data/vendor/assets/javascripts/ace/mode-fsharp.js +2 -2
- data/vendor/assets/javascripts/ace/mode-gherkin.js +0 -2
- data/vendor/assets/javascripts/ace/mode-gobstones.js +252 -94
- data/vendor/assets/javascripts/ace/mode-io.js +1 -7
- data/vendor/assets/javascripts/ace/mode-jade.js +1 -1
- data/vendor/assets/javascripts/ace/mode-lua.js +30 -10
- data/vendor/assets/javascripts/ace/mode-luapage.js +30 -10
- data/vendor/assets/javascripts/ace/mode-lucene.js +77 -9
- data/vendor/assets/javascripts/ace/mode-markdown.js +2 -1
- data/vendor/assets/javascripts/ace/mode-mask.js +1 -1
- data/vendor/assets/javascripts/ace/mode-nginx.js +298 -0
- data/vendor/assets/javascripts/ace/mode-nim.js +363 -0
- data/vendor/assets/javascripts/ace/mode-pascal.js +84 -66
- data/vendor/assets/javascripts/ace/mode-php.js +1 -1
- data/vendor/assets/javascripts/ace/mode-php_laravel_blade.js +1 -1
- data/vendor/assets/javascripts/ace/mode-puppet.js +3 -3
- data/vendor/assets/javascripts/ace/mode-slim.js +2 -1
- data/vendor/assets/javascripts/ace/mode-tcl.js +3 -0
- data/vendor/assets/javascripts/ace/mode-terraform.js +4 -4
- data/vendor/assets/javascripts/ace/mode-yaml.js +44 -13
- data/vendor/assets/javascripts/ace/mode-zeek.js +539 -0
- data/vendor/assets/javascripts/ace/snippets/abap.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/abc.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/actionscript.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/ada.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/apache_conf.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/apex.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/applescript.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/aql.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/asciidoc.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/asl.js +13 -0
- data/vendor/assets/javascripts/ace/snippets/assembly_x86.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/autohotkey.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/batchfile.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/bro.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/c9search.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/c_cpp.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/cirru.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/clojure.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/cobol.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/coffee.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/coldfusion.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/crystal.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/csharp.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/csound_document.js +24 -0
- data/vendor/assets/javascripts/ace/snippets/csound_orchestra.js +61 -0
- data/vendor/assets/javascripts/ace/snippets/csound_score.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/csp.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/css.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/curly.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/d.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/dart.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/diff.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/django.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/dockerfile.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/dot.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/drools.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/edifact.js +254 -0
- data/vendor/assets/javascripts/ace/snippets/eiffel.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/ejs.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/elixir.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/elm.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/erlang.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/forth.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/fortran.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/fsharp.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/fsl.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/ftl.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/gcode.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/gherkin.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/gitignore.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/glsl.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/gobstones.js +1701 -24
- data/vendor/assets/javascripts/ace/snippets/golang.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/graphqlschema.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/groovy.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/haml.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/handlebars.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/haskell.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/haskell_cabal.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/haxe.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/hjson.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/html.js +36 -2
- data/vendor/assets/javascripts/ace/snippets/html_elixir.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/html_ruby.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/ini.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/io.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/jack.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/jade.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/java.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/javascript.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/json.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/jsoniq.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/jsp.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/jssm.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/jsx.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/julia.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/kotlin.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/latex.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/less.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/liquid.js +890 -2
- data/vendor/assets/javascripts/ace/snippets/lisp.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/livescript.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/logiql.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/logtalk.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/lsl.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/lua.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/luapage.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/lucene.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/makefile.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/markdown.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/mask.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/matlab.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/maze.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/mel.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/mixal.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/mushcode.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/mysql.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/nginx.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/nim.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/nix.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/nsis.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/objectivec.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/ocaml.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/pascal.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/perl.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/perl6.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/pgsql.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/php.js +49 -36
- data/vendor/assets/javascripts/ace/snippets/php_laravel_blade.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/pig.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/plain_text.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/powershell.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/praat.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/prolog.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/properties.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/protobuf.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/puppet.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/python.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/r.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/razor.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/rdoc.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/red.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/redshift.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/rhtml.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/rst.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/ruby.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/rust.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/sass.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/scad.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/scala.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/scheme.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/scss.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/sh.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/sjs.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/slim.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/smarty.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/snippets.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/soy_template.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/space.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/sparql.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/sql.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/sqlserver.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/stylus.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/svg.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/swift.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/tcl.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/terraform.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/tex.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/text.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/textile.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/toml.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/tsx.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/turtle.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/twig.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/typescript.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/vala.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/vbscript.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/velocity.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/verilog.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/vhdl.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/visualforce.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/wollok.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/xml.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/xquery.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/yaml.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/zeek.js +14 -0
- data/vendor/assets/javascripts/ace/worker-coffee.js +2 -2
- data/vendor/assets/javascripts/ace/worker-css.js +9 -3
- data/vendor/assets/javascripts/ace/worker-html.js +2 -2
- data/vendor/assets/javascripts/ace/worker-javascript.js +2 -2
- data/vendor/assets/javascripts/ace/worker-json.js +2 -2
- data/vendor/assets/javascripts/ace/worker-lua.js +2 -2
- data/vendor/assets/javascripts/ace/worker-php.js +4 -4
- data/vendor/assets/javascripts/ace/worker-xml.js +2 -2
- data/vendor/assets/javascripts/ace/worker-xquery.js +2 -2
- metadata +34 -16
- data/vendor/assets/javascripts/ace/ext-chromevox.js +0 -540
- data/vendor/assets/javascripts/ace/ext-old_ie.js +0 -502
- data/vendor/assets/javascripts/ace/mode-bash.js +0 -247
- data/vendor/assets/javascripts/ace/mode-lean.js +0 -281
- data/vendor/assets/javascripts/ace/mode-live_script.js +0 -481
- data/vendor/assets/javascripts/ace/mode-mips_assembler.js +0 -235
- data/vendor/assets/javascripts/ace/mode-mipsassembler.js +0 -196
- data/vendor/assets/javascripts/ace/mode-swig.js +0 -1099
- data/vendor/assets/javascripts/ace/snippets/lean.js +0 -7
- data/vendor/assets/javascripts/ace/snippets/live_script.js +0 -7
- data/vendor/assets/javascripts/ace/snippets/mips_assembler.js +0 -7
- data/vendor/assets/javascripts/ace/snippets/mipsassembler.js +0 -7
- data/vendor/assets/javascripts/ace/snippets/swig.js +0 -7
@@ -1,235 +0,0 @@
|
|
1
|
-
define("ace/mode/mips_assembler_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
2
|
-
"use strict";
|
3
|
-
|
4
|
-
var oop = require("../lib/oop");
|
5
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
6
|
-
|
7
|
-
var MIPSAssemblerHighlightRules = function() {
|
8
|
-
|
9
|
-
this.$rules = { start:
|
10
|
-
[ { token: 'support.function.pseudo.mips',
|
11
|
-
regex: '\\b(?:mul|abs|div|divu|mulo|mulou|neg|negu|not|rem|remu|rol|ror|li|seq|sge|sgeu|sgt|sgtu|sle|sleu|sne|b|beqz|bge|bgeu|bgt|bgtu|ble|bleu|blt|bltu|bnez|la|ld|ulh|ulhu|ulw|sd|ush|usw|move|mfc1\\.d|l\\.d|l\\.s|s\\.d|s\\.s)\\b',
|
12
|
-
comment: 'ok actually this are instructions, but one also could call them funtions…' },
|
13
|
-
{ token: 'support.function.mips',
|
14
|
-
regex: '\\b(?:abs\\.d|abs\\.s|add|add\\.d|add\\.s|addi|addiu|addu|and|andi|bc1f|bc1t|beq|bgez|bgezal|bgtz|blez|bltz|bltzal|bne|break|c\\.eq\\.d|c\\.eq\\.s|c\\.le\\.d|c\\.le\\.s|c\\.lt\\.d|c\\.lt\\.s|ceil\\.w\\.d|ceil\\.w\\.s|clo|clz|cvt\\.d\\.s|cvt\\.d\\.w|cvt\\.s\\.d|cvt\\.s\\.w|cvt\\.w\\.d|cvt\\.w\\.s|div|div\\.d|div\\.s|divu|eret|floor\\.w\\.d|floor\\.w\\.s|j|jal|jalr|jr|lb|lbu|lh|lhu|ll|lui|lw|lwc1|lwl|lwr|madd|maddu|mfc0|mfc1|mfhi|mflo|mov\\.d|mov\\.s|movf|movf\\.d|movf\\.s|movn|movn\\.d|movn\\.s|movt|movt\\.d|movt\\.s|movz|movz\\.d|movz\\.s|msub|mtc0|mtc1|mthi|mtlo|mul|mul\\.d|mul\\.s|mult|multu|neg\\.d|neg\\.s|nop|nor|or|ori|round\\.w\\.d|round\\.w\\.s|sb|sc|sdc1|sh|sll|sllv|slt|slti|sltiu|sltu|sqrt\\.d|sqrt\\.s|sra|srav|srl|srlv|sub|sub\\.d|sub\\.s|subu|sw|swc1|swl|swr|syscall|teq|teqi|tge|tgei|tgeiu|tgeu|tlt|tlti|tltiu|tltu|trunc\\.w\\.d|trunc\\.w\\.s|xor|xori)\\b' },
|
15
|
-
{ token: 'storage.type.mips',
|
16
|
-
regex: '\\.(?:ascii|asciiz|byte|data|double|float|half|kdata|ktext|space|text|word|set\\s*(?:noat|at))\\b' },
|
17
|
-
{ token: 'storage.modifier.mips',
|
18
|
-
regex: '\\.(?:align|extern||globl)\\b' },
|
19
|
-
{ token:
|
20
|
-
[ 'entity.name.function.label.mips',
|
21
|
-
'meta.function.label.mips' ],
|
22
|
-
regex: '\\b([A-Za-z0-9_]+)(:)' },
|
23
|
-
{ token:
|
24
|
-
[ 'punctuation.definition.variable.mips',
|
25
|
-
'variable.other.register.usable.by-number.mips' ],
|
26
|
-
regex: '(\\$)(0|[2-9]|1[0-9]|2[0-5]|2[89]|3[0-1])\\b' },
|
27
|
-
{ token:
|
28
|
-
[ 'punctuation.definition.variable.mips',
|
29
|
-
'variable.other.register.usable.by-name.mips' ],
|
30
|
-
regex: '(\\$)(zero|v[01]|a[0-3]|t[0-9]|s[0-7]|gp|sp|fp|ra)\\b' },
|
31
|
-
{ token:
|
32
|
-
[ 'punctuation.definition.variable.mips',
|
33
|
-
'variable.other.register.reserved.mips' ],
|
34
|
-
regex: '(\\$)(at|k[01]|1|2[67])\\b' },
|
35
|
-
{ token:
|
36
|
-
[ 'punctuation.definition.variable.mips',
|
37
|
-
'variable.other.register.usable.floating-point.mips',
|
38
|
-
'variable.other.register.usable.floating-point.mips' ],
|
39
|
-
regex: '(\\$)(f)([0-9]|1[0-9]|2[0-9]|3[0-1])\\b' },
|
40
|
-
{ token: 'constant.numeric.float.mips',
|
41
|
-
regex: '\\b\\d+\\.\\d+\\b' },
|
42
|
-
{ token: 'constant.numeric.integer.mips',
|
43
|
-
regex: '\\b(?:\\d+|0(?:x|X)[a-fA-F0-9]+)\\b' },
|
44
|
-
{ token: 'punctuation.definition.string.begin.mips',
|
45
|
-
regex: '"',
|
46
|
-
push:
|
47
|
-
[ { token: 'punctuation.definition.string.end.mips',
|
48
|
-
regex: '"',
|
49
|
-
next: 'pop' },
|
50
|
-
{ token: 'constant.character.escape.mips',
|
51
|
-
regex: '\\\\[rnt\\\\"]' },
|
52
|
-
{ defaultToken: 'string.quoted.double.mips' } ] },
|
53
|
-
{ token: 'punctuation.definition.comment.mips',
|
54
|
-
regex: '#',
|
55
|
-
push:
|
56
|
-
[ { token: 'comment.line.number-sign.mips',
|
57
|
-
regex: '$',
|
58
|
-
next: 'pop' },
|
59
|
-
{ defaultToken: 'comment.line.number-sign.mips' } ] } ] }
|
60
|
-
|
61
|
-
this.normalizeRules();
|
62
|
-
};
|
63
|
-
|
64
|
-
MIPSAssemblerHighlightRules.metaData = { fileTypes: [ 's', 'mips', 'spim', 'asm' ],
|
65
|
-
keyEquivalent: '^~M',
|
66
|
-
name: 'MIPS Assembler',
|
67
|
-
scopeName: 'source.mips' }
|
68
|
-
|
69
|
-
|
70
|
-
oop.inherits(MIPSAssemblerHighlightRules, TextHighlightRules);
|
71
|
-
|
72
|
-
exports.MIPSAssemblerHighlightRules = MIPSAssemblerHighlightRules;
|
73
|
-
});
|
74
|
-
|
75
|
-
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
76
|
-
"use strict";
|
77
|
-
|
78
|
-
var oop = require("../../lib/oop");
|
79
|
-
var Range = require("../../range").Range;
|
80
|
-
var BaseFoldMode = require("./fold_mode").FoldMode;
|
81
|
-
|
82
|
-
var FoldMode = exports.FoldMode = function(commentRegex) {
|
83
|
-
if (commentRegex) {
|
84
|
-
this.foldingStartMarker = new RegExp(
|
85
|
-
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
86
|
-
);
|
87
|
-
this.foldingStopMarker = new RegExp(
|
88
|
-
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
89
|
-
);
|
90
|
-
}
|
91
|
-
};
|
92
|
-
oop.inherits(FoldMode, BaseFoldMode);
|
93
|
-
|
94
|
-
(function() {
|
95
|
-
|
96
|
-
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
97
|
-
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
98
|
-
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
99
|
-
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
100
|
-
this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/;
|
101
|
-
this._getFoldWidgetBase = this.getFoldWidget;
|
102
|
-
this.getFoldWidget = function(session, foldStyle, row) {
|
103
|
-
var line = session.getLine(row);
|
104
|
-
|
105
|
-
if (this.singleLineBlockCommentRe.test(line)) {
|
106
|
-
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
107
|
-
return "";
|
108
|
-
}
|
109
|
-
|
110
|
-
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
111
|
-
|
112
|
-
if (!fw && this.startRegionRe.test(line))
|
113
|
-
return "start"; // lineCommentRegionStart
|
114
|
-
|
115
|
-
return fw;
|
116
|
-
};
|
117
|
-
|
118
|
-
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
119
|
-
var line = session.getLine(row);
|
120
|
-
|
121
|
-
if (this.startRegionRe.test(line))
|
122
|
-
return this.getCommentRegionBlock(session, line, row);
|
123
|
-
|
124
|
-
var match = line.match(this.foldingStartMarker);
|
125
|
-
if (match) {
|
126
|
-
var i = match.index;
|
127
|
-
|
128
|
-
if (match[1])
|
129
|
-
return this.openingBracketBlock(session, match[1], row, i);
|
130
|
-
|
131
|
-
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
132
|
-
|
133
|
-
if (range && !range.isMultiLine()) {
|
134
|
-
if (forceMultiline) {
|
135
|
-
range = this.getSectionRange(session, row);
|
136
|
-
} else if (foldStyle != "all")
|
137
|
-
range = null;
|
138
|
-
}
|
139
|
-
|
140
|
-
return range;
|
141
|
-
}
|
142
|
-
|
143
|
-
if (foldStyle === "markbegin")
|
144
|
-
return;
|
145
|
-
|
146
|
-
var match = line.match(this.foldingStopMarker);
|
147
|
-
if (match) {
|
148
|
-
var i = match.index + match[0].length;
|
149
|
-
|
150
|
-
if (match[1])
|
151
|
-
return this.closingBracketBlock(session, match[1], row, i);
|
152
|
-
|
153
|
-
return session.getCommentFoldRange(row, i, -1);
|
154
|
-
}
|
155
|
-
};
|
156
|
-
|
157
|
-
this.getSectionRange = function(session, row) {
|
158
|
-
var line = session.getLine(row);
|
159
|
-
var startIndent = line.search(/\S/);
|
160
|
-
var startRow = row;
|
161
|
-
var startColumn = line.length;
|
162
|
-
row = row + 1;
|
163
|
-
var endRow = row;
|
164
|
-
var maxRow = session.getLength();
|
165
|
-
while (++row < maxRow) {
|
166
|
-
line = session.getLine(row);
|
167
|
-
var indent = line.search(/\S/);
|
168
|
-
if (indent === -1)
|
169
|
-
continue;
|
170
|
-
if (startIndent > indent)
|
171
|
-
break;
|
172
|
-
var subRange = this.getFoldWidgetRange(session, "all", row);
|
173
|
-
|
174
|
-
if (subRange) {
|
175
|
-
if (subRange.start.row <= startRow) {
|
176
|
-
break;
|
177
|
-
} else if (subRange.isMultiLine()) {
|
178
|
-
row = subRange.end.row;
|
179
|
-
} else if (startIndent == indent) {
|
180
|
-
break;
|
181
|
-
}
|
182
|
-
}
|
183
|
-
endRow = row;
|
184
|
-
}
|
185
|
-
|
186
|
-
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
187
|
-
};
|
188
|
-
|
189
|
-
this.getCommentRegionBlock = function(session, line, row) {
|
190
|
-
var startColumn = line.search(/\s*$/);
|
191
|
-
var maxRow = session.getLength();
|
192
|
-
var startRow = row;
|
193
|
-
|
194
|
-
var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/;
|
195
|
-
var depth = 1;
|
196
|
-
while (++row < maxRow) {
|
197
|
-
line = session.getLine(row);
|
198
|
-
var m = re.exec(line);
|
199
|
-
if (!m) continue;
|
200
|
-
if (m[1]) depth--;
|
201
|
-
else depth++;
|
202
|
-
|
203
|
-
if (!depth) break;
|
204
|
-
}
|
205
|
-
|
206
|
-
var endRow = row;
|
207
|
-
if (endRow > startRow) {
|
208
|
-
return new Range(startRow, startColumn, endRow, line.length);
|
209
|
-
}
|
210
|
-
};
|
211
|
-
|
212
|
-
}).call(FoldMode.prototype);
|
213
|
-
|
214
|
-
});
|
215
|
-
|
216
|
-
define("ace/mode/mips_assembler",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mips_assembler_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
|
217
|
-
"use strict";
|
218
|
-
|
219
|
-
var oop = require("../lib/oop");
|
220
|
-
var TextMode = require("./text").Mode;
|
221
|
-
var MIPSAssemblerHighlightRules = require("./mips_assembler_highlight_rules").MIPSAssemblerHighlightRules;
|
222
|
-
var FoldMode = require("./folding/cstyle").FoldMode;
|
223
|
-
|
224
|
-
var Mode = function() {
|
225
|
-
this.HighlightRules = MIPSAssemblerHighlightRules;
|
226
|
-
this.foldingRules = new FoldMode();
|
227
|
-
};
|
228
|
-
oop.inherits(Mode, TextMode);
|
229
|
-
|
230
|
-
(function() {
|
231
|
-
this.$id = "ace/mode/mips_assembler"
|
232
|
-
}).call(Mode.prototype);
|
233
|
-
|
234
|
-
exports.Mode = Mode;
|
235
|
-
});
|
@@ -1,196 +0,0 @@
|
|
1
|
-
define("ace/mode/mipsassembler_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
2
|
-
"use strict";
|
3
|
-
|
4
|
-
var oop = require("../lib/oop");
|
5
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
6
|
-
|
7
|
-
var mipsassemblerHighlightRules = function() {
|
8
|
-
|
9
|
-
this.$rules = {
|
10
|
-
start: [{
|
11
|
-
token: "string.start",
|
12
|
-
regex: '"',
|
13
|
-
next: "qstring"
|
14
|
-
}],
|
15
|
-
qstring: [{
|
16
|
-
token: "escape",
|
17
|
-
regex: /\\./,
|
18
|
-
}, {
|
19
|
-
token: "string.end",
|
20
|
-
regex: '"',
|
21
|
-
next: "start"
|
22
|
-
}],
|
23
|
-
}
|
24
|
-
|
25
|
-
this.normalizeRules();
|
26
|
-
};
|
27
|
-
|
28
|
-
mipsassemblerHighlightRules.metaData =
|
29
|
-
|
30
|
-
|
31
|
-
oop.inherits(mipsassemblerHighlightRules, TextHighlightRules);
|
32
|
-
|
33
|
-
exports.mipsassemblerHighlightRules = mipsassemblerHighlightRules;
|
34
|
-
});
|
35
|
-
|
36
|
-
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
37
|
-
"use strict";
|
38
|
-
|
39
|
-
var oop = require("../../lib/oop");
|
40
|
-
var Range = require("../../range").Range;
|
41
|
-
var BaseFoldMode = require("./fold_mode").FoldMode;
|
42
|
-
|
43
|
-
var FoldMode = exports.FoldMode = function(commentRegex) {
|
44
|
-
if (commentRegex) {
|
45
|
-
this.foldingStartMarker = new RegExp(
|
46
|
-
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
47
|
-
);
|
48
|
-
this.foldingStopMarker = new RegExp(
|
49
|
-
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
50
|
-
);
|
51
|
-
}
|
52
|
-
};
|
53
|
-
oop.inherits(FoldMode, BaseFoldMode);
|
54
|
-
|
55
|
-
(function() {
|
56
|
-
|
57
|
-
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
58
|
-
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
59
|
-
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
60
|
-
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
61
|
-
this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/;
|
62
|
-
this._getFoldWidgetBase = this.getFoldWidget;
|
63
|
-
this.getFoldWidget = function(session, foldStyle, row) {
|
64
|
-
var line = session.getLine(row);
|
65
|
-
|
66
|
-
if (this.singleLineBlockCommentRe.test(line)) {
|
67
|
-
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
68
|
-
return "";
|
69
|
-
}
|
70
|
-
|
71
|
-
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
72
|
-
|
73
|
-
if (!fw && this.startRegionRe.test(line))
|
74
|
-
return "start"; // lineCommentRegionStart
|
75
|
-
|
76
|
-
return fw;
|
77
|
-
};
|
78
|
-
|
79
|
-
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
80
|
-
var line = session.getLine(row);
|
81
|
-
|
82
|
-
if (this.startRegionRe.test(line))
|
83
|
-
return this.getCommentRegionBlock(session, line, row);
|
84
|
-
|
85
|
-
var match = line.match(this.foldingStartMarker);
|
86
|
-
if (match) {
|
87
|
-
var i = match.index;
|
88
|
-
|
89
|
-
if (match[1])
|
90
|
-
return this.openingBracketBlock(session, match[1], row, i);
|
91
|
-
|
92
|
-
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
93
|
-
|
94
|
-
if (range && !range.isMultiLine()) {
|
95
|
-
if (forceMultiline) {
|
96
|
-
range = this.getSectionRange(session, row);
|
97
|
-
} else if (foldStyle != "all")
|
98
|
-
range = null;
|
99
|
-
}
|
100
|
-
|
101
|
-
return range;
|
102
|
-
}
|
103
|
-
|
104
|
-
if (foldStyle === "markbegin")
|
105
|
-
return;
|
106
|
-
|
107
|
-
var match = line.match(this.foldingStopMarker);
|
108
|
-
if (match) {
|
109
|
-
var i = match.index + match[0].length;
|
110
|
-
|
111
|
-
if (match[1])
|
112
|
-
return this.closingBracketBlock(session, match[1], row, i);
|
113
|
-
|
114
|
-
return session.getCommentFoldRange(row, i, -1);
|
115
|
-
}
|
116
|
-
};
|
117
|
-
|
118
|
-
this.getSectionRange = function(session, row) {
|
119
|
-
var line = session.getLine(row);
|
120
|
-
var startIndent = line.search(/\S/);
|
121
|
-
var startRow = row;
|
122
|
-
var startColumn = line.length;
|
123
|
-
row = row + 1;
|
124
|
-
var endRow = row;
|
125
|
-
var maxRow = session.getLength();
|
126
|
-
while (++row < maxRow) {
|
127
|
-
line = session.getLine(row);
|
128
|
-
var indent = line.search(/\S/);
|
129
|
-
if (indent === -1)
|
130
|
-
continue;
|
131
|
-
if (startIndent > indent)
|
132
|
-
break;
|
133
|
-
var subRange = this.getFoldWidgetRange(session, "all", row);
|
134
|
-
|
135
|
-
if (subRange) {
|
136
|
-
if (subRange.start.row <= startRow) {
|
137
|
-
break;
|
138
|
-
} else if (subRange.isMultiLine()) {
|
139
|
-
row = subRange.end.row;
|
140
|
-
} else if (startIndent == indent) {
|
141
|
-
break;
|
142
|
-
}
|
143
|
-
}
|
144
|
-
endRow = row;
|
145
|
-
}
|
146
|
-
|
147
|
-
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
148
|
-
};
|
149
|
-
|
150
|
-
this.getCommentRegionBlock = function(session, line, row) {
|
151
|
-
var startColumn = line.search(/\s*$/);
|
152
|
-
var maxRow = session.getLength();
|
153
|
-
var startRow = row;
|
154
|
-
|
155
|
-
var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/;
|
156
|
-
var depth = 1;
|
157
|
-
while (++row < maxRow) {
|
158
|
-
line = session.getLine(row);
|
159
|
-
var m = re.exec(line);
|
160
|
-
if (!m) continue;
|
161
|
-
if (m[1]) depth--;
|
162
|
-
else depth++;
|
163
|
-
|
164
|
-
if (!depth) break;
|
165
|
-
}
|
166
|
-
|
167
|
-
var endRow = row;
|
168
|
-
if (endRow > startRow) {
|
169
|
-
return new Range(startRow, startColumn, endRow, line.length);
|
170
|
-
}
|
171
|
-
};
|
172
|
-
|
173
|
-
}).call(FoldMode.prototype);
|
174
|
-
|
175
|
-
});
|
176
|
-
|
177
|
-
define("ace/mode/mipsassembler",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mipsassembler_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
|
178
|
-
"use strict";
|
179
|
-
|
180
|
-
var oop = require("../lib/oop");
|
181
|
-
var TextMode = require("./text").Mode;
|
182
|
-
var HighlightRules = require("./mipsassembler_highlight_rules").HighlightRules;
|
183
|
-
var FoldMode = require("./folding/cstyle").FoldMode;
|
184
|
-
|
185
|
-
var Mode = function() {
|
186
|
-
this.HighlightRules = HighlightRules;
|
187
|
-
this.foldingRules = new FoldMode();
|
188
|
-
};
|
189
|
-
oop.inherits(Mode, TextMode);
|
190
|
-
|
191
|
-
(function() {
|
192
|
-
this.$id = "ace/mode/mipsassembler"
|
193
|
-
}).call(Mode.prototype);
|
194
|
-
|
195
|
-
exports.Mode = Mode;
|
196
|
-
});
|
@@ -1,1099 +0,0 @@
|
|
1
|
-
define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
2
|
-
"use strict";
|
3
|
-
|
4
|
-
var oop = require("../lib/oop");
|
5
|
-
var lang = require("../lib/lang");
|
6
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
7
|
-
var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
|
8
|
-
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
|
9
|
-
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
|
10
|
-
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
|
11
|
-
var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
|
12
|
-
|
13
|
-
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
|
14
|
-
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
|
15
|
-
var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
|
16
|
-
|
17
|
-
var CssHighlightRules = function() {
|
18
|
-
|
19
|
-
var keywordMapper = this.createKeywordMapper({
|
20
|
-
"support.function": supportFunction,
|
21
|
-
"support.constant": supportConstant,
|
22
|
-
"support.type": supportType,
|
23
|
-
"support.constant.color": supportConstantColor,
|
24
|
-
"support.constant.fonts": supportConstantFonts
|
25
|
-
}, "text", true);
|
26
|
-
|
27
|
-
this.$rules = {
|
28
|
-
"start" : [{
|
29
|
-
token : "comment", // multi line comment
|
30
|
-
regex : "\\/\\*",
|
31
|
-
push : "comment"
|
32
|
-
}, {
|
33
|
-
token: "paren.lparen",
|
34
|
-
regex: "\\{",
|
35
|
-
push: "ruleset"
|
36
|
-
}, {
|
37
|
-
token: "string",
|
38
|
-
regex: "@.*?{",
|
39
|
-
push: "media"
|
40
|
-
}, {
|
41
|
-
token: "keyword",
|
42
|
-
regex: "#[a-z0-9-_]+"
|
43
|
-
}, {
|
44
|
-
token: "variable",
|
45
|
-
regex: "\\.[a-z0-9-_]+"
|
46
|
-
}, {
|
47
|
-
token: "string",
|
48
|
-
regex: ":[a-z0-9-_]+"
|
49
|
-
}, {
|
50
|
-
token: "constant",
|
51
|
-
regex: "[a-z0-9-_]+"
|
52
|
-
}, {
|
53
|
-
caseInsensitive: true
|
54
|
-
}],
|
55
|
-
|
56
|
-
"media" : [{
|
57
|
-
token : "comment", // multi line comment
|
58
|
-
regex : "\\/\\*",
|
59
|
-
push : "comment"
|
60
|
-
}, {
|
61
|
-
token: "paren.lparen",
|
62
|
-
regex: "\\{",
|
63
|
-
push: "ruleset"
|
64
|
-
}, {
|
65
|
-
token: "string",
|
66
|
-
regex: "\\}",
|
67
|
-
next: "pop"
|
68
|
-
}, {
|
69
|
-
token: "keyword",
|
70
|
-
regex: "#[a-z0-9-_]+"
|
71
|
-
}, {
|
72
|
-
token: "variable",
|
73
|
-
regex: "\\.[a-z0-9-_]+"
|
74
|
-
}, {
|
75
|
-
token: "string",
|
76
|
-
regex: ":[a-z0-9-_]+"
|
77
|
-
}, {
|
78
|
-
token: "constant",
|
79
|
-
regex: "[a-z0-9-_]+"
|
80
|
-
}, {
|
81
|
-
caseInsensitive: true
|
82
|
-
}],
|
83
|
-
|
84
|
-
"comment" : [{
|
85
|
-
token : "comment",
|
86
|
-
regex : "\\*\\/",
|
87
|
-
next : "pop"
|
88
|
-
}, {
|
89
|
-
defaultToken : "comment"
|
90
|
-
}],
|
91
|
-
|
92
|
-
"ruleset" : [
|
93
|
-
{
|
94
|
-
token : "paren.rparen",
|
95
|
-
regex : "\\}",
|
96
|
-
next: "pop"
|
97
|
-
}, {
|
98
|
-
token : "comment", // multi line comment
|
99
|
-
regex : "\\/\\*",
|
100
|
-
push : "comment"
|
101
|
-
}, {
|
102
|
-
token : "string", // single line
|
103
|
-
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
104
|
-
}, {
|
105
|
-
token : "string", // single line
|
106
|
-
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
107
|
-
}, {
|
108
|
-
token : ["constant.numeric", "keyword"],
|
109
|
-
regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
|
110
|
-
}, {
|
111
|
-
token : "constant.numeric",
|
112
|
-
regex : numRe
|
113
|
-
}, {
|
114
|
-
token : "constant.numeric", // hex6 color
|
115
|
-
regex : "#[a-f0-9]{6}"
|
116
|
-
}, {
|
117
|
-
token : "constant.numeric", // hex3 color
|
118
|
-
regex : "#[a-f0-9]{3}"
|
119
|
-
}, {
|
120
|
-
token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
|
121
|
-
regex : pseudoElements
|
122
|
-
}, {
|
123
|
-
token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
|
124
|
-
regex : pseudoClasses
|
125
|
-
}, {
|
126
|
-
token : ["support.function", "string", "support.function"],
|
127
|
-
regex : "(url\\()(.*)(\\))"
|
128
|
-
}, {
|
129
|
-
token : keywordMapper,
|
130
|
-
regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
|
131
|
-
}, {
|
132
|
-
caseInsensitive: true
|
133
|
-
}]
|
134
|
-
};
|
135
|
-
|
136
|
-
this.normalizeRules();
|
137
|
-
};
|
138
|
-
|
139
|
-
oop.inherits(CssHighlightRules, TextHighlightRules);
|
140
|
-
|
141
|
-
exports.CssHighlightRules = CssHighlightRules;
|
142
|
-
|
143
|
-
});
|
144
|
-
|
145
|
-
define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
146
|
-
"use strict";
|
147
|
-
|
148
|
-
var oop = require("../lib/oop");
|
149
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
150
|
-
|
151
|
-
var DocCommentHighlightRules = function() {
|
152
|
-
this.$rules = {
|
153
|
-
"start" : [ {
|
154
|
-
token : "comment.doc.tag",
|
155
|
-
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
156
|
-
},
|
157
|
-
DocCommentHighlightRules.getTagRule(),
|
158
|
-
{
|
159
|
-
defaultToken : "comment.doc",
|
160
|
-
caseInsensitive: true
|
161
|
-
}]
|
162
|
-
};
|
163
|
-
};
|
164
|
-
|
165
|
-
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
166
|
-
|
167
|
-
DocCommentHighlightRules.getTagRule = function(start) {
|
168
|
-
return {
|
169
|
-
token : "comment.doc.tag.storage.type",
|
170
|
-
regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
|
171
|
-
};
|
172
|
-
}
|
173
|
-
|
174
|
-
DocCommentHighlightRules.getStartRule = function(start) {
|
175
|
-
return {
|
176
|
-
token : "comment.doc", // doc comment
|
177
|
-
regex : "\\/\\*(?=\\*)",
|
178
|
-
next : start
|
179
|
-
};
|
180
|
-
};
|
181
|
-
|
182
|
-
DocCommentHighlightRules.getEndRule = function (start) {
|
183
|
-
return {
|
184
|
-
token : "comment.doc", // closing comment
|
185
|
-
regex : "\\*\\/",
|
186
|
-
next : start
|
187
|
-
};
|
188
|
-
};
|
189
|
-
|
190
|
-
|
191
|
-
exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
192
|
-
|
193
|
-
});
|
194
|
-
|
195
|
-
define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
196
|
-
"use strict";
|
197
|
-
|
198
|
-
var oop = require("../lib/oop");
|
199
|
-
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
200
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
201
|
-
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
|
202
|
-
|
203
|
-
var JavaScriptHighlightRules = function(options) {
|
204
|
-
var keywordMapper = this.createKeywordMapper({
|
205
|
-
"variable.language":
|
206
|
-
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
|
207
|
-
"Namespace|QName|XML|XMLList|" + // E4X
|
208
|
-
"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
|
209
|
-
"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
|
210
|
-
"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
|
211
|
-
"SyntaxError|TypeError|URIError|" +
|
212
|
-
"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
|
213
|
-
"isNaN|parseFloat|parseInt|" +
|
214
|
-
"JSON|Math|" + // Other
|
215
|
-
"this|arguments|prototype|window|document" , // Pseudo
|
216
|
-
"keyword":
|
217
|
-
"const|yield|import|get|set|" +
|
218
|
-
"break|case|catch|continue|default|delete|do|else|finally|for|function|" +
|
219
|
-
"if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
|
220
|
-
"__parent__|__count__|escape|unescape|with|__proto__|" +
|
221
|
-
"class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
|
222
|
-
"storage.type":
|
223
|
-
"const|let|var|function",
|
224
|
-
"constant.language":
|
225
|
-
"null|Infinity|NaN|undefined",
|
226
|
-
"support.function":
|
227
|
-
"alert",
|
228
|
-
"constant.language.boolean": "true|false"
|
229
|
-
}, "identifier");
|
230
|
-
var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
|
231
|
-
|
232
|
-
var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
|
233
|
-
"u[0-9a-fA-F]{4}|" + // unicode
|
234
|
-
"[0-2][0-7]{0,2}|" + // oct
|
235
|
-
"3[0-6][0-7]?|" + // oct
|
236
|
-
"37[0-7]?|" + // oct
|
237
|
-
"[4-7][0-7]?|" + //oct
|
238
|
-
".)";
|
239
|
-
|
240
|
-
this.$rules = {
|
241
|
-
"no_regex" : [
|
242
|
-
{
|
243
|
-
token : "comment",
|
244
|
-
regex : "\\/\\/",
|
245
|
-
next : "line_comment"
|
246
|
-
},
|
247
|
-
DocCommentHighlightRules.getStartRule("doc-start"),
|
248
|
-
{
|
249
|
-
token : "comment", // multi line comment
|
250
|
-
regex : /\/\*/,
|
251
|
-
next : "comment"
|
252
|
-
}, {
|
253
|
-
token : "string",
|
254
|
-
regex : "'(?=.)",
|
255
|
-
next : "qstring"
|
256
|
-
}, {
|
257
|
-
token : "string",
|
258
|
-
regex : '"(?=.)',
|
259
|
-
next : "qqstring"
|
260
|
-
}, {
|
261
|
-
token : "constant.numeric", // hex
|
262
|
-
regex : /0[xX][0-9a-fA-F]+\b/
|
263
|
-
}, {
|
264
|
-
token : "constant.numeric", // float
|
265
|
-
regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
|
266
|
-
}, {
|
267
|
-
token : [
|
268
|
-
"storage.type", "punctuation.operator", "support.function",
|
269
|
-
"punctuation.operator", "entity.name.function", "text","keyword.operator"
|
270
|
-
],
|
271
|
-
regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
|
272
|
-
next: "function_arguments"
|
273
|
-
}, {
|
274
|
-
token : [
|
275
|
-
"storage.type", "punctuation.operator", "entity.name.function", "text",
|
276
|
-
"keyword.operator", "text", "storage.type", "text", "paren.lparen"
|
277
|
-
],
|
278
|
-
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
279
|
-
next: "function_arguments"
|
280
|
-
}, {
|
281
|
-
token : [
|
282
|
-
"entity.name.function", "text", "keyword.operator", "text", "storage.type",
|
283
|
-
"text", "paren.lparen"
|
284
|
-
],
|
285
|
-
regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
286
|
-
next: "function_arguments"
|
287
|
-
}, {
|
288
|
-
token : [
|
289
|
-
"storage.type", "punctuation.operator", "entity.name.function", "text",
|
290
|
-
"keyword.operator", "text",
|
291
|
-
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
|
292
|
-
],
|
293
|
-
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
|
294
|
-
next: "function_arguments"
|
295
|
-
}, {
|
296
|
-
token : [
|
297
|
-
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
|
298
|
-
],
|
299
|
-
regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
|
300
|
-
next: "function_arguments"
|
301
|
-
}, {
|
302
|
-
token : [
|
303
|
-
"entity.name.function", "text", "punctuation.operator",
|
304
|
-
"text", "storage.type", "text", "paren.lparen"
|
305
|
-
],
|
306
|
-
regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
|
307
|
-
next: "function_arguments"
|
308
|
-
}, {
|
309
|
-
token : [
|
310
|
-
"text", "text", "storage.type", "text", "paren.lparen"
|
311
|
-
],
|
312
|
-
regex : "(:)(\\s*)(function)(\\s*)(\\()",
|
313
|
-
next: "function_arguments"
|
314
|
-
}, {
|
315
|
-
token : "keyword",
|
316
|
-
regex : "(?:" + kwBeforeRe + ")\\b",
|
317
|
-
next : "start"
|
318
|
-
}, {
|
319
|
-
token : ["support.constant"],
|
320
|
-
regex : /that\b/
|
321
|
-
}, {
|
322
|
-
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
|
323
|
-
regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
|
324
|
-
}, {
|
325
|
-
token : keywordMapper,
|
326
|
-
regex : identifierRe
|
327
|
-
}, {
|
328
|
-
token : "punctuation.operator",
|
329
|
-
regex : /[.](?![.])/,
|
330
|
-
next : "property"
|
331
|
-
}, {
|
332
|
-
token : "keyword.operator",
|
333
|
-
regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
|
334
|
-
next : "start"
|
335
|
-
}, {
|
336
|
-
token : "punctuation.operator",
|
337
|
-
regex : /[?:,;.]/,
|
338
|
-
next : "start"
|
339
|
-
}, {
|
340
|
-
token : "paren.lparen",
|
341
|
-
regex : /[\[({]/,
|
342
|
-
next : "start"
|
343
|
-
}, {
|
344
|
-
token : "paren.rparen",
|
345
|
-
regex : /[\])}]/
|
346
|
-
}, {
|
347
|
-
token: "comment",
|
348
|
-
regex: /^#!.*$/
|
349
|
-
}
|
350
|
-
],
|
351
|
-
property: [{
|
352
|
-
token : "text",
|
353
|
-
regex : "\\s+"
|
354
|
-
}, {
|
355
|
-
token : [
|
356
|
-
"storage.type", "punctuation.operator", "entity.name.function", "text",
|
357
|
-
"keyword.operator", "text",
|
358
|
-
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
|
359
|
-
],
|
360
|
-
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
|
361
|
-
next: "function_arguments"
|
362
|
-
}, {
|
363
|
-
token : "punctuation.operator",
|
364
|
-
regex : /[.](?![.])/
|
365
|
-
}, {
|
366
|
-
token : "support.function",
|
367
|
-
regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
|
368
|
-
}, {
|
369
|
-
token : "support.function.dom",
|
370
|
-
regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
|
371
|
-
}, {
|
372
|
-
token : "support.constant",
|
373
|
-
regex : /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
|
374
|
-
}, {
|
375
|
-
token : "identifier",
|
376
|
-
regex : identifierRe
|
377
|
-
}, {
|
378
|
-
regex: "",
|
379
|
-
token: "empty",
|
380
|
-
next: "no_regex"
|
381
|
-
}
|
382
|
-
],
|
383
|
-
"start": [
|
384
|
-
DocCommentHighlightRules.getStartRule("doc-start"),
|
385
|
-
{
|
386
|
-
token : "comment", // multi line comment
|
387
|
-
regex : "\\/\\*",
|
388
|
-
next : "comment_regex_allowed"
|
389
|
-
}, {
|
390
|
-
token : "comment",
|
391
|
-
regex : "\\/\\/",
|
392
|
-
next : "line_comment_regex_allowed"
|
393
|
-
}, {
|
394
|
-
token: "string.regexp",
|
395
|
-
regex: "\\/",
|
396
|
-
next: "regex"
|
397
|
-
}, {
|
398
|
-
token : "text",
|
399
|
-
regex : "\\s+|^$",
|
400
|
-
next : "start"
|
401
|
-
}, {
|
402
|
-
token: "empty",
|
403
|
-
regex: "",
|
404
|
-
next: "no_regex"
|
405
|
-
}
|
406
|
-
],
|
407
|
-
"regex": [
|
408
|
-
{
|
409
|
-
token: "regexp.keyword.operator",
|
410
|
-
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
411
|
-
}, {
|
412
|
-
token: "string.regexp",
|
413
|
-
regex: "/[sxngimy]*",
|
414
|
-
next: "no_regex"
|
415
|
-
}, {
|
416
|
-
token : "invalid",
|
417
|
-
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
|
418
|
-
}, {
|
419
|
-
token : "constant.language.escape",
|
420
|
-
regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
|
421
|
-
}, {
|
422
|
-
token : "constant.language.delimiter",
|
423
|
-
regex: /\|/
|
424
|
-
}, {
|
425
|
-
token: "constant.language.escape",
|
426
|
-
regex: /\[\^?/,
|
427
|
-
next: "regex_character_class"
|
428
|
-
}, {
|
429
|
-
token: "empty",
|
430
|
-
regex: "$",
|
431
|
-
next: "no_regex"
|
432
|
-
}, {
|
433
|
-
defaultToken: "string.regexp"
|
434
|
-
}
|
435
|
-
],
|
436
|
-
"regex_character_class": [
|
437
|
-
{
|
438
|
-
token: "regexp.charclass.keyword.operator",
|
439
|
-
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
440
|
-
}, {
|
441
|
-
token: "constant.language.escape",
|
442
|
-
regex: "]",
|
443
|
-
next: "regex"
|
444
|
-
}, {
|
445
|
-
token: "constant.language.escape",
|
446
|
-
regex: "-"
|
447
|
-
}, {
|
448
|
-
token: "empty",
|
449
|
-
regex: "$",
|
450
|
-
next: "no_regex"
|
451
|
-
}, {
|
452
|
-
defaultToken: "string.regexp.charachterclass"
|
453
|
-
}
|
454
|
-
],
|
455
|
-
"function_arguments": [
|
456
|
-
{
|
457
|
-
token: "variable.parameter",
|
458
|
-
regex: identifierRe
|
459
|
-
}, {
|
460
|
-
token: "punctuation.operator",
|
461
|
-
regex: "[, ]+"
|
462
|
-
}, {
|
463
|
-
token: "punctuation.operator",
|
464
|
-
regex: "$"
|
465
|
-
}, {
|
466
|
-
token: "empty",
|
467
|
-
regex: "",
|
468
|
-
next: "no_regex"
|
469
|
-
}
|
470
|
-
],
|
471
|
-
"comment_regex_allowed" : [
|
472
|
-
DocCommentHighlightRules.getTagRule(),
|
473
|
-
{token : "comment", regex : "\\*\\/", next : "start"},
|
474
|
-
{defaultToken : "comment", caseInsensitive: true}
|
475
|
-
],
|
476
|
-
"comment" : [
|
477
|
-
DocCommentHighlightRules.getTagRule(),
|
478
|
-
{token : "comment", regex : "\\*\\/", next : "no_regex"},
|
479
|
-
{defaultToken : "comment", caseInsensitive: true}
|
480
|
-
],
|
481
|
-
"line_comment_regex_allowed" : [
|
482
|
-
DocCommentHighlightRules.getTagRule(),
|
483
|
-
{token : "comment", regex : "$|^", next : "start"},
|
484
|
-
{defaultToken : "comment", caseInsensitive: true}
|
485
|
-
],
|
486
|
-
"line_comment" : [
|
487
|
-
DocCommentHighlightRules.getTagRule(),
|
488
|
-
{token : "comment", regex : "$|^", next : "no_regex"},
|
489
|
-
{defaultToken : "comment", caseInsensitive: true}
|
490
|
-
],
|
491
|
-
"qqstring" : [
|
492
|
-
{
|
493
|
-
token : "constant.language.escape",
|
494
|
-
regex : escapedRe
|
495
|
-
}, {
|
496
|
-
token : "string",
|
497
|
-
regex : "\\\\$",
|
498
|
-
next : "qqstring"
|
499
|
-
}, {
|
500
|
-
token : "string",
|
501
|
-
regex : '"|$',
|
502
|
-
next : "no_regex"
|
503
|
-
}, {
|
504
|
-
defaultToken: "string"
|
505
|
-
}
|
506
|
-
],
|
507
|
-
"qstring" : [
|
508
|
-
{
|
509
|
-
token : "constant.language.escape",
|
510
|
-
regex : escapedRe
|
511
|
-
}, {
|
512
|
-
token : "string",
|
513
|
-
regex : "\\\\$",
|
514
|
-
next : "qstring"
|
515
|
-
}, {
|
516
|
-
token : "string",
|
517
|
-
regex : "'|$",
|
518
|
-
next : "no_regex"
|
519
|
-
}, {
|
520
|
-
defaultToken: "string"
|
521
|
-
}
|
522
|
-
]
|
523
|
-
};
|
524
|
-
|
525
|
-
|
526
|
-
if (!options || !options.noES6) {
|
527
|
-
this.$rules.no_regex.unshift({
|
528
|
-
regex: "[{}]", onMatch: function(val, state, stack) {
|
529
|
-
this.next = val == "{" ? this.nextState : "";
|
530
|
-
if (val == "{" && stack.length) {
|
531
|
-
stack.unshift("start", state);
|
532
|
-
return "paren";
|
533
|
-
}
|
534
|
-
if (val == "}" && stack.length) {
|
535
|
-
stack.shift();
|
536
|
-
this.next = stack.shift();
|
537
|
-
if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
|
538
|
-
return "paren.quasi.end";
|
539
|
-
}
|
540
|
-
return val == "{" ? "paren.lparen" : "paren.rparen";
|
541
|
-
},
|
542
|
-
nextState: "start"
|
543
|
-
}, {
|
544
|
-
token : "string.quasi.start",
|
545
|
-
regex : /`/,
|
546
|
-
push : [{
|
547
|
-
token : "constant.language.escape",
|
548
|
-
regex : escapedRe
|
549
|
-
}, {
|
550
|
-
token : "paren.quasi.start",
|
551
|
-
regex : /\${/,
|
552
|
-
push : "start"
|
553
|
-
}, {
|
554
|
-
token : "string.quasi.end",
|
555
|
-
regex : /`/,
|
556
|
-
next : "pop"
|
557
|
-
}, {
|
558
|
-
defaultToken: "string.quasi"
|
559
|
-
}]
|
560
|
-
});
|
561
|
-
|
562
|
-
if (!options || !options.noJSX)
|
563
|
-
JSX.call(this);
|
564
|
-
}
|
565
|
-
|
566
|
-
this.embedRules(DocCommentHighlightRules, "doc-",
|
567
|
-
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
|
568
|
-
|
569
|
-
this.normalizeRules();
|
570
|
-
};
|
571
|
-
|
572
|
-
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
|
573
|
-
|
574
|
-
function JSX() {
|
575
|
-
var tagRegex = identifierRe.replace("\\d", "\\d\\-");
|
576
|
-
var jsxTag = {
|
577
|
-
onMatch : function(val, state, stack) {
|
578
|
-
var offset = val.charAt(1) == "/" ? 2 : 1;
|
579
|
-
if (offset == 1) {
|
580
|
-
if (state != this.nextState)
|
581
|
-
stack.unshift(this.next, this.nextState, 0);
|
582
|
-
else
|
583
|
-
stack.unshift(this.next);
|
584
|
-
stack[2]++;
|
585
|
-
} else if (offset == 2) {
|
586
|
-
if (state == this.nextState) {
|
587
|
-
stack[1]--;
|
588
|
-
if (!stack[1] || stack[1] < 0) {
|
589
|
-
stack.shift();
|
590
|
-
stack.shift();
|
591
|
-
}
|
592
|
-
}
|
593
|
-
}
|
594
|
-
return [{
|
595
|
-
type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
|
596
|
-
value: val.slice(0, offset)
|
597
|
-
}, {
|
598
|
-
type: "meta.tag.tag-name.xml",
|
599
|
-
value: val.substr(offset)
|
600
|
-
}];
|
601
|
-
},
|
602
|
-
regex : "</?" + tagRegex + "",
|
603
|
-
next: "jsxAttributes",
|
604
|
-
nextState: "jsx"
|
605
|
-
};
|
606
|
-
this.$rules.start.unshift(jsxTag);
|
607
|
-
var jsxJsRule = {
|
608
|
-
regex: "{",
|
609
|
-
token: "paren.quasi.start",
|
610
|
-
push: "start"
|
611
|
-
};
|
612
|
-
this.$rules.jsx = [
|
613
|
-
jsxJsRule,
|
614
|
-
jsxTag,
|
615
|
-
{include : "reference"},
|
616
|
-
{defaultToken: "string"}
|
617
|
-
];
|
618
|
-
this.$rules.jsxAttributes = [{
|
619
|
-
token : "meta.tag.punctuation.tag-close.xml",
|
620
|
-
regex : "/?>",
|
621
|
-
onMatch : function(value, currentState, stack) {
|
622
|
-
if (currentState == stack[0])
|
623
|
-
stack.shift();
|
624
|
-
if (value.length == 2) {
|
625
|
-
if (stack[0] == this.nextState)
|
626
|
-
stack[1]--;
|
627
|
-
if (!stack[1] || stack[1] < 0) {
|
628
|
-
stack.splice(0, 2);
|
629
|
-
}
|
630
|
-
}
|
631
|
-
this.next = stack[0] || "start";
|
632
|
-
return [{type: this.token, value: value}];
|
633
|
-
},
|
634
|
-
nextState: "jsx"
|
635
|
-
},
|
636
|
-
jsxJsRule,
|
637
|
-
{
|
638
|
-
token : "entity.other.attribute-name.xml",
|
639
|
-
regex : tagRegex
|
640
|
-
}, {
|
641
|
-
token : "keyword.operator.attribute-equals.xml",
|
642
|
-
regex : "="
|
643
|
-
}, {
|
644
|
-
token : "text.tag-whitespace.xml",
|
645
|
-
regex : "\\s+"
|
646
|
-
}, {
|
647
|
-
token : "string.attribute-value.xml",
|
648
|
-
regex : "'",
|
649
|
-
stateName : "jsx_attr_q",
|
650
|
-
push : [
|
651
|
-
{token : "string.attribute-value.xml", regex: "'", next: "pop"},
|
652
|
-
jsxJsRule,
|
653
|
-
{include : "reference"},
|
654
|
-
{defaultToken : "string.attribute-value.xml"}
|
655
|
-
]
|
656
|
-
}, {
|
657
|
-
token : "string.attribute-value.xml",
|
658
|
-
regex : '"',
|
659
|
-
stateName : "jsx_attr_qq",
|
660
|
-
push : [
|
661
|
-
jsxJsRule,
|
662
|
-
{token : "string.attribute-value.xml", regex: '"', next: "pop"},
|
663
|
-
{include : "reference"},
|
664
|
-
{defaultToken : "string.attribute-value.xml"}
|
665
|
-
]
|
666
|
-
}];
|
667
|
-
this.$rules.reference = [{
|
668
|
-
token : "constant.language.escape.reference.xml",
|
669
|
-
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
670
|
-
}];
|
671
|
-
}
|
672
|
-
|
673
|
-
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
|
674
|
-
});
|
675
|
-
|
676
|
-
define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
677
|
-
"use strict";
|
678
|
-
|
679
|
-
var oop = require("../lib/oop");
|
680
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
681
|
-
|
682
|
-
var XmlHighlightRules = function(normalize) {
|
683
|
-
var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
|
684
|
-
|
685
|
-
this.$rules = {
|
686
|
-
start : [
|
687
|
-
{token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
|
688
|
-
{
|
689
|
-
token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
|
690
|
-
regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
|
691
|
-
},
|
692
|
-
{
|
693
|
-
token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
|
694
|
-
regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
|
695
|
-
},
|
696
|
-
{token : "comment.xml", regex : "<\\!--", next : "comment"},
|
697
|
-
{
|
698
|
-
token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
|
699
|
-
regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
|
700
|
-
},
|
701
|
-
{include : "tag"},
|
702
|
-
{token : "text.end-tag-open.xml", regex: "</"},
|
703
|
-
{token : "text.tag-open.xml", regex: "<"},
|
704
|
-
{include : "reference"},
|
705
|
-
{defaultToken : "text.xml"}
|
706
|
-
],
|
707
|
-
|
708
|
-
xml_decl : [{
|
709
|
-
token : "entity.other.attribute-name.decl-attribute-name.xml",
|
710
|
-
regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
|
711
|
-
}, {
|
712
|
-
token : "keyword.operator.decl-attribute-equals.xml",
|
713
|
-
regex : "="
|
714
|
-
}, {
|
715
|
-
include: "whitespace"
|
716
|
-
}, {
|
717
|
-
include: "string"
|
718
|
-
}, {
|
719
|
-
token : "punctuation.xml-decl.xml",
|
720
|
-
regex : "\\?>",
|
721
|
-
next : "start"
|
722
|
-
}],
|
723
|
-
|
724
|
-
processing_instruction : [
|
725
|
-
{token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
|
726
|
-
{defaultToken : "instruction.xml"}
|
727
|
-
],
|
728
|
-
|
729
|
-
doctype : [
|
730
|
-
{include : "whitespace"},
|
731
|
-
{include : "string"},
|
732
|
-
{token : "xml-pe.doctype.xml", regex : ">", next : "start"},
|
733
|
-
{token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
|
734
|
-
{token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
|
735
|
-
],
|
736
|
-
|
737
|
-
int_subset : [{
|
738
|
-
token : "text.xml",
|
739
|
-
regex : "\\s+"
|
740
|
-
}, {
|
741
|
-
token: "punctuation.int-subset.xml",
|
742
|
-
regex: "]",
|
743
|
-
next: "pop"
|
744
|
-
}, {
|
745
|
-
token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
|
746
|
-
regex : "(<\\!)(" + tagRegex + ")",
|
747
|
-
push : [{
|
748
|
-
token : "text",
|
749
|
-
regex : "\\s+"
|
750
|
-
},
|
751
|
-
{
|
752
|
-
token : "punctuation.markup-decl.xml",
|
753
|
-
regex : ">",
|
754
|
-
next : "pop"
|
755
|
-
},
|
756
|
-
{include : "string"}]
|
757
|
-
}],
|
758
|
-
|
759
|
-
cdata : [
|
760
|
-
{token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
|
761
|
-
{token : "text.xml", regex : "\\s+"},
|
762
|
-
{token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
|
763
|
-
],
|
764
|
-
|
765
|
-
comment : [
|
766
|
-
{token : "comment.xml", regex : "-->", next : "start"},
|
767
|
-
{defaultToken : "comment.xml"}
|
768
|
-
],
|
769
|
-
|
770
|
-
reference : [{
|
771
|
-
token : "constant.language.escape.reference.xml",
|
772
|
-
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
773
|
-
}],
|
774
|
-
|
775
|
-
attr_reference : [{
|
776
|
-
token : "constant.language.escape.reference.attribute-value.xml",
|
777
|
-
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
778
|
-
}],
|
779
|
-
|
780
|
-
tag : [{
|
781
|
-
token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
|
782
|
-
regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
|
783
|
-
next: [
|
784
|
-
{include : "attributes"},
|
785
|
-
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
|
786
|
-
]
|
787
|
-
}],
|
788
|
-
|
789
|
-
tag_whitespace : [
|
790
|
-
{token : "text.tag-whitespace.xml", regex : "\\s+"}
|
791
|
-
],
|
792
|
-
whitespace : [
|
793
|
-
{token : "text.whitespace.xml", regex : "\\s+"}
|
794
|
-
],
|
795
|
-
string: [{
|
796
|
-
token : "string.xml",
|
797
|
-
regex : "'",
|
798
|
-
push : [
|
799
|
-
{token : "string.xml", regex: "'", next: "pop"},
|
800
|
-
{defaultToken : "string.xml"}
|
801
|
-
]
|
802
|
-
}, {
|
803
|
-
token : "string.xml",
|
804
|
-
regex : '"',
|
805
|
-
push : [
|
806
|
-
{token : "string.xml", regex: '"', next: "pop"},
|
807
|
-
{defaultToken : "string.xml"}
|
808
|
-
]
|
809
|
-
}],
|
810
|
-
|
811
|
-
attributes: [{
|
812
|
-
token : "entity.other.attribute-name.xml",
|
813
|
-
regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
|
814
|
-
}, {
|
815
|
-
token : "keyword.operator.attribute-equals.xml",
|
816
|
-
regex : "="
|
817
|
-
}, {
|
818
|
-
include: "tag_whitespace"
|
819
|
-
}, {
|
820
|
-
include: "attribute_value"
|
821
|
-
}],
|
822
|
-
|
823
|
-
attribute_value: [{
|
824
|
-
token : "string.attribute-value.xml",
|
825
|
-
regex : "'",
|
826
|
-
push : [
|
827
|
-
{token : "string.attribute-value.xml", regex: "'", next: "pop"},
|
828
|
-
{include : "attr_reference"},
|
829
|
-
{defaultToken : "string.attribute-value.xml"}
|
830
|
-
]
|
831
|
-
}, {
|
832
|
-
token : "string.attribute-value.xml",
|
833
|
-
regex : '"',
|
834
|
-
push : [
|
835
|
-
{token : "string.attribute-value.xml", regex: '"', next: "pop"},
|
836
|
-
{include : "attr_reference"},
|
837
|
-
{defaultToken : "string.attribute-value.xml"}
|
838
|
-
]
|
839
|
-
}]
|
840
|
-
};
|
841
|
-
|
842
|
-
if (this.constructor === XmlHighlightRules)
|
843
|
-
this.normalizeRules();
|
844
|
-
};
|
845
|
-
|
846
|
-
|
847
|
-
(function() {
|
848
|
-
|
849
|
-
this.embedTagRules = function(HighlightRules, prefix, tag){
|
850
|
-
this.$rules.tag.unshift({
|
851
|
-
token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
|
852
|
-
regex : "(<)(" + tag + "(?=\\s|>|$))",
|
853
|
-
next: [
|
854
|
-
{include : "attributes"},
|
855
|
-
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
|
856
|
-
]
|
857
|
-
});
|
858
|
-
|
859
|
-
this.$rules[tag + "-end"] = [
|
860
|
-
{include : "attributes"},
|
861
|
-
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
|
862
|
-
onMatch : function(value, currentState, stack) {
|
863
|
-
stack.splice(0);
|
864
|
-
return this.token;
|
865
|
-
}}
|
866
|
-
]
|
867
|
-
|
868
|
-
this.embedRules(HighlightRules, prefix, [{
|
869
|
-
token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
|
870
|
-
regex : "(</)(" + tag + "(?=\\s|>|$))",
|
871
|
-
next: tag + "-end"
|
872
|
-
}, {
|
873
|
-
token: "string.cdata.xml",
|
874
|
-
regex : "<\\!\\[CDATA\\["
|
875
|
-
}, {
|
876
|
-
token: "string.cdata.xml",
|
877
|
-
regex : "\\]\\]>"
|
878
|
-
}]);
|
879
|
-
};
|
880
|
-
|
881
|
-
}).call(TextHighlightRules.prototype);
|
882
|
-
|
883
|
-
oop.inherits(XmlHighlightRules, TextHighlightRules);
|
884
|
-
|
885
|
-
exports.XmlHighlightRules = XmlHighlightRules;
|
886
|
-
});
|
887
|
-
|
888
|
-
define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
|
889
|
-
"use strict";
|
890
|
-
|
891
|
-
var oop = require("../lib/oop");
|
892
|
-
var lang = require("../lib/lang");
|
893
|
-
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
|
894
|
-
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
|
895
|
-
var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
|
896
|
-
|
897
|
-
var tagMap = lang.createMap({
|
898
|
-
a : 'anchor',
|
899
|
-
button : 'form',
|
900
|
-
form : 'form',
|
901
|
-
img : 'image',
|
902
|
-
input : 'form',
|
903
|
-
label : 'form',
|
904
|
-
option : 'form',
|
905
|
-
script : 'script',
|
906
|
-
select : 'form',
|
907
|
-
textarea : 'form',
|
908
|
-
style : 'style',
|
909
|
-
table : 'table',
|
910
|
-
tbody : 'table',
|
911
|
-
td : 'table',
|
912
|
-
tfoot : 'table',
|
913
|
-
th : 'table',
|
914
|
-
tr : 'table'
|
915
|
-
});
|
916
|
-
|
917
|
-
var HtmlHighlightRules = function() {
|
918
|
-
XmlHighlightRules.call(this);
|
919
|
-
|
920
|
-
this.addRules({
|
921
|
-
attributes: [{
|
922
|
-
include : "tag_whitespace"
|
923
|
-
}, {
|
924
|
-
token : "entity.other.attribute-name.xml",
|
925
|
-
regex : "[-_a-zA-Z0-9:.]+"
|
926
|
-
}, {
|
927
|
-
token : "keyword.operator.attribute-equals.xml",
|
928
|
-
regex : "=",
|
929
|
-
push : [{
|
930
|
-
include: "tag_whitespace"
|
931
|
-
}, {
|
932
|
-
token : "string.unquoted.attribute-value.html",
|
933
|
-
regex : "[^<>='\"`\\s]+",
|
934
|
-
next : "pop"
|
935
|
-
}, {
|
936
|
-
token : "empty",
|
937
|
-
regex : "",
|
938
|
-
next : "pop"
|
939
|
-
}]
|
940
|
-
}, {
|
941
|
-
include : "attribute_value"
|
942
|
-
}],
|
943
|
-
tag: [{
|
944
|
-
token : function(start, tag) {
|
945
|
-
var group = tagMap[tag];
|
946
|
-
return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
|
947
|
-
"meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
|
948
|
-
},
|
949
|
-
regex : "(</?)([-_a-zA-Z0-9:.]+)",
|
950
|
-
next: "tag_stuff"
|
951
|
-
}],
|
952
|
-
tag_stuff: [
|
953
|
-
{include : "attributes"},
|
954
|
-
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
|
955
|
-
],
|
956
|
-
});
|
957
|
-
|
958
|
-
this.embedTagRules(CssHighlightRules, "css-", "style");
|
959
|
-
this.embedTagRules(new JavaScriptHighlightRules({noJSX: true}).getRules(), "js-", "script");
|
960
|
-
|
961
|
-
if (this.constructor === HtmlHighlightRules)
|
962
|
-
this.normalizeRules();
|
963
|
-
};
|
964
|
-
|
965
|
-
oop.inherits(HtmlHighlightRules, XmlHighlightRules);
|
966
|
-
|
967
|
-
exports.HtmlHighlightRules = HtmlHighlightRules;
|
968
|
-
});
|
969
|
-
|
970
|
-
define("ace/mode/swig",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
971
|
-
"use strict";
|
972
|
-
|
973
|
-
var oop = require("../lib/oop");
|
974
|
-
var lang = require("../lib/lang");
|
975
|
-
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
|
976
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
977
|
-
|
978
|
-
var SwigHighlightRules = function() {
|
979
|
-
HtmlHighlightRules.call(this);
|
980
|
-
|
981
|
-
var tags = "autoescape|block|else|elif|extends|filter|for|if|import|include|macro|parent|raw|set|spaceless";
|
982
|
-
tags = tags + "|end" + tags.replace(/\|/g, "|end");
|
983
|
-
var filters = "addslashes|capitalize|date|default|escape|first|groupBy|join|json|last|lower|raw|replace|reverse|safe|sort|striptags|title|uniq|upper|url_encode|url_decode";
|
984
|
-
var special = "first|last|index|index0|revindex|revindex0|key"
|
985
|
-
var constants = "null|none|true|false|loop";
|
986
|
-
var operators = "in|is|and|or|not|as|with|only";
|
987
|
-
|
988
|
-
var keywordMapper = this.createKeywordMapper({
|
989
|
-
"keyword.control.swig": tags,
|
990
|
-
"support.function.swig": filters+"|"+special,
|
991
|
-
"keyword.operator.swig": operators,
|
992
|
-
"constant.language.swig": constants,
|
993
|
-
}, "identifier");
|
994
|
-
for (var rule in this.$rules) {
|
995
|
-
this.$rules[rule].unshift({
|
996
|
-
token : "variable.other.readwrite.local.swig",
|
997
|
-
regex : "\\{\\{-?",
|
998
|
-
push : "swig-start"
|
999
|
-
}, {
|
1000
|
-
token : "meta.tag.swig",
|
1001
|
-
regex : "\\{%-?",
|
1002
|
-
push : "swig-start"
|
1003
|
-
}, {
|
1004
|
-
token : "comment.block.swig",
|
1005
|
-
regex : "\\{#-?",
|
1006
|
-
push : "swig-comment"
|
1007
|
-
});
|
1008
|
-
}
|
1009
|
-
this.$rules["swig-comment"] = [{
|
1010
|
-
token : "comment.block.swig",
|
1011
|
-
regex : ".*-?#}",
|
1012
|
-
next : "pop"
|
1013
|
-
}];
|
1014
|
-
|
1015
|
-
this.$rules["swig-start"] = [{
|
1016
|
-
token : "variable.other.readwrite.local.swig",
|
1017
|
-
regex : "-?\\}\\}",
|
1018
|
-
next : "pop"
|
1019
|
-
}, {
|
1020
|
-
token : "meta.tag.swig",
|
1021
|
-
regex : "-?%\\}",
|
1022
|
-
next : "pop"
|
1023
|
-
}, {
|
1024
|
-
token : "string",
|
1025
|
-
regex : "'",
|
1026
|
-
next : "swig-qstring"
|
1027
|
-
}, {
|
1028
|
-
token : "string",
|
1029
|
-
regex : '"',
|
1030
|
-
next : "swig-qqstring"
|
1031
|
-
}, {
|
1032
|
-
token : "constant.numeric", // hex
|
1033
|
-
regex : "0[xX][0-9a-fA-F]+\\b"
|
1034
|
-
}, {
|
1035
|
-
token : "constant.numeric", // float
|
1036
|
-
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
1037
|
-
}, {
|
1038
|
-
token : "constant.language.boolean",
|
1039
|
-
regex : "(?:true|false)\\b"
|
1040
|
-
}, {
|
1041
|
-
token : keywordMapper,
|
1042
|
-
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
1043
|
-
}, {
|
1044
|
-
token : "keyword.operator.assignment",
|
1045
|
-
regex : "=|~"
|
1046
|
-
}, {
|
1047
|
-
token : "keyword.operator.comparison",
|
1048
|
-
regex : "==|!=|<|>|>=|<=|==="
|
1049
|
-
}, {
|
1050
|
-
token : "keyword.operator.arithmetic",
|
1051
|
-
regex : "\\+|-|/|%|//|\\*|\\*\\*"
|
1052
|
-
}, {
|
1053
|
-
token : "keyword.operator.other",
|
1054
|
-
regex : "\\.\\.|\\|"
|
1055
|
-
}, {
|
1056
|
-
token : "punctuation.operator",
|
1057
|
-
regex : /\?|\:|\,|\;|\./
|
1058
|
-
}, {
|
1059
|
-
token : "paren.lparen",
|
1060
|
-
regex : /[\[\({]/
|
1061
|
-
}, {
|
1062
|
-
token : "paren.rparen",
|
1063
|
-
regex : /[\])}]/
|
1064
|
-
}, {
|
1065
|
-
token : "text",
|
1066
|
-
regex : "\\s+"
|
1067
|
-
} ];
|
1068
|
-
|
1069
|
-
this.$rules["swig-qqstring"] = [{
|
1070
|
-
token : "constant.language.escape",
|
1071
|
-
regex : /\\[\\"$#ntr]|#{[^"}]*}/
|
1072
|
-
}, {
|
1073
|
-
token : "string",
|
1074
|
-
regex : '"',
|
1075
|
-
next : "swig-start"
|
1076
|
-
}, {
|
1077
|
-
defaultToken : "string"
|
1078
|
-
}
|
1079
|
-
];
|
1080
|
-
|
1081
|
-
this.$rules["swig-qstring"] = [{
|
1082
|
-
token : "constant.language.escape",
|
1083
|
-
regex : /\\[\\'ntr]}/
|
1084
|
-
}, {
|
1085
|
-
token : "string",
|
1086
|
-
regex : "'",
|
1087
|
-
next : "swig-start"
|
1088
|
-
}, {
|
1089
|
-
defaultToken : "string"
|
1090
|
-
}
|
1091
|
-
];
|
1092
|
-
|
1093
|
-
this.normalizeRules();
|
1094
|
-
};
|
1095
|
-
|
1096
|
-
oop.inherits(SwigHighlightRules, TextHighlightRules);
|
1097
|
-
|
1098
|
-
exports.SwigHighlightRules = SwigHighlightRules;
|
1099
|
-
});
|