Debian Codegraph @

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

raw symbols SCIP
1 ace.define("ace/mode/robot_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 RobotHighlightRules = function () {
5 var builtinConstantsRegex = new RegExp(/\$\{CURDIR\}|\$\{TEMPDIR\}|\$\{EXECDIR\}|\$\{\/\}|\$\{\:\}|\$\{\\n\}|\$\{true\}|\$\{false\}|\$\{none\}|\$\{null\}|\$\{space(?:\s*\*\s+[0-9]+)?\}|\$\{empty\}|&\{empty\}|@\{empty\}|\$\{TEST NAME\}|@\{TEST[\s_]TAGS\}|\$\{TEST[\s_]DOCUMENTATION\}|\$\{TEST[\s_]STATUS\}|\$\{TEST[\s_]MESSAGE\}|\$\{PREV[\s_]TEST[\s_]NAME\}|\$\{PREV[\s_]TEST[\s_]STATUS\}|\$\{PREV[\s_]TEST[\s_]MESSAGE\}|\$\{SUITE[\s_]NAME\}|\$\{SUITE[\s_]SOURCE\}|\$\{SUITE[\s_]DOCUMENTATION\}|&\{SUITE[\s_]METADATA\}|\$\{SUITE[\s_]STATUS\}|\$\{SUITE[\s_]MESSAGE\}|\$\{KEYWORD[\s_]STATUS\}|\$\{KEYWORD[\s_]MESSAGE\}|\$\{LOG[\s_]LEVEL\}|\$\{OUTPUT[\s_]FILE\}|\$\{LOG[\s_]FILE\}|\$\{REPORT[\s_]FILE\}|\$\{DEBUG[\s_]FILE\}|\$\{OUTPUT[\s_]DIR\}/);
6 this.$rules = {
7 "start": [{
8 token: "string.robot.header",
9 regex: /^\*{3}\s+(?:settings?|metadata|(?:user )?keywords?|test ?cases?|tasks?|variables?)/,
10 caseInsensitive: true,
11 push: [{
12 token: "string.robot.header",
13 regex: /$/,
14 next: "pop"
15 }, {
16 defaultToken: "string.robot.header"
17 }],
18 comment: "start of a table"
19 }, {
20 token: "comment.robot",
21 regex: /(?:^|\s{2,}|\t|\|\s{1,})(?=[^\\])#/,
22 push: [{
23 token: "comment.robot",
24 regex: /$/,
25 next: "pop"
26 }, {
27 defaultToken: "comment.robot"
28 }]
29 }, {
30 token: "comment",
31 regex: /^\s*\[?Documentation\]?/,
32 caseInsensitive: true,
33 push: [{
34 token: "comment",
35 regex: /^(?!\s*\.\.\.)/,
36 next: "pop"
37 }, {
38 defaultToken: "comment"
39 }]
40 }, {
41 token: "storage.type.method.robot",
42 regex: /\[(?:Arguments|Setup|Teardown|Precondition|Postcondition|Template|Return|Timeout)\]/,
43 caseInsensitive: true,
44 comment: "testcase settings"
45 }, {
46 token: "storage.type.method.robot",
47 regex: /\[Tags\]/,
48 caseInsensitive: true,
49 push: [{
50 token: "storage.type.method.robot",
51 regex: /^(?!\s*\.\.\.)/,
52 next: "pop"
53 }, {
54 token: "comment",
55 regex: /^\s*\.\.\./
56 }, {
57 defaultToken: "storage.type.method.robot"
58 }],
59 comment: "test tags"
60 }, {
61 token: "constant.language",
62 regex: builtinConstantsRegex,
63 caseInsensitive: true
64 }, {
65 token: "entity.name.variable.wrapper",
66 regex: /[$@&%]\{\{?/,
67 push: [{
68 token: "entity.name.variable.wrapper",
69 regex: /\}\}?(\s?=)?/,
70 next: "pop"
71 }, {
72 include: "$self"
73 }, {
74 token: "entity.name.variable",
75 regex: /./
76 }, {
77 defaultToken: "entity.name.variable"
78 }]
79 }, {
80 token: "keyword.control.robot",
81 regex: /^[^\s\t*$|]+|(?=^\|)\s+[^\s\t*$|]+/,
82 push: [{
83 token: "keyword.control.robot",
84 regex: /(?=\s{2})|\t|$|\s+(?=\|)/,
85 next: "pop"
86 }, {
87 defaultToken: "keyword.control.robot"
88 }]
89 }, {
90 token: "constant.numeric.robot",
91 regex: /\b[0-9]+(?:\.[0-9]+)?\b/
92 }, {
93 token: "keyword",
94 regex: /\s{2,}(for|in range|in|end|else if|if|else|with name)(\s{2,}|$)/,
95 caseInsensitive: true
96 }, {
97 token: "storage.type.function",
98 regex: /^(?:\s{2,}\s+)[^ \t*$@&%[.|]+/,
99 push: [{
100 token: "storage.type.function",
101 regex: /(?=\s{2})|\t|$|\s+(?=\|)/,
102 next: "pop"
103 }, {
104 defaultToken: "storage.type.function"
105 }]
106 }]
107 };
108 this.normalizeRules();
109 };
110 RobotHighlightRules.metadata = {
111 fileTypes: ['robot'],
112 name: 'Robot',
113 scopeName: 'source.robot'
114 };
115 oop.inherits(RobotHighlightRules, TextHighlightRules);
116 exports.RobotHighlightRules = RobotHighlightRules;
117
118 });
119
120 ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
121 var oop = require("../../lib/oop");
122 var BaseFoldMode = require("./fold_mode").FoldMode;
123 var FoldMode = exports.FoldMode = function (markers) {
124 this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$");
125 };
126 oop.inherits(FoldMode, BaseFoldMode);
127 (function () {
128 this.getFoldWidgetRange = function (session, foldStyle, row) {
129 var line = session.getLine(row);
130 var match = line.match(this.foldingStartMarker);
131 if (match) {
132 if (match[1])
133 return this.openingBracketBlock(session, match[1], row, match.index);
134 if (match[2])
135 return this.indentationBlock(session, row, match.index + match[2].length);
136 return this.indentationBlock(session, row);
137 }
138 };
139 }).call(FoldMode.prototype);
140
141 });
142
143 ace.define("ace/mode/robot",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/robot_highlight_rules","ace/mode/folding/pythonic"], function(require, exports, module){"use strict";
144 var oop = require("../lib/oop");
145 var TextMode = require("./text").Mode;
146 var RobotHighlightRules = require("./robot_highlight_rules").RobotHighlightRules;
147 var FoldMode = require("./folding/pythonic").FoldMode;
148 var Mode = function () {
149 this.HighlightRules = RobotHighlightRules;
150 this.foldingRules = new FoldMode();
151 this.$behaviour = this.$defaultBehaviour;
152 };
153 oop.inherits(Mode, TextMode);
154 (function () {
155 this.lineCommentStart = "#";
156 this.$id = "ace/mode/robot";
157 this.snippetFileId = "ace/snippets/robot";
158 }).call(Mode.prototype);
159 exports.Mode = Mode;
160
161 }); (function() {
162 ace.require(["ace/mode/robot"], function(m) {
163 if (typeof module == "object" && typeof exports == "object" && module) {
164 module.exports = m;
165 }
166 });
167 })();
168