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