From 6eab90ae2b97f6f7c3be492f8584de29eb247f48 Mon Sep 17 00:00:00 2001 From: Wei Ting Date: Mon, 14 Mar 2022 23:42:56 +0800 Subject: [PATCH] Remove `constant` token --- components/prism-vhdl.js | 1 - components/prism-vhdl.min.js | 2 +- tests/languages/vhdl/constant_feature.test | 13 ------------- tests/languages/vhdl/keyword_feature.test | 4 ++++ 4 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 tests/languages/vhdl/constant_feature.test diff --git a/components/prism-vhdl.js b/components/prism-vhdl.js index 679f899608..7426fa2ce5 100644 --- a/components/prism-vhdl.js +++ b/components/prism-vhdl.js @@ -11,7 +11,6 @@ Prism.languages.vhdl = { alias: 'function' }, 'string': /"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/, - 'constant': /\b(?:library|use)\b/i, 'attribute': { pattern: /\b'\w+/, alias: 'attr-name' diff --git a/components/prism-vhdl.min.js b/components/prism-vhdl.min.js index d5965c7e5a..17fd67df3d 100644 --- a/components/prism-vhdl.min.js +++ b/components/prism-vhdl.min.js @@ -1 +1 @@ -Prism.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,constant:/\b(?:library|use)\b/i,attribute:{pattern:/\b'\w+/,alias:"attr-name"},keyword:/\b(?:access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|private|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|view|wait|when|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\w+(?=\()/,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file +Prism.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,attribute:{pattern:/\b'\w+/,alias:"attr-name"},keyword:/\b(?:access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|private|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|view|wait|when|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\w+(?=\()/,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file diff --git a/tests/languages/vhdl/constant_feature.test b/tests/languages/vhdl/constant_feature.test deleted file mode 100644 index 345bfaa139..0000000000 --- a/tests/languages/vhdl/constant_feature.test +++ /dev/null @@ -1,13 +0,0 @@ -use -library - ----------------------------------------------------- - -[ - ["constant", "use"], - ["constant", "library"] -] - ----------------------------------------------------- - -Checks for constants. \ No newline at end of file diff --git a/tests/languages/vhdl/keyword_feature.test b/tests/languages/vhdl/keyword_feature.test index 992804f76f..23c5af65a6 100644 --- a/tests/languages/vhdl/keyword_feature.test +++ b/tests/languages/vhdl/keyword_feature.test @@ -36,6 +36,7 @@ inertial inout is label +library linkage literal loop @@ -73,6 +74,7 @@ type unaffected units until +use variable view wait @@ -121,6 +123,7 @@ with ["keyword", "inout"], ["keyword", "is"], ["keyword", "label"], + ["keyword", "library"], ["keyword", "linkage"], ["keyword", "literal"], ["keyword", "loop"], @@ -158,6 +161,7 @@ with ["keyword", "unaffected"], ["keyword", "units"], ["keyword", "until"], + ["keyword", "use"], ["keyword", "variable"], ["keyword", "view"], ["keyword", "wait"],