@quirekit/cm-legacy-modes 0.0.0-stage → 0.0.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +27 -2
- package/README.zh-CN.md +28 -0
- package/THIRD_PARTY_NOTICES.md +143 -0
- package/UPSTREAM.json +16 -0
- package/dist/mode/README.md +52 -0
- package/dist/mode/apl.d.ts +2 -0
- package/dist/mode/apl.js +140 -0
- package/dist/mode/asciiarmor.d.ts +2 -0
- package/dist/mode/asciiarmor.js +54 -0
- package/dist/mode/asn1.d.ts +12 -0
- package/dist/mode/asn1.js +190 -0
- package/dist/mode/asterisk.d.ts +2 -0
- package/dist/mode/asterisk.js +186 -0
- package/dist/mode/brainfuck.d.ts +2 -0
- package/dist/mode/brainfuck.js +68 -0
- package/dist/mode/clike.d.ts +35 -0
- package/dist/mode/clike.js +1019 -0
- package/dist/mode/clojure.d.ts +2 -0
- package/dist/mode/clojure.js +272 -0
- package/dist/mode/cmake.d.ts +2 -0
- package/dist/mode/cmake.js +80 -0
- package/dist/mode/cobol.d.ts +2 -0
- package/dist/mode/cobol.js +234 -0
- package/dist/mode/coffeescript.d.ts +2 -0
- package/dist/mode/coffeescript.js +327 -0
- package/dist/mode/commonlisp.d.ts +2 -0
- package/dist/mode/commonlisp.js +107 -0
- package/dist/mode/crystal.d.ts +2 -0
- package/dist/mode/crystal.js +417 -0
- package/dist/mode/css.d.ts +5 -0
- package/dist/mode/css.js +846 -0
- package/dist/mode/cypher.d.ts +2 -0
- package/dist/mode/cypher.js +120 -0
- package/dist/mode/d.d.ts +2 -0
- package/dist/mode/d.js +203 -0
- package/dist/mode/diff.d.ts +2 -0
- package/dist/mode/diff.js +29 -0
- package/dist/mode/dockerfile.d.ts +2 -0
- package/dist/mode/dockerfile.js +198 -0
- package/dist/mode/dtd.d.ts +2 -0
- package/dist/mode/dtd.js +120 -0
- package/dist/mode/dylan.d.ts +2 -0
- package/dist/mode/dylan.js +336 -0
- package/dist/mode/ebnf.d.ts +2 -0
- package/dist/mode/ebnf.js +149 -0
- package/dist/mode/ecl.d.ts +2 -0
- package/dist/mode/ecl.js +188 -0
- package/dist/mode/eiffel.d.ts +2 -0
- package/dist/mode/eiffel.js +145 -0
- package/dist/mode/elm.d.ts +2 -0
- package/dist/mode/elm.js +228 -0
- package/dist/mode/erlang.d.ts +2 -0
- package/dist/mode/erlang.js +580 -0
- package/dist/mode/factor.d.ts +2 -0
- package/dist/mode/factor.js +63 -0
- package/dist/mode/fcl.d.ts +2 -0
- package/dist/mode/fcl.js +153 -0
- package/dist/mode/forth.d.ts +2 -0
- package/dist/mode/forth.js +162 -0
- package/dist/mode/fortran.d.ts +2 -0
- package/dist/mode/fortran.js +171 -0
- package/dist/mode/gas.d.ts +3 -0
- package/dist/mode/gas.js +342 -0
- package/dist/mode/gherkin.d.ts +2 -0
- package/dist/mode/gherkin.js +146 -0
- package/dist/mode/go.d.ts +2 -0
- package/dist/mode/go.js +163 -0
- package/dist/mode/groovy.d.ts +2 -0
- package/dist/mode/groovy.js +226 -0
- package/dist/mode/haskell.d.ts +2 -0
- package/dist/mode/haskell.js +238 -0
- package/dist/mode/haxe.d.ts +3 -0
- package/dist/mode/haxe.js +490 -0
- package/dist/mode/http.d.ts +2 -0
- package/dist/mode/http.js +87 -0
- package/dist/mode/idl.d.ts +2 -0
- package/dist/mode/idl.js +274 -0
- package/dist/mode/javascript.d.ts +5 -0
- package/dist/mode/javascript.js +922 -0
- package/dist/mode/jinja2.d.ts +2 -0
- package/dist/mode/jinja2.js +170 -0
- package/dist/mode/julia.d.ts +2 -0
- package/dist/mode/julia.js +367 -0
- package/dist/mode/livescript.d.ts +2 -0
- package/dist/mode/livescript.js +257 -0
- package/dist/mode/lua.d.ts +2 -0
- package/dist/mode/lua.js +135 -0
- package/dist/mode/mathematica.d.ts +2 -0
- package/dist/mode/mathematica.js +153 -0
- package/dist/mode/mbox.d.ts +2 -0
- package/dist/mode/mbox.js +114 -0
- package/dist/mode/mirc.d.ts +2 -0
- package/dist/mode/mirc.js +174 -0
- package/dist/mode/mllike.d.ts +4 -0
- package/dist/mode/mllike.js +346 -0
- package/dist/mode/modelica.d.ts +2 -0
- package/dist/mode/modelica.js +190 -0
- package/dist/mode/mscgen.d.ts +4 -0
- package/dist/mode/mscgen.js +147 -0
- package/dist/mode/mumps.d.ts +2 -0
- package/dist/mode/mumps.js +127 -0
- package/dist/mode/nginx.d.ts +2 -0
- package/dist/mode/nginx.js +161 -0
- package/dist/mode/nsis.d.ts +2 -0
- package/dist/mode/nsis.js +78 -0
- package/dist/mode/ntriples.d.ts +2 -0
- package/dist/mode/ntriples.js +139 -0
- package/dist/mode/octave.d.ts +2 -0
- package/dist/mode/octave.js +123 -0
- package/dist/mode/oz.d.ts +2 -0
- package/dist/mode/oz.js +233 -0
- package/dist/mode/pascal.d.ts +2 -0
- package/dist/mode/pascal.js +122 -0
- package/dist/mode/pegjs.d.ts +2 -0
- package/dist/mode/pegjs.js +85 -0
- package/dist/mode/perl.d.ts +2 -0
- package/dist/mode/perl.js +818 -0
- package/dist/mode/pig.d.ts +2 -0
- package/dist/mode/pig.js +147 -0
- package/dist/mode/powershell.d.ts +2 -0
- package/dist/mode/powershell.js +379 -0
- package/dist/mode/properties.d.ts +2 -0
- package/dist/mode/properties.js +60 -0
- package/dist/mode/protobuf.d.ts +2 -0
- package/dist/mode/protobuf.js +55 -0
- package/dist/mode/pug.d.ts +2 -0
- package/dist/mode/pug.js +502 -0
- package/dist/mode/puppet.d.ts +2 -0
- package/dist/mode/puppet.js +203 -0
- package/dist/mode/python.d.ts +3 -0
- package/dist/mode/python.js +388 -0
- package/dist/mode/q.d.ts +2 -0
- package/dist/mode/q.js +124 -0
- package/dist/mode/r.d.ts +2 -0
- package/dist/mode/r.js +172 -0
- package/dist/mode/rpm.d.ts +3 -0
- package/dist/mode/rpm.js +88 -0
- package/dist/mode/ruby.d.ts +2 -0
- package/dist/mode/ruby.js +287 -0
- package/dist/mode/rust.d.ts +2 -0
- package/dist/mode/rust.js +54 -0
- package/dist/mode/sas.d.ts +2 -0
- package/dist/mode/sas.js +266 -0
- package/dist/mode/sass.d.ts +2 -0
- package/dist/mode/sass.js +427 -0
- package/dist/mode/scheme.d.ts +2 -0
- package/dist/mode/scheme.js +261 -0
- package/dist/mode/shell.d.ts +2 -0
- package/dist/mode/shell.js +146 -0
- package/dist/mode/sieve.d.ts +2 -0
- package/dist/mode/sieve.js +176 -0
- package/dist/mode/simple-mode.d.ts +14 -0
- package/dist/mode/simple-mode.js +136 -0
- package/dist/mode/smalltalk.d.ts +2 -0
- package/dist/mode/smalltalk.js +151 -0
- package/dist/mode/solr.d.ts +2 -0
- package/dist/mode/solr.js +78 -0
- package/dist/mode/sparql.d.ts +2 -0
- package/dist/mode/sparql.js +169 -0
- package/dist/mode/spreadsheet.d.ts +2 -0
- package/dist/mode/spreadsheet.js +96 -0
- package/dist/mode/sql.d.ts +27 -0
- package/dist/mode/sql.js +481 -0
- package/dist/mode/stex.d.ts +3 -0
- package/dist/mode/stex.js +245 -0
- package/dist/mode/stylus.d.ts +2 -0
- package/dist/mode/stylus.js +747 -0
- package/dist/mode/swift.d.ts +2 -0
- package/dist/mode/swift.js +200 -0
- package/dist/mode/tcl.d.ts +2 -0
- package/dist/mode/tcl.js +123 -0
- package/dist/mode/textile.d.ts +2 -0
- package/dist/mode/textile.js +440 -0
- package/dist/mode/tiddlywiki.d.ts +2 -0
- package/dist/mode/tiddlywiki.js +277 -0
- package/dist/mode/tiki.d.ts +2 -0
- package/dist/mode/tiki.js +291 -0
- package/dist/mode/toml.d.ts +2 -0
- package/dist/mode/toml.js +74 -0
- package/dist/mode/troff.d.ts +2 -0
- package/dist/mode/troff.js +63 -0
- package/dist/mode/ttcn-cfg.d.ts +2 -0
- package/dist/mode/ttcn-cfg.js +199 -0
- package/dist/mode/ttcn.d.ts +2 -0
- package/dist/mode/ttcn.js +255 -0
- package/dist/mode/turtle.d.ts +2 -0
- package/dist/mode/turtle.js +145 -0
- package/dist/mode/vb.d.ts +2 -0
- package/dist/mode/vb.js +254 -0
- package/dist/mode/vbscript.d.ts +3 -0
- package/dist/mode/vbscript.js +320 -0
- package/dist/mode/velocity.d.ts +2 -0
- package/dist/mode/velocity.js +184 -0
- package/dist/mode/verilog.d.ts +3 -0
- package/dist/mode/verilog.js +601 -0
- package/dist/mode/vhdl.d.ts +2 -0
- package/dist/mode/vhdl.js +172 -0
- package/dist/mode/wast.d.ts +2 -0
- package/dist/mode/wast.js +119 -0
- package/dist/mode/webidl.d.ts +2 -0
- package/dist/mode/webidl.js +179 -0
- package/dist/mode/xml.d.ts +3 -0
- package/dist/mode/xml.js +397 -0
- package/dist/mode/xquery.d.ts +2 -0
- package/dist/mode/xquery.js +415 -0
- package/dist/mode/yacas.d.ts +2 -0
- package/dist/mode/yacas.js +181 -0
- package/dist/mode/yaml.d.ts +2 -0
- package/dist/mode/yaml.js +101 -0
- package/dist/mode/z80.d.ts +3 -0
- package/dist/mode/z80.js +101 -0
- package/mode/README.md +52 -0
- package/mode/apl.d.ts +2 -0
- package/mode/apl.js +140 -0
- package/mode/asciiarmor.d.ts +2 -0
- package/mode/asciiarmor.js +54 -0
- package/mode/asn1.d.ts +12 -0
- package/mode/asn1.js +190 -0
- package/mode/asterisk.d.ts +2 -0
- package/mode/asterisk.js +186 -0
- package/mode/brainfuck.d.ts +2 -0
- package/mode/brainfuck.js +68 -0
- package/mode/clike.d.ts +35 -0
- package/mode/clike.js +1019 -0
- package/mode/clojure.d.ts +2 -0
- package/mode/clojure.js +272 -0
- package/mode/cmake.d.ts +2 -0
- package/mode/cmake.js +80 -0
- package/mode/cobol.d.ts +2 -0
- package/mode/cobol.js +234 -0
- package/mode/coffeescript.d.ts +2 -0
- package/mode/coffeescript.js +327 -0
- package/mode/commonlisp.d.ts +2 -0
- package/mode/commonlisp.js +107 -0
- package/mode/crystal.d.ts +2 -0
- package/mode/crystal.js +417 -0
- package/mode/css.d.ts +5 -0
- package/mode/css.js +846 -0
- package/mode/cypher.d.ts +2 -0
- package/mode/cypher.js +120 -0
- package/mode/d.d.ts +2 -0
- package/mode/d.js +203 -0
- package/mode/diff.d.ts +2 -0
- package/mode/diff.js +29 -0
- package/mode/dockerfile.d.ts +2 -0
- package/mode/dockerfile.js +198 -0
- package/mode/dtd.d.ts +2 -0
- package/mode/dtd.js +120 -0
- package/mode/dylan.d.ts +2 -0
- package/mode/dylan.js +336 -0
- package/mode/ebnf.d.ts +2 -0
- package/mode/ebnf.js +149 -0
- package/mode/ecl.d.ts +2 -0
- package/mode/ecl.js +188 -0
- package/mode/eiffel.d.ts +2 -0
- package/mode/eiffel.js +145 -0
- package/mode/elm.d.ts +2 -0
- package/mode/elm.js +228 -0
- package/mode/erlang.d.ts +2 -0
- package/mode/erlang.js +580 -0
- package/mode/factor.d.ts +2 -0
- package/mode/factor.js +63 -0
- package/mode/fcl.d.ts +2 -0
- package/mode/fcl.js +153 -0
- package/mode/forth.d.ts +2 -0
- package/mode/forth.js +162 -0
- package/mode/fortran.d.ts +2 -0
- package/mode/fortran.js +171 -0
- package/mode/gas.d.ts +3 -0
- package/mode/gas.js +342 -0
- package/mode/gherkin.d.ts +2 -0
- package/mode/gherkin.js +146 -0
- package/mode/go.d.ts +2 -0
- package/mode/go.js +163 -0
- package/mode/groovy.d.ts +2 -0
- package/mode/groovy.js +226 -0
- package/mode/haskell.d.ts +2 -0
- package/mode/haskell.js +238 -0
- package/mode/haxe.d.ts +3 -0
- package/mode/haxe.js +490 -0
- package/mode/http.d.ts +2 -0
- package/mode/http.js +87 -0
- package/mode/idl.d.ts +2 -0
- package/mode/idl.js +274 -0
- package/mode/javascript.d.ts +5 -0
- package/mode/javascript.js +922 -0
- package/mode/jinja2.d.ts +2 -0
- package/mode/jinja2.js +170 -0
- package/mode/julia.d.ts +2 -0
- package/mode/julia.js +367 -0
- package/mode/livescript.d.ts +2 -0
- package/mode/livescript.js +257 -0
- package/mode/lua.d.ts +2 -0
- package/mode/lua.js +135 -0
- package/mode/mathematica.d.ts +2 -0
- package/mode/mathematica.js +153 -0
- package/mode/mbox.d.ts +2 -0
- package/mode/mbox.js +114 -0
- package/mode/mirc.d.ts +2 -0
- package/mode/mirc.js +174 -0
- package/mode/mllike.d.ts +4 -0
- package/mode/mllike.js +346 -0
- package/mode/modelica.d.ts +2 -0
- package/mode/modelica.js +190 -0
- package/mode/mscgen.d.ts +4 -0
- package/mode/mscgen.js +147 -0
- package/mode/mumps.d.ts +2 -0
- package/mode/mumps.js +127 -0
- package/mode/nginx.d.ts +2 -0
- package/mode/nginx.js +161 -0
- package/mode/nsis.d.ts +2 -0
- package/mode/nsis.js +78 -0
- package/mode/ntriples.d.ts +2 -0
- package/mode/ntriples.js +139 -0
- package/mode/octave.d.ts +2 -0
- package/mode/octave.js +123 -0
- package/mode/oz.d.ts +2 -0
- package/mode/oz.js +233 -0
- package/mode/pascal.d.ts +2 -0
- package/mode/pascal.js +122 -0
- package/mode/pegjs.d.ts +2 -0
- package/mode/pegjs.js +85 -0
- package/mode/perl.d.ts +2 -0
- package/mode/perl.js +818 -0
- package/mode/pig.d.ts +2 -0
- package/mode/pig.js +147 -0
- package/mode/powershell.d.ts +2 -0
- package/mode/powershell.js +379 -0
- package/mode/properties.d.ts +2 -0
- package/mode/properties.js +60 -0
- package/mode/protobuf.d.ts +2 -0
- package/mode/protobuf.js +55 -0
- package/mode/pug.d.ts +2 -0
- package/mode/pug.js +502 -0
- package/mode/puppet.d.ts +2 -0
- package/mode/puppet.js +203 -0
- package/mode/python.d.ts +3 -0
- package/mode/python.js +388 -0
- package/mode/q.d.ts +2 -0
- package/mode/q.js +124 -0
- package/mode/r.d.ts +2 -0
- package/mode/r.js +172 -0
- package/mode/rpm.d.ts +3 -0
- package/mode/rpm.js +88 -0
- package/mode/ruby.d.ts +2 -0
- package/mode/ruby.js +287 -0
- package/mode/rust.d.ts +2 -0
- package/mode/rust.js +54 -0
- package/mode/sas.d.ts +2 -0
- package/mode/sas.js +266 -0
- package/mode/sass.d.ts +2 -0
- package/mode/sass.js +427 -0
- package/mode/scheme.d.ts +2 -0
- package/mode/scheme.js +261 -0
- package/mode/shell.d.ts +2 -0
- package/mode/shell.js +146 -0
- package/mode/sieve.d.ts +2 -0
- package/mode/sieve.js +176 -0
- package/mode/simple-mode.d.ts +14 -0
- package/mode/simple-mode.js +136 -0
- package/mode/smalltalk.d.ts +2 -0
- package/mode/smalltalk.js +151 -0
- package/mode/solr.d.ts +2 -0
- package/mode/solr.js +78 -0
- package/mode/sparql.d.ts +2 -0
- package/mode/sparql.js +169 -0
- package/mode/spreadsheet.d.ts +2 -0
- package/mode/spreadsheet.js +96 -0
- package/mode/sql.d.ts +27 -0
- package/mode/sql.js +481 -0
- package/mode/stex.d.ts +3 -0
- package/mode/stex.js +245 -0
- package/mode/stylus.d.ts +2 -0
- package/mode/stylus.js +747 -0
- package/mode/swift.d.ts +2 -0
- package/mode/swift.js +200 -0
- package/mode/tcl.d.ts +2 -0
- package/mode/tcl.js +123 -0
- package/mode/textile.d.ts +2 -0
- package/mode/textile.js +440 -0
- package/mode/tiddlywiki.d.ts +2 -0
- package/mode/tiddlywiki.js +277 -0
- package/mode/tiki.d.ts +2 -0
- package/mode/tiki.js +291 -0
- package/mode/toml.d.ts +2 -0
- package/mode/toml.js +74 -0
- package/mode/troff.d.ts +2 -0
- package/mode/troff.js +63 -0
- package/mode/ttcn-cfg.d.ts +2 -0
- package/mode/ttcn-cfg.js +199 -0
- package/mode/ttcn.d.ts +2 -0
- package/mode/ttcn.js +255 -0
- package/mode/turtle.d.ts +2 -0
- package/mode/turtle.js +145 -0
- package/mode/vb.d.ts +2 -0
- package/mode/vb.js +254 -0
- package/mode/vbscript.d.ts +3 -0
- package/mode/vbscript.js +320 -0
- package/mode/velocity.d.ts +2 -0
- package/mode/velocity.js +184 -0
- package/mode/verilog.d.ts +3 -0
- package/mode/verilog.js +601 -0
- package/mode/vhdl.d.ts +2 -0
- package/mode/vhdl.js +172 -0
- package/mode/wast.d.ts +2 -0
- package/mode/wast.js +119 -0
- package/mode/webidl.d.ts +2 -0
- package/mode/webidl.js +179 -0
- package/mode/xml.d.ts +3 -0
- package/mode/xml.js +397 -0
- package/mode/xquery.d.ts +2 -0
- package/mode/xquery.js +415 -0
- package/mode/yacas.d.ts +2 -0
- package/mode/yacas.js +181 -0
- package/mode/yaml.d.ts +2 -0
- package/mode/yaml.js +101 -0
- package/mode/z80.d.ts +3 -0
- package/mode/z80.js +101 -0
- package/package.json +37 -3
package/mode/idl.js
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
function wordRegexp(words) {
|
|
2
|
+
return new RegExp('^((' + words.join(')|(') + '))\\b', 'i');
|
|
3
|
+
};
|
|
4
|
+
|
|
5
|
+
var builtinArray = [
|
|
6
|
+
'a_correlate', 'abs', 'acos', 'adapt_hist_equal', 'alog',
|
|
7
|
+
'alog2', 'alog10', 'amoeba', 'annotate', 'app_user_dir',
|
|
8
|
+
'app_user_dir_query', 'arg_present', 'array_equal', 'array_indices',
|
|
9
|
+
'arrow', 'ascii_template', 'asin', 'assoc', 'atan',
|
|
10
|
+
'axis', 'axis', 'bandpass_filter', 'bandreject_filter', 'barplot',
|
|
11
|
+
'bar_plot', 'beseli', 'beselj', 'beselk', 'besely',
|
|
12
|
+
'beta', 'biginteger', 'bilinear', 'bin_date', 'binary_template',
|
|
13
|
+
'bindgen', 'binomial', 'bit_ffs', 'bit_population', 'blas_axpy',
|
|
14
|
+
'blk_con', 'boolarr', 'boolean', 'boxplot', 'box_cursor',
|
|
15
|
+
'breakpoint', 'broyden', 'bubbleplot', 'butterworth', 'bytarr',
|
|
16
|
+
'byte', 'byteorder', 'bytscl', 'c_correlate', 'calendar',
|
|
17
|
+
'caldat', 'call_external', 'call_function', 'call_method',
|
|
18
|
+
'call_procedure', 'canny', 'catch', 'cd', 'cdf', 'ceil',
|
|
19
|
+
'chebyshev', 'check_math', 'chisqr_cvf', 'chisqr_pdf', 'choldc',
|
|
20
|
+
'cholsol', 'cindgen', 'cir_3pnt', 'clipboard', 'close',
|
|
21
|
+
'clust_wts', 'cluster', 'cluster_tree', 'cmyk_convert', 'code_coverage',
|
|
22
|
+
'color_convert', 'color_exchange', 'color_quan', 'color_range_map',
|
|
23
|
+
'colorbar', 'colorize_sample', 'colormap_applicable',
|
|
24
|
+
'colormap_gradient', 'colormap_rotation', 'colortable',
|
|
25
|
+
'comfit', 'command_line_args', 'common', 'compile_opt', 'complex',
|
|
26
|
+
'complexarr', 'complexround', 'compute_mesh_normals', 'cond', 'congrid',
|
|
27
|
+
'conj', 'constrained_min', 'contour', 'contour', 'convert_coord',
|
|
28
|
+
'convol', 'convol_fft', 'coord2to3', 'copy_lun', 'correlate',
|
|
29
|
+
'cos', 'cosh', 'cpu', 'cramer', 'createboxplotdata',
|
|
30
|
+
'create_cursor', 'create_struct', 'create_view', 'crossp', 'crvlength',
|
|
31
|
+
'ct_luminance', 'cti_test', 'cursor', 'curvefit', 'cv_coord',
|
|
32
|
+
'cvttobm', 'cw_animate', 'cw_animate_getp', 'cw_animate_load',
|
|
33
|
+
'cw_animate_run', 'cw_arcball', 'cw_bgroup', 'cw_clr_index',
|
|
34
|
+
'cw_colorsel', 'cw_defroi', 'cw_field', 'cw_filesel', 'cw_form',
|
|
35
|
+
'cw_fslider', 'cw_light_editor', 'cw_light_editor_get',
|
|
36
|
+
'cw_light_editor_set', 'cw_orient', 'cw_palette_editor',
|
|
37
|
+
'cw_palette_editor_get', 'cw_palette_editor_set', 'cw_pdmenu',
|
|
38
|
+
'cw_rgbslider', 'cw_tmpl', 'cw_zoom', 'db_exists',
|
|
39
|
+
'dblarr', 'dcindgen', 'dcomplex', 'dcomplexarr', 'define_key',
|
|
40
|
+
'define_msgblk', 'define_msgblk_from_file', 'defroi', 'defsysv',
|
|
41
|
+
'delvar', 'dendro_plot', 'dendrogram', 'deriv', 'derivsig',
|
|
42
|
+
'determ', 'device', 'dfpmin', 'diag_matrix', 'dialog_dbconnect',
|
|
43
|
+
'dialog_message', 'dialog_pickfile', 'dialog_printersetup',
|
|
44
|
+
'dialog_printjob', 'dialog_read_image',
|
|
45
|
+
'dialog_write_image', 'dictionary', 'digital_filter', 'dilate', 'dindgen',
|
|
46
|
+
'dissolve', 'dist', 'distance_measure', 'dlm_load', 'dlm_register',
|
|
47
|
+
'doc_library', 'double', 'draw_roi', 'edge_dog', 'efont',
|
|
48
|
+
'eigenql', 'eigenvec', 'ellipse', 'elmhes', 'emboss',
|
|
49
|
+
'empty', 'enable_sysrtn', 'eof', 'eos', 'erase',
|
|
50
|
+
'erf', 'erfc', 'erfcx', 'erode', 'errorplot',
|
|
51
|
+
'errplot', 'estimator_filter', 'execute', 'exit', 'exp',
|
|
52
|
+
'expand', 'expand_path', 'expint', 'extract', 'extract_slice',
|
|
53
|
+
'f_cvf', 'f_pdf', 'factorial', 'fft', 'file_basename',
|
|
54
|
+
'file_chmod', 'file_copy', 'file_delete', 'file_dirname',
|
|
55
|
+
'file_expand_path', 'file_gunzip', 'file_gzip', 'file_info',
|
|
56
|
+
'file_lines', 'file_link', 'file_mkdir', 'file_move',
|
|
57
|
+
'file_poll_input', 'file_readlink', 'file_same',
|
|
58
|
+
'file_search', 'file_tar', 'file_test', 'file_untar', 'file_unzip',
|
|
59
|
+
'file_which', 'file_zip', 'filepath', 'findgen', 'finite',
|
|
60
|
+
'fix', 'flick', 'float', 'floor', 'flow3',
|
|
61
|
+
'fltarr', 'flush', 'format_axis_values', 'forward_function', 'free_lun',
|
|
62
|
+
'fstat', 'fulstr', 'funct', 'function', 'fv_test',
|
|
63
|
+
'fx_root', 'fz_roots', 'gamma', 'gamma_ct', 'gauss_cvf',
|
|
64
|
+
'gauss_pdf', 'gauss_smooth', 'gauss2dfit', 'gaussfit',
|
|
65
|
+
'gaussian_function', 'gaussint', 'get_drive_list', 'get_dxf_objects',
|
|
66
|
+
'get_kbrd', 'get_login_info',
|
|
67
|
+
'get_lun', 'get_screen_size', 'getenv', 'getwindows', 'greg2jul',
|
|
68
|
+
'grib', 'grid_input', 'grid_tps', 'grid3', 'griddata',
|
|
69
|
+
'gs_iter', 'h_eq_ct', 'h_eq_int', 'hanning', 'hash',
|
|
70
|
+
'hdf', 'hdf5', 'heap_free', 'heap_gc', 'heap_nosave',
|
|
71
|
+
'heap_refcount', 'heap_save', 'help', 'hilbert', 'hist_2d',
|
|
72
|
+
'hist_equal', 'histogram', 'hls', 'hough', 'hqr',
|
|
73
|
+
'hsv', 'i18n_multibytetoutf8',
|
|
74
|
+
'i18n_multibytetowidechar', 'i18n_utf8tomultibyte',
|
|
75
|
+
'i18n_widechartomultibyte',
|
|
76
|
+
'ibeta', 'icontour', 'iconvertcoord', 'idelete', 'identity',
|
|
77
|
+
'idl_base64', 'idl_container', 'idl_validname',
|
|
78
|
+
'idlexbr_assistant', 'idlitsys_createtool',
|
|
79
|
+
'idlunit', 'iellipse', 'igamma', 'igetcurrent', 'igetdata',
|
|
80
|
+
'igetid', 'igetproperty', 'iimage', 'image', 'image_cont',
|
|
81
|
+
'image_statistics', 'image_threshold', 'imaginary', 'imap', 'indgen',
|
|
82
|
+
'int_2d', 'int_3d', 'int_tabulated', 'intarr', 'interpol',
|
|
83
|
+
'interpolate', 'interval_volume', 'invert', 'ioctl', 'iopen',
|
|
84
|
+
'ir_filter', 'iplot', 'ipolygon', 'ipolyline', 'iputdata',
|
|
85
|
+
'iregister', 'ireset', 'iresolve', 'irotate', 'isa',
|
|
86
|
+
'isave', 'iscale', 'isetcurrent', 'isetproperty', 'ishft',
|
|
87
|
+
'isocontour', 'isosurface', 'isurface', 'itext', 'itranslate',
|
|
88
|
+
'ivector', 'ivolume', 'izoom', 'journal', 'json_parse',
|
|
89
|
+
'json_serialize', 'jul2greg', 'julday', 'keyword_set', 'krig2d',
|
|
90
|
+
'kurtosis', 'kw_test', 'l64indgen', 'la_choldc', 'la_cholmprove',
|
|
91
|
+
'la_cholsol', 'la_determ', 'la_eigenproblem', 'la_eigenql', 'la_eigenvec',
|
|
92
|
+
'la_elmhes', 'la_gm_linear_model', 'la_hqr', 'la_invert',
|
|
93
|
+
'la_least_square_equality', 'la_least_squares', 'la_linear_equation',
|
|
94
|
+
'la_ludc', 'la_lumprove', 'la_lusol',
|
|
95
|
+
'la_svd', 'la_tridc', 'la_trimprove', 'la_triql', 'la_trired',
|
|
96
|
+
'la_trisol', 'label_date', 'label_region', 'ladfit', 'laguerre',
|
|
97
|
+
'lambda', 'lambdap', 'lambertw', 'laplacian', 'least_squares_filter',
|
|
98
|
+
'leefilt', 'legend', 'legendre', 'linbcg', 'lindgen',
|
|
99
|
+
'linfit', 'linkimage', 'list', 'll_arc_distance', 'lmfit',
|
|
100
|
+
'lmgr', 'lngamma', 'lnp_test', 'loadct', 'locale_get',
|
|
101
|
+
'logical_and', 'logical_or', 'logical_true', 'lon64arr', 'lonarr',
|
|
102
|
+
'long', 'long64', 'lsode', 'lu_complex', 'ludc',
|
|
103
|
+
'lumprove', 'lusol', 'm_correlate', 'machar', 'make_array',
|
|
104
|
+
'make_dll', 'make_rt', 'map', 'mapcontinents', 'mapgrid',
|
|
105
|
+
'map_2points', 'map_continents', 'map_grid', 'map_image', 'map_patch',
|
|
106
|
+
'map_proj_forward', 'map_proj_image', 'map_proj_info',
|
|
107
|
+
'map_proj_init', 'map_proj_inverse',
|
|
108
|
+
'map_set', 'matrix_multiply', 'matrix_power', 'max', 'md_test',
|
|
109
|
+
'mean', 'meanabsdev', 'mean_filter', 'median', 'memory',
|
|
110
|
+
'mesh_clip', 'mesh_decimate', 'mesh_issolid',
|
|
111
|
+
'mesh_merge', 'mesh_numtriangles',
|
|
112
|
+
'mesh_obj', 'mesh_smooth', 'mesh_surfacearea',
|
|
113
|
+
'mesh_validate', 'mesh_volume',
|
|
114
|
+
'message', 'min', 'min_curve_surf', 'mk_html_help', 'modifyct',
|
|
115
|
+
'moment', 'morph_close', 'morph_distance',
|
|
116
|
+
'morph_gradient', 'morph_hitormiss',
|
|
117
|
+
'morph_open', 'morph_thin', 'morph_tophat', 'multi', 'n_elements',
|
|
118
|
+
'n_params', 'n_tags', 'ncdf', 'newton', 'noise_hurl',
|
|
119
|
+
'noise_pick', 'noise_scatter', 'noise_slur', 'norm', 'obj_class',
|
|
120
|
+
'obj_destroy', 'obj_hasmethod', 'obj_isa', 'obj_new', 'obj_valid',
|
|
121
|
+
'objarr', 'on_error', 'on_ioerror', 'online_help', 'openr',
|
|
122
|
+
'openu', 'openw', 'oplot', 'oploterr', 'orderedhash',
|
|
123
|
+
'p_correlate', 'parse_url', 'particle_trace', 'path_cache', 'path_sep',
|
|
124
|
+
'pcomp', 'plot', 'plot3d', 'plot', 'plot_3dbox',
|
|
125
|
+
'plot_field', 'ploterr', 'plots', 'polar_contour', 'polar_surface',
|
|
126
|
+
'polyfill', 'polyshade', 'pnt_line', 'point_lun', 'polarplot',
|
|
127
|
+
'poly', 'poly_2d', 'poly_area', 'poly_fit', 'polyfillv',
|
|
128
|
+
'polygon', 'polyline', 'polywarp', 'popd', 'powell',
|
|
129
|
+
'pref_commit', 'pref_get', 'pref_set', 'prewitt', 'primes',
|
|
130
|
+
'print', 'printf', 'printd', 'pro', 'product',
|
|
131
|
+
'profile', 'profiler', 'profiles', 'project_vol', 'ps_show_fonts',
|
|
132
|
+
'psafm', 'pseudo', 'ptr_free', 'ptr_new', 'ptr_valid',
|
|
133
|
+
'ptrarr', 'pushd', 'qgrid3', 'qhull', 'qromb',
|
|
134
|
+
'qromo', 'qsimp', 'query_*', 'query_ascii', 'query_bmp',
|
|
135
|
+
'query_csv', 'query_dicom', 'query_gif', 'query_image', 'query_jpeg',
|
|
136
|
+
'query_jpeg2000', 'query_mrsid', 'query_pict', 'query_png', 'query_ppm',
|
|
137
|
+
'query_srf', 'query_tiff', 'query_video', 'query_wav', 'r_correlate',
|
|
138
|
+
'r_test', 'radon', 'randomn', 'randomu', 'ranks',
|
|
139
|
+
'rdpix', 'read', 'readf', 'read_ascii', 'read_binary',
|
|
140
|
+
'read_bmp', 'read_csv', 'read_dicom', 'read_gif', 'read_image',
|
|
141
|
+
'read_interfile', 'read_jpeg', 'read_jpeg2000', 'read_mrsid', 'read_pict',
|
|
142
|
+
'read_png', 'read_ppm', 'read_spr', 'read_srf', 'read_sylk',
|
|
143
|
+
'read_tiff', 'read_video', 'read_wav', 'read_wave', 'read_x11_bitmap',
|
|
144
|
+
'read_xwd', 'reads', 'readu', 'real_part', 'rebin',
|
|
145
|
+
'recall_commands', 'recon3', 'reduce_colors', 'reform', 'region_grow',
|
|
146
|
+
'register_cursor', 'regress', 'replicate',
|
|
147
|
+
'replicate_inplace', 'resolve_all',
|
|
148
|
+
'resolve_routine', 'restore', 'retall', 'return', 'reverse',
|
|
149
|
+
'rk4', 'roberts', 'rot', 'rotate', 'round',
|
|
150
|
+
'routine_filepath', 'routine_info', 'rs_test', 's_test', 'save',
|
|
151
|
+
'savgol', 'scale3', 'scale3d', 'scatterplot', 'scatterplot3d',
|
|
152
|
+
'scope_level', 'scope_traceback', 'scope_varfetch',
|
|
153
|
+
'scope_varname', 'search2d',
|
|
154
|
+
'search3d', 'sem_create', 'sem_delete', 'sem_lock', 'sem_release',
|
|
155
|
+
'set_plot', 'set_shading', 'setenv', 'sfit', 'shade_surf',
|
|
156
|
+
'shade_surf_irr', 'shade_volume', 'shift', 'shift_diff', 'shmdebug',
|
|
157
|
+
'shmmap', 'shmunmap', 'shmvar', 'show3', 'showfont',
|
|
158
|
+
'signum', 'simplex', 'sin', 'sindgen', 'sinh',
|
|
159
|
+
'size', 'skewness', 'skip_lun', 'slicer3', 'slide_image',
|
|
160
|
+
'smooth', 'sobel', 'socket', 'sort', 'spawn',
|
|
161
|
+
'sph_4pnt', 'sph_scat', 'spher_harm', 'spl_init', 'spl_interp',
|
|
162
|
+
'spline', 'spline_p', 'sprsab', 'sprsax', 'sprsin',
|
|
163
|
+
'sprstp', 'sqrt', 'standardize', 'stddev', 'stop',
|
|
164
|
+
'strarr', 'strcmp', 'strcompress', 'streamline', 'streamline',
|
|
165
|
+
'stregex', 'stretch', 'string', 'strjoin', 'strlen',
|
|
166
|
+
'strlowcase', 'strmatch', 'strmessage', 'strmid', 'strpos',
|
|
167
|
+
'strput', 'strsplit', 'strtrim', 'struct_assign', 'struct_hide',
|
|
168
|
+
'strupcase', 'surface', 'surface', 'surfr', 'svdc',
|
|
169
|
+
'svdfit', 'svsol', 'swap_endian', 'swap_endian_inplace', 'symbol',
|
|
170
|
+
'systime', 't_cvf', 't_pdf', 't3d', 'tag_names',
|
|
171
|
+
'tan', 'tanh', 'tek_color', 'temporary', 'terminal_size',
|
|
172
|
+
'tetra_clip', 'tetra_surface', 'tetra_volume', 'text', 'thin',
|
|
173
|
+
'thread', 'threed', 'tic', 'time_test2', 'timegen',
|
|
174
|
+
'timer', 'timestamp', 'timestamptovalues', 'tm_test', 'toc',
|
|
175
|
+
'total', 'trace', 'transpose', 'tri_surf', 'triangulate',
|
|
176
|
+
'trigrid', 'triql', 'trired', 'trisol', 'truncate_lun',
|
|
177
|
+
'ts_coef', 'ts_diff', 'ts_fcast', 'ts_smooth', 'tv',
|
|
178
|
+
'tvcrs', 'tvlct', 'tvrd', 'tvscl', 'typename',
|
|
179
|
+
'uindgen', 'uint', 'uintarr', 'ul64indgen', 'ulindgen',
|
|
180
|
+
'ulon64arr', 'ulonarr', 'ulong', 'ulong64', 'uniq',
|
|
181
|
+
'unsharp_mask', 'usersym', 'value_locate', 'variance', 'vector',
|
|
182
|
+
'vector_field', 'vel', 'velovect', 'vert_t3d', 'voigt',
|
|
183
|
+
'volume', 'voronoi', 'voxel_proj', 'wait', 'warp_tri',
|
|
184
|
+
'watershed', 'wdelete', 'wf_draw', 'where', 'widget_base',
|
|
185
|
+
'widget_button', 'widget_combobox', 'widget_control',
|
|
186
|
+
'widget_displaycontextmenu', 'widget_draw',
|
|
187
|
+
'widget_droplist', 'widget_event', 'widget_info',
|
|
188
|
+
'widget_label', 'widget_list',
|
|
189
|
+
'widget_propertysheet', 'widget_slider', 'widget_tab',
|
|
190
|
+
'widget_table', 'widget_text',
|
|
191
|
+
'widget_tree', 'widget_tree_move', 'widget_window',
|
|
192
|
+
'wiener_filter', 'window',
|
|
193
|
+
'window', 'write_bmp', 'write_csv', 'write_gif', 'write_image',
|
|
194
|
+
'write_jpeg', 'write_jpeg2000', 'write_nrif', 'write_pict', 'write_png',
|
|
195
|
+
'write_ppm', 'write_spr', 'write_srf', 'write_sylk', 'write_tiff',
|
|
196
|
+
'write_video', 'write_wav', 'write_wave', 'writeu', 'wset',
|
|
197
|
+
'wshow', 'wtn', 'wv_applet', 'wv_cwt', 'wv_cw_wavelet',
|
|
198
|
+
'wv_denoise', 'wv_dwt', 'wv_fn_coiflet',
|
|
199
|
+
'wv_fn_daubechies', 'wv_fn_gaussian',
|
|
200
|
+
'wv_fn_haar', 'wv_fn_morlet', 'wv_fn_paul',
|
|
201
|
+
'wv_fn_symlet', 'wv_import_data',
|
|
202
|
+
'wv_import_wavelet', 'wv_plot3d_wps', 'wv_plot_multires',
|
|
203
|
+
'wv_pwt', 'wv_tool_denoise',
|
|
204
|
+
'xbm_edit', 'xdisplayfile', 'xdxf', 'xfont', 'xinteranimate',
|
|
205
|
+
'xloadct', 'xmanager', 'xmng_tmpl', 'xmtool', 'xobjview',
|
|
206
|
+
'xobjview_rotate', 'xobjview_write_image',
|
|
207
|
+
'xpalette', 'xpcolor', 'xplot3d',
|
|
208
|
+
'xregistered', 'xroi', 'xsq_test', 'xsurface', 'xvaredit',
|
|
209
|
+
'xvolume', 'xvolume_rotate', 'xvolume_write_image',
|
|
210
|
+
'xyouts', 'zlib_compress', 'zlib_uncompress', 'zoom', 'zoom_24'
|
|
211
|
+
];
|
|
212
|
+
var builtins = wordRegexp(builtinArray);
|
|
213
|
+
|
|
214
|
+
var keywordArray = [
|
|
215
|
+
'begin', 'end', 'endcase', 'endfor',
|
|
216
|
+
'endwhile', 'endif', 'endrep', 'endforeach',
|
|
217
|
+
'break', 'case', 'continue', 'for',
|
|
218
|
+
'foreach', 'goto', 'if', 'then', 'else',
|
|
219
|
+
'repeat', 'until', 'switch', 'while',
|
|
220
|
+
'do', 'pro', 'function'
|
|
221
|
+
];
|
|
222
|
+
var keywords = wordRegexp(keywordArray);
|
|
223
|
+
|
|
224
|
+
var identifiers = new RegExp('^[_a-z\xa1-\uffff][_a-z0-9\xa1-\uffff]*', 'i');
|
|
225
|
+
|
|
226
|
+
var singleOperators = /[+\-*&=<>\/@#~$]/;
|
|
227
|
+
var boolOperators = new RegExp('(and|or|eq|lt|le|gt|ge|ne|not)', 'i');
|
|
228
|
+
|
|
229
|
+
function tokenBase(stream) {
|
|
230
|
+
// whitespaces
|
|
231
|
+
if (stream.eatSpace()) return null;
|
|
232
|
+
|
|
233
|
+
// Handle one line Comments
|
|
234
|
+
if (stream.match(';')) {
|
|
235
|
+
stream.skipToEnd();
|
|
236
|
+
return 'comment';
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Handle Number Literals
|
|
240
|
+
if (stream.match(/^[0-9\.+-]/, false)) {
|
|
241
|
+
if (stream.match(/^[+-]?0x[0-9a-fA-F]+/))
|
|
242
|
+
return 'number';
|
|
243
|
+
if (stream.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/))
|
|
244
|
+
return 'number';
|
|
245
|
+
if (stream.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))
|
|
246
|
+
return 'number';
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// Handle Strings
|
|
250
|
+
if (stream.match(/^"([^"]|(""))*"/)) { return 'string'; }
|
|
251
|
+
if (stream.match(/^'([^']|(''))*'/)) { return 'string'; }
|
|
252
|
+
|
|
253
|
+
// Handle words
|
|
254
|
+
if (stream.match(keywords)) { return 'keyword'; }
|
|
255
|
+
if (stream.match(builtins)) { return 'builtin'; }
|
|
256
|
+
if (stream.match(identifiers)) { return 'variable'; }
|
|
257
|
+
|
|
258
|
+
if (stream.match(singleOperators) || stream.match(boolOperators)) {
|
|
259
|
+
return 'operator'; }
|
|
260
|
+
|
|
261
|
+
// Handle non-detected items
|
|
262
|
+
stream.next();
|
|
263
|
+
return null;
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
export const idl = {
|
|
267
|
+
name: "idl",
|
|
268
|
+
token: function(stream) {
|
|
269
|
+
return tokenBase(stream);
|
|
270
|
+
},
|
|
271
|
+
languageData: {
|
|
272
|
+
autocomplete: builtinArray.concat(keywordArray)
|
|
273
|
+
}
|
|
274
|
+
}
|