Debian Codegraph @

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

raw symbols SCIP
1 ace.define("ace/mode/vhdl_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 VHDLHighlightRules = function () {
5 var keywords = "access|after|alias|all|architecture|assert|attribute|" +
6 "begin|block|body|buffer|bus|case|component|configuration|" +
7 "context|disconnect|downto|else|elsif|end|entity|exit|" +
8 "file|for|force|function|generate|generic|group|guarded|" +
9 "if|impure|in|inertial|inout|is|label|library|linkage|" +
10 "literal|loop|map|new|next|of|on|or|open|others|out|" +
11 "package|parameter|port|postponed|procedure|process|" +
12 "protected|pure|range|record|register|reject|release|" +
13 "report|return|select|severity|shared|signal|subtype|then|" +
14 "to|transport|type|unaffected|units|until|use|variable|" +
15 "wait|when|while|with";
16 var storageType = "bit|bit_vector|boolean|character|integer|line|natural|" +
17 "positive|real|register|signed|std_logic|" +
18 "std_logic_vector|string||text|time|unsigned";
19 var storageModifiers = "array|constant";
20 var keywordOperators = "abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|sra" +
21 "srl|xnor|xor";
22 var builtinConstants = ("true|false|null");
23 var keywordMapper = this.createKeywordMapper({
24 "keyword.operator": keywordOperators,
25 "keyword": keywords,
26 "constant.language": builtinConstants,
27 "storage.modifier": storageModifiers,
28 "storage.type": storageType
29 }, "identifier", true);
30 this.$rules = {
31 "start": [{
32 token: "comment",
33 regex: "--.*$"
34 }, {
35 token: "string", // " string
36 regex: '".*?"'
37 }, {
38 token: "string", // ' string
39 regex: "'.*?'"
40 }, {
41 token: "constant.numeric", // float
42 regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
43 }, {
44 token: "keyword", // pre-compiler directives
45 regex: "\\s*(?:library|package|use)\\b"
46 }, {
47 token: keywordMapper,
48 regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
49 }, {
50 token: "keyword.operator",
51 regex: "&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>"
52 }, {
53 token: "punctuation.operator",
54 regex: "\\'|\\:|\\,|\\;|\\."
55 }, {
56 token: "paren.lparen",
57 regex: "[[(]"
58 }, {
59 token: "paren.rparen",
60 regex: "[\\])]"
61 }, {
62 token: "text",
63 regex: "\\s+"
64 }]
65 };
66 };
67 oop.inherits(VHDLHighlightRules, TextHighlightRules);
68 exports.VHDLHighlightRules = VHDLHighlightRules;
69
70 });
71
72 ace.define("ace/mode/vhdl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vhdl_highlight_rules"], function(require, exports, module){"use strict";
73 var oop = require("../lib/oop");
74 var TextMode = require("./text").Mode;
75 var VHDLHighlightRules = require("./vhdl_highlight_rules").VHDLHighlightRules;
76 var Mode = function () {
77 this.HighlightRules = VHDLHighlightRules;
78 this.$behaviour = this.$defaultBehaviour;
79 };
80 oop.inherits(Mode, TextMode);
81 (function () {
82 this.lineCommentStart = "--";
83 this.$id = "ace/mode/vhdl";
84 }).call(Mode.prototype);
85 exports.Mode = Mode;
86
87 }); (function() {
88 ace.require(["ace/mode/vhdl"], function(m) {
89 if (typeof module == "object" && typeof exports == "object" && module) {
90 module.exports = m;
91 }
92 });
93 })();
94