ace-rails-ap 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +1 -1
- data/lib/ace/rails/version.rb +1 -1
- data/vendor/assets/javascripts/ace/ace.js +6911 -5290
- data/vendor/assets/javascripts/ace/ext-chromevox.js +537 -0
- data/vendor/assets/javascripts/ace/ext-elastic_tabstops_lite.js +301 -0
- data/vendor/assets/javascripts/ace/ext-emmet.js +1109 -0
- data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +207 -0
- data/vendor/assets/javascripts/ace/ext-language_tools.js +1665 -0
- data/vendor/assets/javascripts/ace/ext-modelist.js +168 -0
- data/vendor/assets/javascripts/ace/ext-old_ie.js +500 -0
- data/vendor/assets/javascripts/ace/ext-options.js +252 -0
- data/vendor/assets/javascripts/ace/ext-searchbox.js +421 -0
- data/vendor/assets/javascripts/ace/ext-settings_menu.js +632 -0
- data/vendor/assets/javascripts/ace/ext-spellcheck.js +68 -0
- data/vendor/assets/javascripts/ace/ext-split.js +271 -0
- data/vendor/assets/javascripts/ace/ext-static_highlight.js +178 -0
- data/vendor/assets/javascripts/ace/ext-statusbar.js +47 -0
- data/vendor/assets/javascripts/ace/ext-textarea.js +478 -0
- data/vendor/assets/javascripts/ace/ext-themelist.js +86 -0
- data/vendor/assets/javascripts/ace/ext-whitespace.js +206 -0
- data/vendor/assets/javascripts/ace/keybinding-emacs.js +822 -131
- data/vendor/assets/javascripts/ace/keybinding-vim.js +382 -258
- data/vendor/assets/javascripts/ace/mode-abap.js +261 -0
- data/vendor/assets/javascripts/ace/mode-actionscript.js +257 -0
- data/vendor/assets/javascripts/ace/mode-ada.js +118 -0
- data/vendor/assets/javascripts/ace/mode-asciidoc.js +373 -0
- data/vendor/assets/javascripts/ace/mode-assembly_x86.js +217 -0
- data/vendor/assets/javascripts/ace/mode-autohotkey.js +225 -0
- data/vendor/assets/javascripts/ace/mode-batchfile.js +213 -0
- data/vendor/assets/javascripts/ace/mode-c9search.js +144 -124
- data/vendor/assets/javascripts/ace/mode-c_cpp.js +296 -254
- data/vendor/assets/javascripts/ace/mode-clojure.js +113 -177
- data/vendor/assets/javascripts/ace/mode-cobol.js +125 -0
- data/vendor/assets/javascripts/ace/mode-coffee.js +152 -235
- data/vendor/assets/javascripts/ace/mode-coldfusion.js +823 -835
- data/vendor/assets/javascripts/ace/mode-csharp.js +325 -187
- data/vendor/assets/javascripts/ace/mode-css.js +583 -297
- data/vendor/assets/javascripts/ace/mode-curly.js +2423 -0
- data/vendor/assets/javascripts/ace/mode-d.js +492 -0
- data/vendor/assets/javascripts/ace/mode-dart.js +993 -0
- data/vendor/assets/javascripts/ace/mode-diff.js +124 -204
- data/vendor/assets/javascripts/ace/mode-django.js +2448 -0
- data/vendor/assets/javascripts/ace/mode-dot.js +361 -0
- data/vendor/assets/javascripts/ace/mode-ejs.js +2817 -0
- data/vendor/assets/javascripts/ace/mode-erlang.js +987 -0
- data/vendor/assets/javascripts/ace/mode-forth.js +280 -0
- data/vendor/assets/javascripts/ace/mode-ftl.js +1061 -0
- data/vendor/assets/javascripts/ace/mode-glsl.js +313 -275
- data/vendor/assets/javascripts/ace/mode-golang.js +268 -275
- data/vendor/assets/javascripts/ace/mode-groovy.js +347 -492
- data/vendor/assets/javascripts/ace/mode-haml.js +498 -0
- data/vendor/assets/javascripts/ace/mode-handlebars.js +2433 -0
- data/vendor/assets/javascripts/ace/mode-haskell.js +362 -0
- data/vendor/assets/javascripts/ace/mode-haxe.js +226 -202
- data/vendor/assets/javascripts/ace/mode-html.js +1099 -802
- data/vendor/assets/javascripts/ace/mode-html_completions.js +309 -0
- data/vendor/assets/javascripts/ace/mode-html_ruby.js +2822 -0
- data/vendor/assets/javascripts/ace/mode-ini.js +185 -0
- data/vendor/assets/javascripts/ace/mode-jack.js +653 -0
- data/vendor/assets/javascripts/ace/mode-jade.js +2081 -0
- data/vendor/assets/javascripts/ace/mode-java.js +339 -488
- data/vendor/assets/javascripts/ace/mode-javascript.js +342 -478
- data/vendor/assets/javascripts/ace/mode-json.js +215 -178
- data/vendor/assets/javascripts/ace/mode-jsoniq.js +2761 -0
- data/vendor/assets/javascripts/ace/mode-jsp.js +1553 -0
- data/vendor/assets/javascripts/ace/mode-jsx.js +325 -289
- data/vendor/assets/javascripts/ace/mode-julia.js +286 -0
- data/vendor/assets/javascripts/ace/mode-latex.js +141 -46
- data/vendor/assets/javascripts/ace/mode-less.js +493 -151
- data/vendor/assets/javascripts/ace/mode-liquid.js +594 -656
- data/vendor/assets/javascripts/ace/mode-lisp.js +137 -0
- data/vendor/assets/javascripts/ace/mode-livescript.js +288 -0
- data/vendor/assets/javascripts/ace/mode-logiql.js +669 -0
- data/vendor/assets/javascripts/ace/mode-lsl.js +890 -0
- data/vendor/assets/javascripts/ace/mode-lua.js +274 -368
- data/vendor/assets/javascripts/ace/mode-luapage.js +1331 -1107
- data/vendor/assets/javascripts/ace/mode-lucene.js +64 -0
- data/vendor/assets/javascripts/ace/mode-makefile.js +332 -0
- data/vendor/assets/javascripts/ace/mode-markdown.js +1303 -948
- data/vendor/assets/javascripts/ace/mode-matlab.js +230 -0
- data/vendor/assets/javascripts/ace/mode-mushcode.js +705 -0
- data/vendor/assets/javascripts/ace/mode-mushcode_high_rules.js +569 -0
- data/vendor/assets/javascripts/ace/mode-mysql.js +185 -0
- data/vendor/assets/javascripts/ace/mode-nix.js +935 -0
- data/vendor/assets/javascripts/ace/mode-objectivec.js +699 -0
- data/vendor/assets/javascripts/ace/mode-ocaml.js +44 -63
- data/vendor/assets/javascripts/ace/mode-pascal.js +233 -0
- data/vendor/assets/javascripts/ace/mode-perl.js +116 -189
- data/vendor/assets/javascripts/ace/mode-pgsql.js +886 -500
- data/vendor/assets/javascripts/ace/mode-php.js +1158 -380
- data/vendor/assets/javascripts/ace/mode-plain_text.js +56 -0
- data/vendor/assets/javascripts/ace/mode-powershell.js +222 -167
- data/vendor/assets/javascripts/ace/mode-prolog.js +354 -0
- data/vendor/assets/javascripts/ace/mode-properties.js +100 -0
- data/vendor/assets/javascripts/ace/mode-protobuf.js +885 -0
- data/vendor/assets/javascripts/ace/mode-python.js +99 -201
- data/vendor/assets/javascripts/ace/mode-r.js +337 -0
- data/vendor/assets/javascripts/ace/mode-rdoc.js +210 -0
- data/vendor/assets/javascripts/ace/mode-rhtml.js +2663 -0
- data/vendor/assets/javascripts/ace/mode-ruby.js +262 -136
- data/vendor/assets/javascripts/ace/mode-rust.js +245 -0
- data/vendor/assets/javascripts/ace/mode-sass.js +443 -0
- data/vendor/assets/javascripts/ace/mode-scad.js +225 -240
- data/vendor/assets/javascripts/ace/mode-scala.js +340 -494
- data/vendor/assets/javascripts/ace/mode-scheme.js +143 -0
- data/vendor/assets/javascripts/ace/mode-scss.js +499 -157
- data/vendor/assets/javascripts/ace/mode-sh.js +180 -110
- data/vendor/assets/javascripts/ace/mode-sjs.js +1154 -0
- data/vendor/assets/javascripts/ace/mode-snippets.js +198 -0
- data/vendor/assets/javascripts/ace/mode-soy_template.js +2707 -0
- data/vendor/assets/javascripts/ace/mode-space.js +160 -0
- data/vendor/assets/javascripts/ace/mode-sql.js +48 -69
- data/vendor/assets/javascripts/ace/mode-stylus.js +447 -0
- data/vendor/assets/javascripts/ace/mode-svg.js +552 -605
- data/vendor/assets/javascripts/ace/mode-tcl.js +139 -98
- data/vendor/assets/javascripts/ace/mode-tex.js +187 -0
- data/vendor/assets/javascripts/ace/mode-textile.js +29 -40
- data/vendor/assets/javascripts/ace/mode-tmsnippet.js +200 -0
- data/vendor/assets/javascripts/ace/mode-toml.js +177 -0
- data/vendor/assets/javascripts/ace/mode-twig.js +2228 -0
- data/vendor/assets/javascripts/ace/mode-typescript.js +1018 -0
- data/vendor/assets/javascripts/ace/mode-vbscript.js +250 -0
- data/vendor/assets/javascripts/ace/mode-velocity.js +1621 -0
- data/vendor/assets/javascripts/ace/mode-verilog.js +127 -0
- data/vendor/assets/javascripts/ace/mode-vhdl.js +139 -0
- data/vendor/assets/javascripts/ace/mode-xml.js +350 -242
- data/vendor/assets/javascripts/ace/mode-xquery.js +2490 -300
- data/vendor/assets/javascripts/ace/mode-yaml.js +146 -45
- data/vendor/assets/javascripts/ace/theme-ambiance.js +202 -0
- data/vendor/assets/javascripts/ace/theme-chaos.js +179 -0
- data/vendor/assets/javascripts/ace/theme-chrome.js +97 -153
- data/vendor/assets/javascripts/ace/theme-clouds.js +78 -119
- data/vendor/assets/javascripts/ace/theme-clouds_midnight.js +79 -120
- data/vendor/assets/javascripts/ace/theme-cobalt.js +89 -140
- data/vendor/assets/javascripts/ace/theme-crimson_editor.js +93 -145
- data/vendor/assets/javascripts/ace/theme-dawn.js +84 -143
- data/vendor/assets/javascripts/ace/theme-dreamweaver.js +99 -162
- data/vendor/assets/javascripts/ace/theme-eclipse.js +78 -111
- data/vendor/assets/javascripts/ace/theme-github.js +70 -121
- data/vendor/assets/javascripts/ace/theme-idle_fingers.js +75 -134
- data/vendor/assets/javascripts/ace/theme-kr.js +135 -0
- data/vendor/assets/javascripts/ace/theme-merbivore.js +80 -143
- data/vendor/assets/javascripts/ace/theme-merbivore_soft.js +81 -149
- data/vendor/assets/javascripts/ace/theme-mono_industrial.js +87 -146
- data/vendor/assets/javascripts/ace/theme-monokai.js +88 -146
- data/vendor/assets/javascripts/ace/theme-pastel_on_dark.js +82 -142
- data/vendor/assets/javascripts/ace/theme-solarized_dark.js +83 -144
- data/vendor/assets/javascripts/ace/theme-solarized_light.js +76 -133
- data/vendor/assets/javascripts/ace/theme-terminal.js +145 -0
- data/vendor/assets/javascripts/ace/theme-textmate.js +101 -158
- data/vendor/assets/javascripts/ace/theme-tomorrow.js +89 -163
- data/vendor/assets/javascripts/ace/theme-tomorrow_night.js +89 -163
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue.js +89 -165
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright.js +101 -162
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties.js +90 -160
- data/vendor/assets/javascripts/ace/theme-twilight.js +87 -158
- data/vendor/assets/javascripts/ace/theme-vibrant_ink.js +75 -140
- data/vendor/assets/javascripts/ace/theme-xcode.js +120 -0
- data/vendor/assets/javascripts/ace/worker-coffee.js +3049 -2665
- data/vendor/assets/javascripts/ace/worker-css.js +1779 -4376
- data/vendor/assets/javascripts/ace/worker-javascript.js +8701 -9008
- data/vendor/assets/javascripts/ace/worker-json.js +709 -1340
- data/vendor/assets/javascripts/ace/worker-lua.js +3525 -0
- data/vendor/assets/javascripts/ace/worker-php.js +6893 -0
- data/vendor/assets/javascripts/ace/worker-xquery.js +19924 -64507
- metadata +100 -17
@@ -0,0 +1,987 @@
|
|
1
|
+
/* ***** BEGIN LICENSE BLOCK *****
|
2
|
+
* Distributed under the BSD license:
|
3
|
+
*
|
4
|
+
* Copyright (c) 2012, Ajax.org B.V.
|
5
|
+
* All rights reserved.
|
6
|
+
*
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
8
|
+
* modification, are permitted provided that the following conditions are met:
|
9
|
+
* * Redistributions of source code must retain the above copyright
|
10
|
+
* notice, this list of conditions and the following disclaimer.
|
11
|
+
* * Redistributions in binary form must reproduce the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer in the
|
13
|
+
* documentation and/or other materials provided with the distribution.
|
14
|
+
* * Neither the name of Ajax.org B.V. nor the
|
15
|
+
* names of its contributors may be used to endorse or promote products
|
16
|
+
* derived from this software without specific prior written permission.
|
17
|
+
*
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
19
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
20
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21
|
+
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
22
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
23
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
24
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
25
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
26
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
27
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
28
|
+
*
|
29
|
+
* ***** END LICENSE BLOCK ***** */
|
30
|
+
|
31
|
+
define('ace/mode/erlang', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/erlang_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
|
32
|
+
|
33
|
+
|
34
|
+
var oop = require("../lib/oop");
|
35
|
+
var TextMode = require("./text").Mode;
|
36
|
+
var Tokenizer = require("../tokenizer").Tokenizer;
|
37
|
+
var ErlangHighlightRules = require("./erlang_highlight_rules").ErlangHighlightRules;
|
38
|
+
var FoldMode = require("./folding/cstyle").FoldMode;
|
39
|
+
|
40
|
+
var Mode = function() {
|
41
|
+
this.HighlightRules = ErlangHighlightRules;
|
42
|
+
this.foldingRules = new FoldMode();
|
43
|
+
};
|
44
|
+
oop.inherits(Mode, TextMode);
|
45
|
+
|
46
|
+
(function() {
|
47
|
+
this.lineCommentStart = "%";
|
48
|
+
this.blockComment = {start: "/*", end: "*/"};
|
49
|
+
this.$id = "ace/mode/erlang";
|
50
|
+
}).call(Mode.prototype);
|
51
|
+
|
52
|
+
exports.Mode = Mode;
|
53
|
+
});
|
54
|
+
|
55
|
+
define('ace/mode/erlang_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
56
|
+
|
57
|
+
|
58
|
+
var oop = require("../lib/oop");
|
59
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
60
|
+
|
61
|
+
var ErlangHighlightRules = function() {
|
62
|
+
|
63
|
+
this.$rules = { start:
|
64
|
+
[ { include: '#module-directive' },
|
65
|
+
{ include: '#import-export-directive' },
|
66
|
+
{ include: '#behaviour-directive' },
|
67
|
+
{ include: '#record-directive' },
|
68
|
+
{ include: '#define-directive' },
|
69
|
+
{ include: '#macro-directive' },
|
70
|
+
{ include: '#directive' },
|
71
|
+
{ include: '#function' },
|
72
|
+
{ include: '#everything-else' } ],
|
73
|
+
'#atom':
|
74
|
+
[ { token: 'punctuation.definition.symbol.begin.erlang',
|
75
|
+
regex: '\'',
|
76
|
+
push:
|
77
|
+
[ { token: 'punctuation.definition.symbol.end.erlang',
|
78
|
+
regex: '\'',
|
79
|
+
next: 'pop' },
|
80
|
+
{ token:
|
81
|
+
[ 'punctuation.definition.escape.erlang',
|
82
|
+
'constant.other.symbol.escape.erlang',
|
83
|
+
'punctuation.definition.escape.erlang',
|
84
|
+
'constant.other.symbol.escape.erlang',
|
85
|
+
'constant.other.symbol.escape.erlang' ],
|
86
|
+
regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' },
|
87
|
+
{ token: 'invalid.illegal.atom.erlang', regex: '\\\\\\^?.?' },
|
88
|
+
{ defaultToken: 'constant.other.symbol.quoted.single.erlang' } ] },
|
89
|
+
{ token: 'constant.other.symbol.unquoted.erlang',
|
90
|
+
regex: '[a-z][a-zA-Z\\d@_]*' } ],
|
91
|
+
'#behaviour-directive':
|
92
|
+
[ { token:
|
93
|
+
[ 'meta.directive.behaviour.erlang',
|
94
|
+
'punctuation.section.directive.begin.erlang',
|
95
|
+
'meta.directive.behaviour.erlang',
|
96
|
+
'keyword.control.directive.behaviour.erlang',
|
97
|
+
'meta.directive.behaviour.erlang',
|
98
|
+
'punctuation.definition.parameters.begin.erlang',
|
99
|
+
'meta.directive.behaviour.erlang',
|
100
|
+
'entity.name.type.class.behaviour.definition.erlang',
|
101
|
+
'meta.directive.behaviour.erlang',
|
102
|
+
'punctuation.definition.parameters.end.erlang',
|
103
|
+
'meta.directive.behaviour.erlang',
|
104
|
+
'punctuation.section.directive.end.erlang' ],
|
105
|
+
regex: '^(\\s*)(-)(\\s*)(behaviour)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' } ],
|
106
|
+
'#binary':
|
107
|
+
[ { token: 'punctuation.definition.binary.begin.erlang',
|
108
|
+
regex: '<<',
|
109
|
+
push:
|
110
|
+
[ { token: 'punctuation.definition.binary.end.erlang',
|
111
|
+
regex: '>>',
|
112
|
+
next: 'pop' },
|
113
|
+
{ token:
|
114
|
+
[ 'punctuation.separator.binary.erlang',
|
115
|
+
'punctuation.separator.value-size.erlang' ],
|
116
|
+
regex: '(,)|(:)' },
|
117
|
+
{ include: '#internal-type-specifiers' },
|
118
|
+
{ include: '#everything-else' },
|
119
|
+
{ defaultToken: 'meta.structure.binary.erlang' } ] } ],
|
120
|
+
'#character':
|
121
|
+
[ { token:
|
122
|
+
[ 'punctuation.definition.character.erlang',
|
123
|
+
'punctuation.definition.escape.erlang',
|
124
|
+
'constant.character.escape.erlang',
|
125
|
+
'punctuation.definition.escape.erlang',
|
126
|
+
'constant.character.escape.erlang',
|
127
|
+
'constant.character.escape.erlang' ],
|
128
|
+
regex: '(\\$)(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' },
|
129
|
+
{ token: 'invalid.illegal.character.erlang',
|
130
|
+
regex: '\\$\\\\\\^?.?' },
|
131
|
+
{ token:
|
132
|
+
[ 'punctuation.definition.character.erlang',
|
133
|
+
'constant.character.erlang' ],
|
134
|
+
regex: '(\\$)(\\S)' },
|
135
|
+
{ token: 'invalid.illegal.character.erlang', regex: '\\$.?' } ],
|
136
|
+
'#comment':
|
137
|
+
[ { token: 'punctuation.definition.comment.erlang',
|
138
|
+
regex: '%.*$',
|
139
|
+
push_:
|
140
|
+
[ { token: 'comment.line.percentage.erlang',
|
141
|
+
regex: '$',
|
142
|
+
next: 'pop' },
|
143
|
+
{ defaultToken: 'comment.line.percentage.erlang' } ] } ],
|
144
|
+
'#define-directive':
|
145
|
+
[ { token:
|
146
|
+
[ 'meta.directive.define.erlang',
|
147
|
+
'punctuation.section.directive.begin.erlang',
|
148
|
+
'meta.directive.define.erlang',
|
149
|
+
'keyword.control.directive.define.erlang',
|
150
|
+
'meta.directive.define.erlang',
|
151
|
+
'punctuation.definition.parameters.begin.erlang',
|
152
|
+
'meta.directive.define.erlang',
|
153
|
+
'entity.name.function.macro.definition.erlang',
|
154
|
+
'meta.directive.define.erlang',
|
155
|
+
'punctuation.separator.parameters.erlang' ],
|
156
|
+
regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(,)',
|
157
|
+
push:
|
158
|
+
[ { token:
|
159
|
+
[ 'punctuation.definition.parameters.end.erlang',
|
160
|
+
'meta.directive.define.erlang',
|
161
|
+
'punctuation.section.directive.end.erlang' ],
|
162
|
+
regex: '(\\))(\\s*)(\\.)',
|
163
|
+
next: 'pop' },
|
164
|
+
{ include: '#everything-else' },
|
165
|
+
{ defaultToken: 'meta.directive.define.erlang' } ] },
|
166
|
+
{ token: 'meta.directive.define.erlang',
|
167
|
+
regex: '(?=^\\s*-\\s*define\\s*\\(\\s*[a-zA-Z\\d@_]+\\s*\\()',
|
168
|
+
push:
|
169
|
+
[ { token:
|
170
|
+
[ 'punctuation.definition.parameters.end.erlang',
|
171
|
+
'meta.directive.define.erlang',
|
172
|
+
'punctuation.section.directive.end.erlang' ],
|
173
|
+
regex: '(\\))(\\s*)(\\.)',
|
174
|
+
next: 'pop' },
|
175
|
+
{ token:
|
176
|
+
[ 'text',
|
177
|
+
'punctuation.section.directive.begin.erlang',
|
178
|
+
'text',
|
179
|
+
'keyword.control.directive.define.erlang',
|
180
|
+
'text',
|
181
|
+
'punctuation.definition.parameters.begin.erlang',
|
182
|
+
'text',
|
183
|
+
'entity.name.function.macro.definition.erlang',
|
184
|
+
'text',
|
185
|
+
'punctuation.definition.parameters.begin.erlang' ],
|
186
|
+
regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\()',
|
187
|
+
push:
|
188
|
+
[ { token:
|
189
|
+
[ 'punctuation.definition.parameters.end.erlang',
|
190
|
+
'text',
|
191
|
+
'punctuation.separator.parameters.erlang' ],
|
192
|
+
regex: '(\\))(\\s*)(,)',
|
193
|
+
next: 'pop' },
|
194
|
+
{ token: 'punctuation.separator.parameters.erlang', regex: ',' },
|
195
|
+
{ include: '#everything-else' } ] },
|
196
|
+
{ token: 'punctuation.separator.define.erlang',
|
197
|
+
regex: '\\|\\||\\||:|;|,|\\.|->' },
|
198
|
+
{ include: '#everything-else' },
|
199
|
+
{ defaultToken: 'meta.directive.define.erlang' } ] } ],
|
200
|
+
'#directive':
|
201
|
+
[ { token:
|
202
|
+
[ 'meta.directive.erlang',
|
203
|
+
'punctuation.section.directive.begin.erlang',
|
204
|
+
'meta.directive.erlang',
|
205
|
+
'keyword.control.directive.erlang',
|
206
|
+
'meta.directive.erlang',
|
207
|
+
'punctuation.definition.parameters.begin.erlang' ],
|
208
|
+
regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\(?)',
|
209
|
+
push:
|
210
|
+
[ { token:
|
211
|
+
[ 'punctuation.definition.parameters.end.erlang',
|
212
|
+
'meta.directive.erlang',
|
213
|
+
'punctuation.section.directive.end.erlang' ],
|
214
|
+
regex: '(\\)?)(\\s*)(\\.)',
|
215
|
+
next: 'pop' },
|
216
|
+
{ include: '#everything-else' },
|
217
|
+
{ defaultToken: 'meta.directive.erlang' } ] },
|
218
|
+
{ token:
|
219
|
+
[ 'meta.directive.erlang',
|
220
|
+
'punctuation.section.directive.begin.erlang',
|
221
|
+
'meta.directive.erlang',
|
222
|
+
'keyword.control.directive.erlang',
|
223
|
+
'meta.directive.erlang',
|
224
|
+
'punctuation.section.directive.end.erlang' ],
|
225
|
+
regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\.)' } ],
|
226
|
+
'#everything-else':
|
227
|
+
[ { include: '#comment' },
|
228
|
+
{ include: '#record-usage' },
|
229
|
+
{ include: '#macro-usage' },
|
230
|
+
{ include: '#expression' },
|
231
|
+
{ include: '#keyword' },
|
232
|
+
{ include: '#textual-operator' },
|
233
|
+
{ include: '#function-call' },
|
234
|
+
{ include: '#tuple' },
|
235
|
+
{ include: '#list' },
|
236
|
+
{ include: '#binary' },
|
237
|
+
{ include: '#parenthesized-expression' },
|
238
|
+
{ include: '#character' },
|
239
|
+
{ include: '#number' },
|
240
|
+
{ include: '#atom' },
|
241
|
+
{ include: '#string' },
|
242
|
+
{ include: '#symbolic-operator' },
|
243
|
+
{ include: '#variable' } ],
|
244
|
+
'#expression':
|
245
|
+
[ { token: 'keyword.control.if.erlang',
|
246
|
+
regex: '\\bif\\b',
|
247
|
+
push:
|
248
|
+
[ { token: 'keyword.control.end.erlang',
|
249
|
+
regex: '\\bend\\b',
|
250
|
+
next: 'pop' },
|
251
|
+
{ include: '#internal-expression-punctuation' },
|
252
|
+
{ include: '#everything-else' },
|
253
|
+
{ defaultToken: 'meta.expression.if.erlang' } ] },
|
254
|
+
{ token: 'keyword.control.case.erlang',
|
255
|
+
regex: '\\bcase\\b',
|
256
|
+
push:
|
257
|
+
[ { token: 'keyword.control.end.erlang',
|
258
|
+
regex: '\\bend\\b',
|
259
|
+
next: 'pop' },
|
260
|
+
{ include: '#internal-expression-punctuation' },
|
261
|
+
{ include: '#everything-else' },
|
262
|
+
{ defaultToken: 'meta.expression.case.erlang' } ] },
|
263
|
+
{ token: 'keyword.control.receive.erlang',
|
264
|
+
regex: '\\breceive\\b',
|
265
|
+
push:
|
266
|
+
[ { token: 'keyword.control.end.erlang',
|
267
|
+
regex: '\\bend\\b',
|
268
|
+
next: 'pop' },
|
269
|
+
{ include: '#internal-expression-punctuation' },
|
270
|
+
{ include: '#everything-else' },
|
271
|
+
{ defaultToken: 'meta.expression.receive.erlang' } ] },
|
272
|
+
{ token:
|
273
|
+
[ 'keyword.control.fun.erlang',
|
274
|
+
'text',
|
275
|
+
'entity.name.type.class.module.erlang',
|
276
|
+
'text',
|
277
|
+
'punctuation.separator.module-function.erlang',
|
278
|
+
'text',
|
279
|
+
'entity.name.function.erlang',
|
280
|
+
'text',
|
281
|
+
'punctuation.separator.function-arity.erlang' ],
|
282
|
+
regex: '\\b(fun)(\\s*)(?:([a-z][a-zA-Z\\d@_]*)(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*)(\\s*)(/)' },
|
283
|
+
{ token: 'keyword.control.fun.erlang',
|
284
|
+
regex: '\\bfun\\b',
|
285
|
+
push:
|
286
|
+
[ { token: 'keyword.control.end.erlang',
|
287
|
+
regex: '\\bend\\b',
|
288
|
+
next: 'pop' },
|
289
|
+
{ token: 'text',
|
290
|
+
regex: '(?=\\()',
|
291
|
+
push:
|
292
|
+
[ { token: 'punctuation.separator.clauses.erlang',
|
293
|
+
regex: ';|(?=\\bend\\b)',
|
294
|
+
next: 'pop' },
|
295
|
+
{ include: '#internal-function-parts' } ] },
|
296
|
+
{ include: '#everything-else' },
|
297
|
+
{ defaultToken: 'meta.expression.fun.erlang' } ] },
|
298
|
+
{ token: 'keyword.control.try.erlang',
|
299
|
+
regex: '\\btry\\b',
|
300
|
+
push:
|
301
|
+
[ { token: 'keyword.control.end.erlang',
|
302
|
+
regex: '\\bend\\b',
|
303
|
+
next: 'pop' },
|
304
|
+
{ include: '#internal-expression-punctuation' },
|
305
|
+
{ include: '#everything-else' },
|
306
|
+
{ defaultToken: 'meta.expression.try.erlang' } ] },
|
307
|
+
{ token: 'keyword.control.begin.erlang',
|
308
|
+
regex: '\\bbegin\\b',
|
309
|
+
push:
|
310
|
+
[ { token: 'keyword.control.end.erlang',
|
311
|
+
regex: '\\bend\\b',
|
312
|
+
next: 'pop' },
|
313
|
+
{ include: '#internal-expression-punctuation' },
|
314
|
+
{ include: '#everything-else' },
|
315
|
+
{ defaultToken: 'meta.expression.begin.erlang' } ] },
|
316
|
+
{ token: 'keyword.control.query.erlang',
|
317
|
+
regex: '\\bquery\\b',
|
318
|
+
push:
|
319
|
+
[ { token: 'keyword.control.end.erlang',
|
320
|
+
regex: '\\bend\\b',
|
321
|
+
next: 'pop' },
|
322
|
+
{ include: '#everything-else' },
|
323
|
+
{ defaultToken: 'meta.expression.query.erlang' } ] } ],
|
324
|
+
'#function':
|
325
|
+
[ { token:
|
326
|
+
[ 'meta.function.erlang',
|
327
|
+
'entity.name.function.definition.erlang',
|
328
|
+
'meta.function.erlang' ],
|
329
|
+
regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()',
|
330
|
+
push:
|
331
|
+
[ { token: 'punctuation.terminator.function.erlang',
|
332
|
+
regex: '\\.',
|
333
|
+
next: 'pop' },
|
334
|
+
{ token: [ 'text', 'entity.name.function.erlang', 'text' ],
|
335
|
+
regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()' },
|
336
|
+
{ token: 'text',
|
337
|
+
regex: '(?=\\()',
|
338
|
+
push:
|
339
|
+
[ { token: 'punctuation.separator.clauses.erlang',
|
340
|
+
regex: ';|(?=\\.)',
|
341
|
+
next: 'pop' },
|
342
|
+
{ include: '#parenthesized-expression' },
|
343
|
+
{ include: '#internal-function-parts' } ] },
|
344
|
+
{ include: '#everything-else' },
|
345
|
+
{ defaultToken: 'meta.function.erlang' } ] } ],
|
346
|
+
'#function-call':
|
347
|
+
[ { token: 'meta.function-call.erlang',
|
348
|
+
regex: '(?=(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*(?:\\(|:\\s*(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*\\())',
|
349
|
+
push:
|
350
|
+
[ { token: 'punctuation.definition.parameters.end.erlang',
|
351
|
+
regex: '\\)',
|
352
|
+
next: 'pop' },
|
353
|
+
{ token:
|
354
|
+
[ 'entity.name.type.class.module.erlang',
|
355
|
+
'text',
|
356
|
+
'punctuation.separator.module-function.erlang',
|
357
|
+
'text',
|
358
|
+
'entity.name.function.guard.erlang',
|
359
|
+
'text',
|
360
|
+
'punctuation.definition.parameters.begin.erlang' ],
|
361
|
+
regex: '(?:(erlang)(\\s*)(:)(\\s*))?(is_atom|is_binary|is_constant|is_float|is_function|is_integer|is_list|is_number|is_pid|is_port|is_reference|is_tuple|is_record|abs|element|hd|length|node|round|self|size|tl|trunc)(\\s*)(\\()',
|
362
|
+
push:
|
363
|
+
[ { token: 'text', regex: '(?=\\))', next: 'pop' },
|
364
|
+
{ token: 'punctuation.separator.parameters.erlang', regex: ',' },
|
365
|
+
{ include: '#everything-else' } ] },
|
366
|
+
{ token:
|
367
|
+
[ 'entity.name.type.class.module.erlang',
|
368
|
+
'text',
|
369
|
+
'punctuation.separator.module-function.erlang',
|
370
|
+
'text',
|
371
|
+
'entity.name.function.erlang',
|
372
|
+
'text',
|
373
|
+
'punctuation.definition.parameters.begin.erlang' ],
|
374
|
+
regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\()',
|
375
|
+
push:
|
376
|
+
[ { token: 'text', regex: '(?=\\))', next: 'pop' },
|
377
|
+
{ token: 'punctuation.separator.parameters.erlang', regex: ',' },
|
378
|
+
{ include: '#everything-else' } ] },
|
379
|
+
{ defaultToken: 'meta.function-call.erlang' } ] } ],
|
380
|
+
'#import-export-directive':
|
381
|
+
[ { token:
|
382
|
+
[ 'meta.directive.import.erlang',
|
383
|
+
'punctuation.section.directive.begin.erlang',
|
384
|
+
'meta.directive.import.erlang',
|
385
|
+
'keyword.control.directive.import.erlang',
|
386
|
+
'meta.directive.import.erlang',
|
387
|
+
'punctuation.definition.parameters.begin.erlang',
|
388
|
+
'meta.directive.import.erlang',
|
389
|
+
'entity.name.type.class.module.erlang',
|
390
|
+
'meta.directive.import.erlang',
|
391
|
+
'punctuation.separator.parameters.erlang' ],
|
392
|
+
regex: '^(\\s*)(-)(\\s*)(import)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)',
|
393
|
+
push:
|
394
|
+
[ { token:
|
395
|
+
[ 'punctuation.definition.parameters.end.erlang',
|
396
|
+
'meta.directive.import.erlang',
|
397
|
+
'punctuation.section.directive.end.erlang' ],
|
398
|
+
regex: '(\\))(\\s*)(\\.)',
|
399
|
+
next: 'pop' },
|
400
|
+
{ include: '#internal-function-list' },
|
401
|
+
{ defaultToken: 'meta.directive.import.erlang' } ] },
|
402
|
+
{ token:
|
403
|
+
[ 'meta.directive.export.erlang',
|
404
|
+
'punctuation.section.directive.begin.erlang',
|
405
|
+
'meta.directive.export.erlang',
|
406
|
+
'keyword.control.directive.export.erlang',
|
407
|
+
'meta.directive.export.erlang',
|
408
|
+
'punctuation.definition.parameters.begin.erlang' ],
|
409
|
+
regex: '^(\\s*)(-)(\\s*)(export)(\\s*)(\\()',
|
410
|
+
push:
|
411
|
+
[ { token:
|
412
|
+
[ 'punctuation.definition.parameters.end.erlang',
|
413
|
+
'meta.directive.export.erlang',
|
414
|
+
'punctuation.section.directive.end.erlang' ],
|
415
|
+
regex: '(\\))(\\s*)(\\.)',
|
416
|
+
next: 'pop' },
|
417
|
+
{ include: '#internal-function-list' },
|
418
|
+
{ defaultToken: 'meta.directive.export.erlang' } ] } ],
|
419
|
+
'#internal-expression-punctuation':
|
420
|
+
[ { token:
|
421
|
+
[ 'punctuation.separator.clause-head-body.erlang',
|
422
|
+
'punctuation.separator.clauses.erlang',
|
423
|
+
'punctuation.separator.expressions.erlang' ],
|
424
|
+
regex: '(->)|(;)|(,)' } ],
|
425
|
+
'#internal-function-list':
|
426
|
+
[ { token: 'punctuation.definition.list.begin.erlang',
|
427
|
+
regex: '\\[',
|
428
|
+
push:
|
429
|
+
[ { token: 'punctuation.definition.list.end.erlang',
|
430
|
+
regex: '\\]',
|
431
|
+
next: 'pop' },
|
432
|
+
{ token:
|
433
|
+
[ 'entity.name.function.erlang',
|
434
|
+
'text',
|
435
|
+
'punctuation.separator.function-arity.erlang' ],
|
436
|
+
regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(/)',
|
437
|
+
push:
|
438
|
+
[ { token: 'punctuation.separator.list.erlang',
|
439
|
+
regex: ',|(?=\\])',
|
440
|
+
next: 'pop' },
|
441
|
+
{ include: '#everything-else' } ] },
|
442
|
+
{ include: '#everything-else' },
|
443
|
+
{ defaultToken: 'meta.structure.list.function.erlang' } ] } ],
|
444
|
+
'#internal-function-parts':
|
445
|
+
[ { token: 'text',
|
446
|
+
regex: '(?=\\()',
|
447
|
+
push:
|
448
|
+
[ { token: 'punctuation.separator.clause-head-body.erlang',
|
449
|
+
regex: '->',
|
450
|
+
next: 'pop' },
|
451
|
+
{ token: 'punctuation.definition.parameters.begin.erlang',
|
452
|
+
regex: '\\(',
|
453
|
+
push:
|
454
|
+
[ { token: 'punctuation.definition.parameters.end.erlang',
|
455
|
+
regex: '\\)',
|
456
|
+
next: 'pop' },
|
457
|
+
{ token: 'punctuation.separator.parameters.erlang', regex: ',' },
|
458
|
+
{ include: '#everything-else' } ] },
|
459
|
+
{ token: 'punctuation.separator.guards.erlang', regex: ',|;' },
|
460
|
+
{ include: '#everything-else' } ] },
|
461
|
+
{ token: 'punctuation.separator.expressions.erlang',
|
462
|
+
regex: ',' },
|
463
|
+
{ include: '#everything-else' } ],
|
464
|
+
'#internal-record-body':
|
465
|
+
[ { token: 'punctuation.definition.class.record.begin.erlang',
|
466
|
+
regex: '\\{',
|
467
|
+
push:
|
468
|
+
[ { token: 'meta.structure.record.erlang',
|
469
|
+
regex: '(?=\\})',
|
470
|
+
next: 'pop' },
|
471
|
+
{ token:
|
472
|
+
[ 'variable.other.field.erlang',
|
473
|
+
'variable.language.omitted.field.erlang',
|
474
|
+
'text',
|
475
|
+
'keyword.operator.assignment.erlang' ],
|
476
|
+
regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')|(_))(\\s*)(=|::)',
|
477
|
+
push:
|
478
|
+
[ { token: 'punctuation.separator.class.record.erlang',
|
479
|
+
regex: ',|(?=\\})',
|
480
|
+
next: 'pop' },
|
481
|
+
{ include: '#everything-else' } ] },
|
482
|
+
{ token:
|
483
|
+
[ 'variable.other.field.erlang',
|
484
|
+
'text',
|
485
|
+
'punctuation.separator.class.record.erlang' ],
|
486
|
+
regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)((?:,)?)' },
|
487
|
+
{ include: '#everything-else' },
|
488
|
+
{ defaultToken: 'meta.structure.record.erlang' } ] } ],
|
489
|
+
'#internal-type-specifiers':
|
490
|
+
[ { token: 'punctuation.separator.value-type.erlang',
|
491
|
+
regex: '/',
|
492
|
+
push:
|
493
|
+
[ { token: 'text', regex: '(?=,|:|>>)', next: 'pop' },
|
494
|
+
{ token:
|
495
|
+
[ 'storage.type.erlang',
|
496
|
+
'storage.modifier.signedness.erlang',
|
497
|
+
'storage.modifier.endianness.erlang',
|
498
|
+
'storage.modifier.unit.erlang',
|
499
|
+
'punctuation.separator.type-specifiers.erlang' ],
|
500
|
+
regex: '(integer|float|binary|bytes|bitstring|bits)|(signed|unsigned)|(big|little|native)|(unit)|(-)' } ] } ],
|
501
|
+
'#keyword':
|
502
|
+
[ { token: 'keyword.control.erlang',
|
503
|
+
regex: '\\b(?:after|begin|case|catch|cond|end|fun|if|let|of|query|try|receive|when)\\b' } ],
|
504
|
+
'#list':
|
505
|
+
[ { token: 'punctuation.definition.list.begin.erlang',
|
506
|
+
regex: '\\[',
|
507
|
+
push:
|
508
|
+
[ { token: 'punctuation.definition.list.end.erlang',
|
509
|
+
regex: '\\]',
|
510
|
+
next: 'pop' },
|
511
|
+
{ token: 'punctuation.separator.list.erlang',
|
512
|
+
regex: '\\||\\|\\||,' },
|
513
|
+
{ include: '#everything-else' },
|
514
|
+
{ defaultToken: 'meta.structure.list.erlang' } ] } ],
|
515
|
+
'#macro-directive':
|
516
|
+
[ { token:
|
517
|
+
[ 'meta.directive.ifdef.erlang',
|
518
|
+
'punctuation.section.directive.begin.erlang',
|
519
|
+
'meta.directive.ifdef.erlang',
|
520
|
+
'keyword.control.directive.ifdef.erlang',
|
521
|
+
'meta.directive.ifdef.erlang',
|
522
|
+
'punctuation.definition.parameters.begin.erlang',
|
523
|
+
'meta.directive.ifdef.erlang',
|
524
|
+
'entity.name.function.macro.erlang',
|
525
|
+
'meta.directive.ifdef.erlang',
|
526
|
+
'punctuation.definition.parameters.end.erlang',
|
527
|
+
'meta.directive.ifdef.erlang',
|
528
|
+
'punctuation.section.directive.end.erlang' ],
|
529
|
+
regex: '^(\\s*)(-)(\\s*)(ifdef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' },
|
530
|
+
{ token:
|
531
|
+
[ 'meta.directive.ifndef.erlang',
|
532
|
+
'punctuation.section.directive.begin.erlang',
|
533
|
+
'meta.directive.ifndef.erlang',
|
534
|
+
'keyword.control.directive.ifndef.erlang',
|
535
|
+
'meta.directive.ifndef.erlang',
|
536
|
+
'punctuation.definition.parameters.begin.erlang',
|
537
|
+
'meta.directive.ifndef.erlang',
|
538
|
+
'entity.name.function.macro.erlang',
|
539
|
+
'meta.directive.ifndef.erlang',
|
540
|
+
'punctuation.definition.parameters.end.erlang',
|
541
|
+
'meta.directive.ifndef.erlang',
|
542
|
+
'punctuation.section.directive.end.erlang' ],
|
543
|
+
regex: '^(\\s*)(-)(\\s*)(ifndef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' },
|
544
|
+
{ token:
|
545
|
+
[ 'meta.directive.undef.erlang',
|
546
|
+
'punctuation.section.directive.begin.erlang',
|
547
|
+
'meta.directive.undef.erlang',
|
548
|
+
'keyword.control.directive.undef.erlang',
|
549
|
+
'meta.directive.undef.erlang',
|
550
|
+
'punctuation.definition.parameters.begin.erlang',
|
551
|
+
'meta.directive.undef.erlang',
|
552
|
+
'entity.name.function.macro.erlang',
|
553
|
+
'meta.directive.undef.erlang',
|
554
|
+
'punctuation.definition.parameters.end.erlang',
|
555
|
+
'meta.directive.undef.erlang',
|
556
|
+
'punctuation.section.directive.end.erlang' ],
|
557
|
+
regex: '^(\\s*)(-)(\\s*)(undef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' } ],
|
558
|
+
'#macro-usage':
|
559
|
+
[ { token:
|
560
|
+
[ 'keyword.operator.macro.erlang',
|
561
|
+
'meta.macro-usage.erlang',
|
562
|
+
'entity.name.function.macro.erlang' ],
|
563
|
+
regex: '(\\?\\??)(\\s*)([a-zA-Z\\d@_]+)' } ],
|
564
|
+
'#module-directive':
|
565
|
+
[ { token:
|
566
|
+
[ 'meta.directive.module.erlang',
|
567
|
+
'punctuation.section.directive.begin.erlang',
|
568
|
+
'meta.directive.module.erlang',
|
569
|
+
'keyword.control.directive.module.erlang',
|
570
|
+
'meta.directive.module.erlang',
|
571
|
+
'punctuation.definition.parameters.begin.erlang',
|
572
|
+
'meta.directive.module.erlang',
|
573
|
+
'entity.name.type.class.module.definition.erlang',
|
574
|
+
'meta.directive.module.erlang',
|
575
|
+
'punctuation.definition.parameters.end.erlang',
|
576
|
+
'meta.directive.module.erlang',
|
577
|
+
'punctuation.section.directive.end.erlang' ],
|
578
|
+
regex: '^(\\s*)(-)(\\s*)(module)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' } ],
|
579
|
+
'#number':
|
580
|
+
[ { token: 'text',
|
581
|
+
regex: '(?=\\d)',
|
582
|
+
push:
|
583
|
+
[ { token: 'text', regex: '(?!\\d)', next: 'pop' },
|
584
|
+
{ token:
|
585
|
+
[ 'constant.numeric.float.erlang',
|
586
|
+
'punctuation.separator.integer-float.erlang',
|
587
|
+
'constant.numeric.float.erlang',
|
588
|
+
'punctuation.separator.float-exponent.erlang' ],
|
589
|
+
regex: '(\\d+)(\\.)(\\d+)((?:[eE][\\+\\-]?\\d+)?)' },
|
590
|
+
{ token:
|
591
|
+
[ 'constant.numeric.integer.binary.erlang',
|
592
|
+
'punctuation.separator.base-integer.erlang',
|
593
|
+
'constant.numeric.integer.binary.erlang' ],
|
594
|
+
regex: '(2)(#)([0-1]+)' },
|
595
|
+
{ token:
|
596
|
+
[ 'constant.numeric.integer.base-3.erlang',
|
597
|
+
'punctuation.separator.base-integer.erlang',
|
598
|
+
'constant.numeric.integer.base-3.erlang' ],
|
599
|
+
regex: '(3)(#)([0-2]+)' },
|
600
|
+
{ token:
|
601
|
+
[ 'constant.numeric.integer.base-4.erlang',
|
602
|
+
'punctuation.separator.base-integer.erlang',
|
603
|
+
'constant.numeric.integer.base-4.erlang' ],
|
604
|
+
regex: '(4)(#)([0-3]+)' },
|
605
|
+
{ token:
|
606
|
+
[ 'constant.numeric.integer.base-5.erlang',
|
607
|
+
'punctuation.separator.base-integer.erlang',
|
608
|
+
'constant.numeric.integer.base-5.erlang' ],
|
609
|
+
regex: '(5)(#)([0-4]+)' },
|
610
|
+
{ token:
|
611
|
+
[ 'constant.numeric.integer.base-6.erlang',
|
612
|
+
'punctuation.separator.base-integer.erlang',
|
613
|
+
'constant.numeric.integer.base-6.erlang' ],
|
614
|
+
regex: '(6)(#)([0-5]+)' },
|
615
|
+
{ token:
|
616
|
+
[ 'constant.numeric.integer.base-7.erlang',
|
617
|
+
'punctuation.separator.base-integer.erlang',
|
618
|
+
'constant.numeric.integer.base-7.erlang' ],
|
619
|
+
regex: '(7)(#)([0-6]+)' },
|
620
|
+
{ token:
|
621
|
+
[ 'constant.numeric.integer.octal.erlang',
|
622
|
+
'punctuation.separator.base-integer.erlang',
|
623
|
+
'constant.numeric.integer.octal.erlang' ],
|
624
|
+
regex: '(8)(#)([0-7]+)' },
|
625
|
+
{ token:
|
626
|
+
[ 'constant.numeric.integer.base-9.erlang',
|
627
|
+
'punctuation.separator.base-integer.erlang',
|
628
|
+
'constant.numeric.integer.base-9.erlang' ],
|
629
|
+
regex: '(9)(#)([0-8]+)' },
|
630
|
+
{ token:
|
631
|
+
[ 'constant.numeric.integer.decimal.erlang',
|
632
|
+
'punctuation.separator.base-integer.erlang',
|
633
|
+
'constant.numeric.integer.decimal.erlang' ],
|
634
|
+
regex: '(10)(#)(\\d+)' },
|
635
|
+
{ token:
|
636
|
+
[ 'constant.numeric.integer.base-11.erlang',
|
637
|
+
'punctuation.separator.base-integer.erlang',
|
638
|
+
'constant.numeric.integer.base-11.erlang' ],
|
639
|
+
regex: '(11)(#)([\\daA]+)' },
|
640
|
+
{ token:
|
641
|
+
[ 'constant.numeric.integer.base-12.erlang',
|
642
|
+
'punctuation.separator.base-integer.erlang',
|
643
|
+
'constant.numeric.integer.base-12.erlang' ],
|
644
|
+
regex: '(12)(#)([\\da-bA-B]+)' },
|
645
|
+
{ token:
|
646
|
+
[ 'constant.numeric.integer.base-13.erlang',
|
647
|
+
'punctuation.separator.base-integer.erlang',
|
648
|
+
'constant.numeric.integer.base-13.erlang' ],
|
649
|
+
regex: '(13)(#)([\\da-cA-C]+)' },
|
650
|
+
{ token:
|
651
|
+
[ 'constant.numeric.integer.base-14.erlang',
|
652
|
+
'punctuation.separator.base-integer.erlang',
|
653
|
+
'constant.numeric.integer.base-14.erlang' ],
|
654
|
+
regex: '(14)(#)([\\da-dA-D]+)' },
|
655
|
+
{ token:
|
656
|
+
[ 'constant.numeric.integer.base-15.erlang',
|
657
|
+
'punctuation.separator.base-integer.erlang',
|
658
|
+
'constant.numeric.integer.base-15.erlang' ],
|
659
|
+
regex: '(15)(#)([\\da-eA-E]+)' },
|
660
|
+
{ token:
|
661
|
+
[ 'constant.numeric.integer.hexadecimal.erlang',
|
662
|
+
'punctuation.separator.base-integer.erlang',
|
663
|
+
'constant.numeric.integer.hexadecimal.erlang' ],
|
664
|
+
regex: '(16)(#)([\\da-fA-F]+)' },
|
665
|
+
{ token:
|
666
|
+
[ 'constant.numeric.integer.base-17.erlang',
|
667
|
+
'punctuation.separator.base-integer.erlang',
|
668
|
+
'constant.numeric.integer.base-17.erlang' ],
|
669
|
+
regex: '(17)(#)([\\da-gA-G]+)' },
|
670
|
+
{ token:
|
671
|
+
[ 'constant.numeric.integer.base-18.erlang',
|
672
|
+
'punctuation.separator.base-integer.erlang',
|
673
|
+
'constant.numeric.integer.base-18.erlang' ],
|
674
|
+
regex: '(18)(#)([\\da-hA-H]+)' },
|
675
|
+
{ token:
|
676
|
+
[ 'constant.numeric.integer.base-19.erlang',
|
677
|
+
'punctuation.separator.base-integer.erlang',
|
678
|
+
'constant.numeric.integer.base-19.erlang' ],
|
679
|
+
regex: '(19)(#)([\\da-iA-I]+)' },
|
680
|
+
{ token:
|
681
|
+
[ 'constant.numeric.integer.base-20.erlang',
|
682
|
+
'punctuation.separator.base-integer.erlang',
|
683
|
+
'constant.numeric.integer.base-20.erlang' ],
|
684
|
+
regex: '(20)(#)([\\da-jA-J]+)' },
|
685
|
+
{ token:
|
686
|
+
[ 'constant.numeric.integer.base-21.erlang',
|
687
|
+
'punctuation.separator.base-integer.erlang',
|
688
|
+
'constant.numeric.integer.base-21.erlang' ],
|
689
|
+
regex: '(21)(#)([\\da-kA-K]+)' },
|
690
|
+
{ token:
|
691
|
+
[ 'constant.numeric.integer.base-22.erlang',
|
692
|
+
'punctuation.separator.base-integer.erlang',
|
693
|
+
'constant.numeric.integer.base-22.erlang' ],
|
694
|
+
regex: '(22)(#)([\\da-lA-L]+)' },
|
695
|
+
{ token:
|
696
|
+
[ 'constant.numeric.integer.base-23.erlang',
|
697
|
+
'punctuation.separator.base-integer.erlang',
|
698
|
+
'constant.numeric.integer.base-23.erlang' ],
|
699
|
+
regex: '(23)(#)([\\da-mA-M]+)' },
|
700
|
+
{ token:
|
701
|
+
[ 'constant.numeric.integer.base-24.erlang',
|
702
|
+
'punctuation.separator.base-integer.erlang',
|
703
|
+
'constant.numeric.integer.base-24.erlang' ],
|
704
|
+
regex: '(24)(#)([\\da-nA-N]+)' },
|
705
|
+
{ token:
|
706
|
+
[ 'constant.numeric.integer.base-25.erlang',
|
707
|
+
'punctuation.separator.base-integer.erlang',
|
708
|
+
'constant.numeric.integer.base-25.erlang' ],
|
709
|
+
regex: '(25)(#)([\\da-oA-O]+)' },
|
710
|
+
{ token:
|
711
|
+
[ 'constant.numeric.integer.base-26.erlang',
|
712
|
+
'punctuation.separator.base-integer.erlang',
|
713
|
+
'constant.numeric.integer.base-26.erlang' ],
|
714
|
+
regex: '(26)(#)([\\da-pA-P]+)' },
|
715
|
+
{ token:
|
716
|
+
[ 'constant.numeric.integer.base-27.erlang',
|
717
|
+
'punctuation.separator.base-integer.erlang',
|
718
|
+
'constant.numeric.integer.base-27.erlang' ],
|
719
|
+
regex: '(27)(#)([\\da-qA-Q]+)' },
|
720
|
+
{ token:
|
721
|
+
[ 'constant.numeric.integer.base-28.erlang',
|
722
|
+
'punctuation.separator.base-integer.erlang',
|
723
|
+
'constant.numeric.integer.base-28.erlang' ],
|
724
|
+
regex: '(28)(#)([\\da-rA-R]+)' },
|
725
|
+
{ token:
|
726
|
+
[ 'constant.numeric.integer.base-29.erlang',
|
727
|
+
'punctuation.separator.base-integer.erlang',
|
728
|
+
'constant.numeric.integer.base-29.erlang' ],
|
729
|
+
regex: '(29)(#)([\\da-sA-S]+)' },
|
730
|
+
{ token:
|
731
|
+
[ 'constant.numeric.integer.base-30.erlang',
|
732
|
+
'punctuation.separator.base-integer.erlang',
|
733
|
+
'constant.numeric.integer.base-30.erlang' ],
|
734
|
+
regex: '(30)(#)([\\da-tA-T]+)' },
|
735
|
+
{ token:
|
736
|
+
[ 'constant.numeric.integer.base-31.erlang',
|
737
|
+
'punctuation.separator.base-integer.erlang',
|
738
|
+
'constant.numeric.integer.base-31.erlang' ],
|
739
|
+
regex: '(31)(#)([\\da-uA-U]+)' },
|
740
|
+
{ token:
|
741
|
+
[ 'constant.numeric.integer.base-32.erlang',
|
742
|
+
'punctuation.separator.base-integer.erlang',
|
743
|
+
'constant.numeric.integer.base-32.erlang' ],
|
744
|
+
regex: '(32)(#)([\\da-vA-V]+)' },
|
745
|
+
{ token:
|
746
|
+
[ 'constant.numeric.integer.base-33.erlang',
|
747
|
+
'punctuation.separator.base-integer.erlang',
|
748
|
+
'constant.numeric.integer.base-33.erlang' ],
|
749
|
+
regex: '(33)(#)([\\da-wA-W]+)' },
|
750
|
+
{ token:
|
751
|
+
[ 'constant.numeric.integer.base-34.erlang',
|
752
|
+
'punctuation.separator.base-integer.erlang',
|
753
|
+
'constant.numeric.integer.base-34.erlang' ],
|
754
|
+
regex: '(34)(#)([\\da-xA-X]+)' },
|
755
|
+
{ token:
|
756
|
+
[ 'constant.numeric.integer.base-35.erlang',
|
757
|
+
'punctuation.separator.base-integer.erlang',
|
758
|
+
'constant.numeric.integer.base-35.erlang' ],
|
759
|
+
regex: '(35)(#)([\\da-yA-Y]+)' },
|
760
|
+
{ token:
|
761
|
+
[ 'constant.numeric.integer.base-36.erlang',
|
762
|
+
'punctuation.separator.base-integer.erlang',
|
763
|
+
'constant.numeric.integer.base-36.erlang' ],
|
764
|
+
regex: '(36)(#)([\\da-zA-Z]+)' },
|
765
|
+
{ token: 'invalid.illegal.integer.erlang',
|
766
|
+
regex: '\\d+#[\\da-zA-Z]+' },
|
767
|
+
{ token: 'constant.numeric.integer.decimal.erlang',
|
768
|
+
regex: '\\d+' } ] } ],
|
769
|
+
'#parenthesized-expression':
|
770
|
+
[ { token: 'punctuation.section.expression.begin.erlang',
|
771
|
+
regex: '\\(',
|
772
|
+
push:
|
773
|
+
[ { token: 'punctuation.section.expression.end.erlang',
|
774
|
+
regex: '\\)',
|
775
|
+
next: 'pop' },
|
776
|
+
{ include: '#everything-else' },
|
777
|
+
{ defaultToken: 'meta.expression.parenthesized' } ] } ],
|
778
|
+
'#record-directive':
|
779
|
+
[ { token:
|
780
|
+
[ 'meta.directive.record.erlang',
|
781
|
+
'punctuation.section.directive.begin.erlang',
|
782
|
+
'meta.directive.record.erlang',
|
783
|
+
'keyword.control.directive.import.erlang',
|
784
|
+
'meta.directive.record.erlang',
|
785
|
+
'punctuation.definition.parameters.begin.erlang',
|
786
|
+
'meta.directive.record.erlang',
|
787
|
+
'entity.name.type.class.record.definition.erlang',
|
788
|
+
'meta.directive.record.erlang',
|
789
|
+
'punctuation.separator.parameters.erlang' ],
|
790
|
+
regex: '^(\\s*)(-)(\\s*)(record)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)',
|
791
|
+
push:
|
792
|
+
[ { token:
|
793
|
+
[ 'punctuation.definition.class.record.end.erlang',
|
794
|
+
'meta.directive.record.erlang',
|
795
|
+
'punctuation.definition.parameters.end.erlang',
|
796
|
+
'meta.directive.record.erlang',
|
797
|
+
'punctuation.section.directive.end.erlang' ],
|
798
|
+
regex: '(\\})(\\s*)(\\))(\\s*)(\\.)',
|
799
|
+
next: 'pop' },
|
800
|
+
{ include: '#internal-record-body' },
|
801
|
+
{ defaultToken: 'meta.directive.record.erlang' } ] } ],
|
802
|
+
'#record-usage':
|
803
|
+
[ { token:
|
804
|
+
[ 'keyword.operator.record.erlang',
|
805
|
+
'meta.record-usage.erlang',
|
806
|
+
'entity.name.type.class.record.erlang',
|
807
|
+
'meta.record-usage.erlang',
|
808
|
+
'punctuation.separator.record-field.erlang',
|
809
|
+
'meta.record-usage.erlang',
|
810
|
+
'variable.other.field.erlang' ],
|
811
|
+
regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\.)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')' },
|
812
|
+
{ token:
|
813
|
+
[ 'keyword.operator.record.erlang',
|
814
|
+
'meta.record-usage.erlang',
|
815
|
+
'entity.name.type.class.record.erlang' ],
|
816
|
+
regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')',
|
817
|
+
push:
|
818
|
+
[ { token: 'punctuation.definition.class.record.end.erlang',
|
819
|
+
regex: '\\}',
|
820
|
+
next: 'pop' },
|
821
|
+
{ include: '#internal-record-body' },
|
822
|
+
{ defaultToken: 'meta.record-usage.erlang' } ] } ],
|
823
|
+
'#string':
|
824
|
+
[ { token: 'punctuation.definition.string.begin.erlang',
|
825
|
+
regex: '"',
|
826
|
+
push:
|
827
|
+
[ { token: 'punctuation.definition.string.end.erlang',
|
828
|
+
regex: '"',
|
829
|
+
next: 'pop' },
|
830
|
+
{ token:
|
831
|
+
[ 'punctuation.definition.escape.erlang',
|
832
|
+
'constant.character.escape.erlang',
|
833
|
+
'punctuation.definition.escape.erlang',
|
834
|
+
'constant.character.escape.erlang',
|
835
|
+
'constant.character.escape.erlang' ],
|
836
|
+
regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' },
|
837
|
+
{ token: 'invalid.illegal.string.erlang', regex: '\\\\\\^?.?' },
|
838
|
+
{ token:
|
839
|
+
[ 'punctuation.definition.placeholder.erlang',
|
840
|
+
'punctuation.separator.placeholder-parts.erlang',
|
841
|
+
'constant.other.placeholder.erlang',
|
842
|
+
'punctuation.separator.placeholder-parts.erlang',
|
843
|
+
'punctuation.separator.placeholder-parts.erlang',
|
844
|
+
'constant.other.placeholder.erlang',
|
845
|
+
'punctuation.separator.placeholder-parts.erlang',
|
846
|
+
'punctuation.separator.placeholder-parts.erlang',
|
847
|
+
'punctuation.separator.placeholder-parts.erlang',
|
848
|
+
'constant.other.placeholder.erlang',
|
849
|
+
'constant.other.placeholder.erlang' ],
|
850
|
+
regex: '(~)(?:((?:\\-)?)(\\d+)|(\\*))?(?:(\\.)(?:(\\d+)|(\\*)))?(?:(\\.)(?:(\\*)|(.)))?([~cfegswpWPBX#bx\\+ni])' },
|
851
|
+
{ token:
|
852
|
+
[ 'punctuation.definition.placeholder.erlang',
|
853
|
+
'punctuation.separator.placeholder-parts.erlang',
|
854
|
+
'constant.other.placeholder.erlang',
|
855
|
+
'constant.other.placeholder.erlang' ],
|
856
|
+
regex: '(~)((?:\\*)?)((?:\\d+)?)([~du\\-#fsacl])' },
|
857
|
+
{ token: 'invalid.illegal.string.erlang', regex: '~.?' },
|
858
|
+
{ defaultToken: 'string.quoted.double.erlang' } ] } ],
|
859
|
+
'#symbolic-operator':
|
860
|
+
[ { token: 'keyword.operator.symbolic.erlang',
|
861
|
+
regex: '\\+\\+|\\+|--|-|\\*|/=|/|=/=|=:=|==|=<|=|<-|<|>=|>|!|::' } ],
|
862
|
+
'#textual-operator':
|
863
|
+
[ { token: 'keyword.operator.textual.erlang',
|
864
|
+
regex: '\\b(?:andalso|band|and|bxor|xor|bor|orelse|or|bnot|not|bsl|bsr|div|rem)\\b' } ],
|
865
|
+
'#tuple':
|
866
|
+
[ { token: 'punctuation.definition.tuple.begin.erlang',
|
867
|
+
regex: '\\{',
|
868
|
+
push:
|
869
|
+
[ { token: 'punctuation.definition.tuple.end.erlang',
|
870
|
+
regex: '\\}',
|
871
|
+
next: 'pop' },
|
872
|
+
{ token: 'punctuation.separator.tuple.erlang', regex: ',' },
|
873
|
+
{ include: '#everything-else' },
|
874
|
+
{ defaultToken: 'meta.structure.tuple.erlang' } ] } ],
|
875
|
+
'#variable':
|
876
|
+
[ { token: [ 'variable.other.erlang', 'variable.language.omitted.erlang' ],
|
877
|
+
regex: '(_[a-zA-Z\\d@_]+|[A-Z][a-zA-Z\\d@_]*)|(_)' } ] }
|
878
|
+
|
879
|
+
this.normalizeRules();
|
880
|
+
};
|
881
|
+
|
882
|
+
ErlangHighlightRules.metaData = { comment: 'The recognition of function definitions and compiler directives (such as module, record and macro definitions) requires that each of the aforementioned constructs must be the first string inside a line (except for whitespace). Also, the function/module/record/macro names must be given unquoted. -- desp',
|
883
|
+
fileTypes: [ 'erl', 'hrl' ],
|
884
|
+
keyEquivalent: '^~E',
|
885
|
+
name: 'Erlang',
|
886
|
+
scopeName: 'source.erlang' }
|
887
|
+
|
888
|
+
|
889
|
+
oop.inherits(ErlangHighlightRules, TextHighlightRules);
|
890
|
+
|
891
|
+
exports.ErlangHighlightRules = ErlangHighlightRules;
|
892
|
+
});
|
893
|
+
|
894
|
+
define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
|
895
|
+
|
896
|
+
|
897
|
+
var oop = require("../../lib/oop");
|
898
|
+
var Range = require("../../range").Range;
|
899
|
+
var BaseFoldMode = require("./fold_mode").FoldMode;
|
900
|
+
|
901
|
+
var FoldMode = exports.FoldMode = function(commentRegex) {
|
902
|
+
if (commentRegex) {
|
903
|
+
this.foldingStartMarker = new RegExp(
|
904
|
+
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
905
|
+
);
|
906
|
+
this.foldingStopMarker = new RegExp(
|
907
|
+
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
908
|
+
);
|
909
|
+
}
|
910
|
+
};
|
911
|
+
oop.inherits(FoldMode, BaseFoldMode);
|
912
|
+
|
913
|
+
(function() {
|
914
|
+
|
915
|
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
916
|
+
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
917
|
+
|
918
|
+
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
919
|
+
var line = session.getLine(row);
|
920
|
+
var match = line.match(this.foldingStartMarker);
|
921
|
+
if (match) {
|
922
|
+
var i = match.index;
|
923
|
+
|
924
|
+
if (match[1])
|
925
|
+
return this.openingBracketBlock(session, match[1], row, i);
|
926
|
+
|
927
|
+
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
928
|
+
|
929
|
+
if (range && !range.isMultiLine()) {
|
930
|
+
if (forceMultiline) {
|
931
|
+
range = this.getSectionRange(session, row);
|
932
|
+
} else if (foldStyle != "all")
|
933
|
+
range = null;
|
934
|
+
}
|
935
|
+
|
936
|
+
return range;
|
937
|
+
}
|
938
|
+
|
939
|
+
if (foldStyle === "markbegin")
|
940
|
+
return;
|
941
|
+
|
942
|
+
var match = line.match(this.foldingStopMarker);
|
943
|
+
if (match) {
|
944
|
+
var i = match.index + match[0].length;
|
945
|
+
|
946
|
+
if (match[1])
|
947
|
+
return this.closingBracketBlock(session, match[1], row, i);
|
948
|
+
|
949
|
+
return session.getCommentFoldRange(row, i, -1);
|
950
|
+
}
|
951
|
+
};
|
952
|
+
|
953
|
+
this.getSectionRange = function(session, row) {
|
954
|
+
var line = session.getLine(row);
|
955
|
+
var startIndent = line.search(/\S/);
|
956
|
+
var startRow = row;
|
957
|
+
var startColumn = line.length;
|
958
|
+
row = row + 1;
|
959
|
+
var endRow = row;
|
960
|
+
var maxRow = session.getLength();
|
961
|
+
while (++row < maxRow) {
|
962
|
+
line = session.getLine(row);
|
963
|
+
var indent = line.search(/\S/);
|
964
|
+
if (indent === -1)
|
965
|
+
continue;
|
966
|
+
if (startIndent > indent)
|
967
|
+
break;
|
968
|
+
var subRange = this.getFoldWidgetRange(session, "all", row);
|
969
|
+
|
970
|
+
if (subRange) {
|
971
|
+
if (subRange.start.row <= startRow) {
|
972
|
+
break;
|
973
|
+
} else if (subRange.isMultiLine()) {
|
974
|
+
row = subRange.end.row;
|
975
|
+
} else if (startIndent == indent) {
|
976
|
+
break;
|
977
|
+
}
|
978
|
+
}
|
979
|
+
endRow = row;
|
980
|
+
}
|
981
|
+
|
982
|
+
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
983
|
+
};
|
984
|
+
|
985
|
+
}).call(FoldMode.prototype);
|
986
|
+
|
987
|
+
});
|