Debian Codegraph @

extensions/CodeEditor/modules/lib/ace/mode-gcode.js

raw symbols SCIP
1 ace.define("ace/mode/gcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
2 var oop = require("../lib/oop");
3 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
4 var GcodeHighlightRules = function () {
5 var keywords = ("IF|DO|WHILE|ENDWHILE|CALL|ENDIF|SUB|ENDSUB|GOTO|REPEAT|ENDREPEAT|CALL");
6 var builtinConstants = ("PI");
7 var builtinFunctions = ("ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN");
8 var keywordMapper = this.createKeywordMapper({
9 "support.function": builtinFunctions,
10 "keyword": keywords,
11 "constant.language": builtinConstants
12 }, "identifier", true);
13 this.$rules = {
14 "start": [{
15 token: "comment",
16 regex: "\\(.*\\)"
17 }, {
18 token: "comment", // block number
19 regex: "([N])([0-9]+)"
20 }, {
21 token: "string", // " string
22 regex: "([G])([0-9]+\\.?[0-9]?)"
23 }, {
24 token: "string", // ' string
25 regex: "([M])([0-9]+\\.?[0-9]?)"
26 }, {
27 token: "constant.numeric", // float
28 regex: "([-+]?([0-9]*\\.?[0-9]+\\.?))|(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)"
29 }, {
30 token: keywordMapper,
31 regex: "[A-Z]"
32 }, {
33 token: "keyword.operator",
34 regex: "EQ|LT|GT|NE|GE|LE|OR|XOR"
35 }, {
36 token: "paren.lparen",
37 regex: "[\\[]"
38 }, {
39 token: "paren.rparen",
40 regex: "[\\]]"
41 }, {
42 token: "text",
43 regex: "\\s+"
44 }]
45 };
46 };
47 oop.inherits(GcodeHighlightRules, TextHighlightRules);
48 exports.GcodeHighlightRules = GcodeHighlightRules;
49
50 });
51
52 ace.define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"], function(require, exports, module){"use strict";
53 var oop = require("../lib/oop");
54 var TextMode = require("./text").Mode;
55 var GcodeHighlightRules = require("./gcode_highlight_rules").GcodeHighlightRules;
56 var Range = require("../range").Range;
57 var Mode = function () {
58 this.HighlightRules = GcodeHighlightRules;
59 this.$behaviour = this.$defaultBehaviour;
60 };
61 oop.inherits(Mode, TextMode);
62 (function () {
63 this.$id = "ace/mode/gcode";
64 }).call(Mode.prototype);
65 exports.Mode = Mode;
66
67 }); (function() {
68 ace.require(["ace/mode/gcode"], function(m) {
69 if (typeof module == "object" && typeof exports == "object" && module) {
70 module.exports = m;
71 }
72 });
73 })();
74