mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-18 14:55:38 -04:00
Merge 9db4f2ecca
into 98ff79dbca
This commit is contained in:
commit
fc0fbb6e2d
@ -86,7 +86,7 @@ rules:
|
||||
## Other
|
||||
- statement: "\\b(?i)(extern|global|section|segment|_start|\\.text|\\.data|\\.bss)(?-i)\\b"
|
||||
- statement: "\\b(?i)(db|dw|dd|dq|dt|ddq|do)(?-i)\\b"
|
||||
- identifier: "[a-z A-Z 0-9 _]+:"
|
||||
- identifier: "[\\w ]+:"
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
|
@ -5,7 +5,7 @@ detect:
|
||||
header: "^#!.*bin/(env +)?awk( |$)"
|
||||
|
||||
rules:
|
||||
- preproc: "\\$[A-Za-z0-9_!@#$*?\\-]+"
|
||||
- preproc: "\\$[\\w!@#$*?\\-]+"
|
||||
- preproc: "\\b(ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)\\b"
|
||||
- preproc: "\\b(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\\b"
|
||||
- preproc: "\\b(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\\b"
|
||||
|
@ -5,7 +5,7 @@ detect:
|
||||
|
||||
rules:
|
||||
- symbol.operator: "([-+/*=<>!~%?:&|]|[.]{3})|\\b(and|or|is|isnt|not)\\b"
|
||||
- identifier.class: "([A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\\()|->)"
|
||||
- identifier.class: "([A-Za-z_]\\w*:[[:space:]]*(->|\\()|->)"
|
||||
- symbol.brackets: "[()]"
|
||||
|
||||
- statement: "\\b(await|when|catch|continue|debugger|default|by|until)\\b"
|
||||
@ -20,7 +20,7 @@ rules:
|
||||
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
||||
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
||||
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
|
||||
- identifier: "@[A-Za-z0-9_]*"
|
||||
- identifier: "@\\w*"
|
||||
|
||||
- error: "\\b(enum|implements|interface|package|private|protected|public)"
|
||||
- constant: "\\b(globalThis|Infinity|null|undefined|NaN)\\b"
|
||||
|
@ -12,7 +12,7 @@ rules:
|
||||
# Ones that can't be in the same regex because they include non-words.
|
||||
# The nil? one has to be after the constants.
|
||||
- statement: "\\b(nil\\?|as(\\?|\\b)|is_a\\?|responds_to\\?)"
|
||||
- type: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*"
|
||||
- type: "(\\$|@|@@)?\\b[A-Z]+\\w*"
|
||||
# Crystal "symbols"
|
||||
- constant: "([ ]|^):[0-9A-Z_]+\\b"
|
||||
# Some unique things we want to stand out
|
||||
|
@ -11,7 +11,7 @@ rules:
|
||||
- identifier.var: "@[A-Za-z]+"
|
||||
|
||||
- preproc: "^[[:space:]]*#[[:space:]]*(define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)"
|
||||
- identifier: "([A-Za-z0-9_]*[[:space:]]*[()])"
|
||||
- identifier: "(\\w*[[:space:]]*[()])"
|
||||
- type: "\\b(bool|byte|sbyte|char|decimal|double|float|IntPtr|int|uint|long|ulong|managed|unmanaged|nint|nuint|object|short|ushort|string|base|this|var|void)\\b"
|
||||
- statement: "\\b(alias|as|case|catch|checked|default|do|dynamic|else|finally|fixed|for|foreach|goto|if|is|lock|new|null|return|switch|throw|try|unchecked|when|while|with)\\b"
|
||||
- statement: "\\b(abstract|add|and|args|async|await|class|const|delegate|enum|event|explicit|extern|file|get|global|implicit|in|init|internal|interface|nameof|namespace|not|notnull|operator|or|out|override|params|partial|private|protected|public|readonly|record|ref|remove|required|scoped|sealed|set|sizeof|stackalloc|static|struct|typeof|unsafe|using|value|virtual|volatile|yield)\\b"
|
||||
|
@ -7,7 +7,7 @@ rules:
|
||||
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
||||
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
||||
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
|
||||
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
|
||||
- identifier: "[A-Za-z_]\\w*[[:space:]]*[(]"
|
||||
- statement: "\\b(break|case|catch|continue|default|else|finally)\\b"
|
||||
- statement: "\\b(for|function|get|if|in|as|is|new|return|set|switch|final|await|async|sync)\\b"
|
||||
- statement: "\\b(switch|this|throw|try|var|void|while|with|import|library|part|const|export)\\b"
|
||||
|
@ -19,10 +19,10 @@ rules:
|
||||
- comment: "#[^{].*$|#$"
|
||||
- comment.bright: "##[^{].*$|##$"
|
||||
|
||||
- type.keyword: "\\:[a-zA-Z][a-zA-Z0-9_]*"
|
||||
- type.keyword: "\\:[a-zA-Z]\\w*"
|
||||
- type.keyword: "\\b(describe|test)"
|
||||
- statement: "\\b(expected|assert|assert_raise|assert_in_delta|assert_received|catch_error|catch_throw|flunk|refute|refute_in_delta|refute_received)\\b"
|
||||
- symbol.tag: "^\\s*\\@[a-zA-Z][a-zA-Z0-9_]*\\b"
|
||||
- symbol.tag: "^\\s*\\@[a-zA-Z]\\w*\\b"
|
||||
|
||||
- identifier.macro: "\\b(__CALLER__|__DIR__|__ENV__|__MODULE__|__aliases__|__block__|defmacro)\\b"
|
||||
|
||||
|
@ -23,7 +23,7 @@ rules:
|
||||
- preproc: "<%|%>"
|
||||
- red: "&[^;[[:space:]]]*;"
|
||||
- statement: "\\b(BEGIN|END|alias|and|begin|break|case|class|def|defined\\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\\b"
|
||||
- identifier.var: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*"
|
||||
- identifier.var: "(\\$|@|@@)?\\b[A-Z]+\\w*"
|
||||
- magenta: "(?i)([ ]|^):[0-9A-Z_]+\\b"
|
||||
- identifier.macro: "\\b(__FILE__|__LINE__)\\b"
|
||||
- brightmagenta: "!/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*"
|
||||
|
@ -4,7 +4,7 @@ detect:
|
||||
filename: "\\.(forth|4th|fs|fs8|ft|fth|frt)$"
|
||||
|
||||
rules:
|
||||
- identifier: "\\b[A-Za-z_0-9-]*\\b"
|
||||
- identifier: "\\b[\\w-]*\\b"
|
||||
|
||||
- statement: "\\b(?i:(if|else|then|do|loop|case|endcase|of|endof|begin|while|repeat|until|again|unloop|leave|exit|done|next|\\?do|\\+do|\\-do|\\+loop|\\-loop|\\?leave))\\b"
|
||||
|
||||
|
@ -14,7 +14,7 @@ rules:
|
||||
# Types
|
||||
- type: "\\b(AABB|Array|Basis|Color|Dictionary|NodePath|Object|Plane|PoolByteArray|PoolColorArray|PoolIntArray|PoolRealArray|PoolVector2Array|PoolVector3Array|Quat|Rect2|RID|String|Transform|Transform2D|Vector2|Vector3)\\b"
|
||||
# Definitions
|
||||
- identifier: "func [a-zA-Z_0-9]+"
|
||||
- identifier: "func \\w+"
|
||||
# Keywords
|
||||
- statement: "\\b(and|as|assert|break|breakpoint|class|const|continue|elif|else|enum|export|extends|for|func|if|in|is|map|master|mastersync|match|not|onready|or|pass|remote|remotesync|return|self|setget|slave|slavesync|signal|sync|tool|var|while|yield)\\b"
|
||||
|
||||
|
@ -12,11 +12,11 @@ rules:
|
||||
- statement: "-(e|d|f|r|g|u|w|x|L)\\b"
|
||||
- statement: "-(eq|ne|gt|lt|ge|le|s|n|z)\\b"
|
||||
# Highlight variables ... official portage ones in red, all others in bright red
|
||||
- preproc: "\\$\\{?[a-zA-Z_0-9]+\\}?"
|
||||
- preproc: "\\$\\{?\\w+\\}?"
|
||||
- special: "\\b(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\\b"
|
||||
- special: "\\b(S|D|T|PV|PF|P|PN|A)\\b|\\bC(XX)?FLAGS\\b|\\bLDFLAGS\\b|\\bC(HOST|TARGET|BUILD)\\b"
|
||||
# Highlight portage commands
|
||||
- identifier: "\\buse(_(with|enable))?\\b [!a-zA-Z0-9_+ -]*|inherit.*"
|
||||
- identifier: "\\buse(_(with|enable))?\\b [!\\w+ -]*|inherit.*"
|
||||
- statement: "\\be(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\\b"
|
||||
- statement: "\\bdie\\b|\\buse(_(with|enable))?\\b|\\binherit\\b|\\bhas\\b|\\b(has|best)_version\\b|\\bunpack\\b"
|
||||
- statement: "\\b(do|new)(ins|s?bin|doc|lib(\\.so|\\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\\b"
|
||||
|
@ -5,8 +5,8 @@ detect:
|
||||
|
||||
rules:
|
||||
# Use flags:
|
||||
- constant.bool.false: "[[:space:]]+\\+?[a-zA-Z0-9_-]+"
|
||||
- constant.bool.true: "[[:space:]]+-[a-zA-Z0-9_-]+"
|
||||
- constant.bool.false: "[[:space:]]+\\+?[\\w-]+"
|
||||
- constant.bool.true: "[[:space:]]+-[\\w-]+"
|
||||
# Likely version numbers:
|
||||
- special: "-[[:digit:]].*([[:space:]]|$)"
|
||||
# Accepted arches:
|
||||
|
@ -4,7 +4,7 @@ detect:
|
||||
filename: "\\.(frag|vert|fp|vp|glsl)$"
|
||||
|
||||
rules:
|
||||
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
|
||||
- identifier: "[A-Za-z_]\\w*[[:space:]]*[()]"
|
||||
- type: "\\b(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\\b"
|
||||
- identifier: "\\bgl_(DepthRangeParameters|PointParameters|MaterialParameters|LightSourceParameters|LightModelParameters|LightModelProducts|LightProducts|FogParameters)\\b"
|
||||
- statement: "\\b(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\\b"
|
||||
|
@ -5,7 +5,7 @@ detect:
|
||||
|
||||
rules:
|
||||
# URL
|
||||
- type: "(^|[ \\t])+\\b([a-zA-Z0-9-]+\\.?)+(/[a-zA-Z0-9-_\\.]+)*\\b"
|
||||
- type: "(^|[ \\t])+\\b([\\w-]+\\.?)+(/[\\w-\\.]+)*\\b"
|
||||
|
||||
# Keywords
|
||||
- special: "(^|[ \\t])+\\b(module|go)\\b"
|
||||
|
@ -41,7 +41,7 @@ rules:
|
||||
- constant.bool: "\\b(true|false|null)\\b"
|
||||
|
||||
# Annotations
|
||||
- identifier: "@[A-Za-z_$][A-Za-z0-9_$]*\\b"
|
||||
- identifier: "@[A-Za-z_$][\\w$]*\\b"
|
||||
|
||||
# Single-quoted strings
|
||||
- constant.string:
|
||||
@ -61,7 +61,7 @@ rules:
|
||||
skip: "\\\\."
|
||||
rules:
|
||||
- constant.specialChar: "\\\\([\"'bfnrst\\x24\\\\]|u[a-fA-F0-9]{4})"
|
||||
- identifier.var: "\\x24[\\w\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE]+([.][a-zA-Z0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE]+)*"
|
||||
- identifier.var: "\\x24[\\w\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE]+([.][\\w\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE]+)*"
|
||||
- identifier: "\\x24[{].*[}]"
|
||||
|
||||
# Triple-double-quoted strings
|
||||
@ -71,7 +71,7 @@ rules:
|
||||
skip: "\\\\."
|
||||
rules:
|
||||
- constant.specialChar: "\\\\([\"'bfnrst\\x24\\\\]|u[a-fA-F0-9]{4})"
|
||||
- identifier.var: "\\x24[\\w\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE]+([.][a-zA-Z0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE]+)*"
|
||||
- identifier.var: "\\x24[\\w\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE]+([.][\\w\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE]+)*"
|
||||
- identifier:
|
||||
start: "[$][{]"
|
||||
end: "[}]"
|
||||
|
@ -6,11 +6,11 @@ detect:
|
||||
rules:
|
||||
- symbol: "-|="
|
||||
- default: "->|=>"
|
||||
- constant: "([ ]|^)%[0-9A-Za-z_]+>"
|
||||
- special: ":[0-9A-Za-z_]+>"
|
||||
- constant: "([ ]|^)%\\w+>"
|
||||
- special: ":\\w+>"
|
||||
- type: "\\.[A-Za-z_]+>"
|
||||
- constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!"
|
||||
- constant.string: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!"
|
||||
- identifier: "#\\{[^}]*\\}"
|
||||
- identifier.var: "(@|@@)[0-9A-Z_a-z]+"
|
||||
- identifier.var: "(@|@@)\\w+"
|
||||
- comment: "#[^{].*$|#$"
|
||||
|
@ -15,7 +15,7 @@ rules:
|
||||
- special: "\\b(as|const|def|defer|enum|export|fn|is|let|match|static|struct|type|union|yield|_)\\b"
|
||||
- preproc: "\\b(abort|alloc|append|assert|delete|free|insert|len|nullable|offset|size)\\b"
|
||||
- preproc: "^use .+;"
|
||||
- preproc: "\\@([a-zA-Z_][0-9a-zA-Z_]+)\\b"
|
||||
- preproc: "\\@([a-zA-Z_]\\w+)\\b"
|
||||
|
||||
- constant: "\\b(false|null|true)\\b"
|
||||
- constant.number: "\\b(0x[0-9A-Fa-f]+(i(8|16|32|64)?|u(8|16|32|64)?|z)?)\\b"
|
||||
|
@ -7,8 +7,8 @@ rules:
|
||||
- symbol.operator: "[!#$%&:*+/<=>?@.\\\\^\\|~\\p{Sm}\\-]+"
|
||||
|
||||
# Identifiers (with or without a module name)
|
||||
- type: "\\b([A-Z][A-Za-z0-9_]*\\.)*[A-Z]+[A-Za-z0-9_']*\\b"
|
||||
- default: "\\b([A-Z][A-Za-z0-9_]*\\.)*[a-z][A-Za-z0-9_']*\\b"
|
||||
- type: "\\b([A-Z]\\w*\\.)*[A-Z]+[\\w']*\\b"
|
||||
- default: "\\b([A-Z]\\w*\\.)*[a-z][\\w']*\\b"
|
||||
|
||||
- statement: ";"
|
||||
- symbol.bracket: "[\\(\\)\\[\\]\\{\\}]"
|
||||
|
@ -8,7 +8,7 @@ rules:
|
||||
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
||||
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
||||
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
|
||||
#- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
|
||||
#- identifier: "[A-Za-z_]\\w*[[:space:]]*[(]"
|
||||
# ^ this is not correct usage of the identifier color
|
||||
- symbol.brackets: "[(){}]|\\[|\\]"
|
||||
- symbol.operator: "([-+/*=<>!~%?:&|]|[.]{3})"
|
||||
|
@ -14,7 +14,7 @@ rules:
|
||||
# the standard library
|
||||
- identifier: "\\bstd\\.(extVar|thisFile|type|length|objectHas|objectFields|objectHasAll|objectFieldsAll|prune|mapWithKey|abs|sign|max|min|pow|exp|log|exponent|mantissa|floor|ceil|sqrt|sin|cos|tan|asin|acos|atan|mod|assertEqual|toString|codepoint|char|substr|findSubstr|startsWith|endsWith|split|splitLimit|strReplace|asciiUpper|asciiLower|stringChars|format|escapeStringDollars|escapeStringPython|parseInt|parseOctal|parseHex|parseJson|encodeUTF8|decodeUTF8|manifestIni|manifestPython|manifestPythonVars|manifestJsonEx|manifestYamlDoc|manifestYamlStream|manifestXmlJsonml|makeArray|count|find|map|mapWithIndex|filterMap|filter|foldl|foldr|range|join|lines|flattenArrays|sort|uniq|set|setInter|setUnion|setDiff|setMember|base64|base64DecodeBytes|base64Decode|md5|mergePatch|trace)\\b"
|
||||
# unquoted object keys
|
||||
- type: "[_a-zA-Z][_a-zA-Z0-9]*\\s*:"
|
||||
- type: "[_a-zA-Z]\\w*\\s*:"
|
||||
# object key separator
|
||||
- statement: ":"
|
||||
# keywords
|
||||
|
@ -10,14 +10,14 @@ rules:
|
||||
- constant.bool: "\\b(true|false)\\b"
|
||||
- constant: "\\b(nothing|missing)\\b"
|
||||
# built-in attributes
|
||||
- constant: "__[A-Za-z0-9_]+__"
|
||||
- constant: "__\\w+__"
|
||||
# definitions
|
||||
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
|
||||
- identifier: "[A-Za-z_]\\w*[[:space:]]*[(]"
|
||||
# keywords
|
||||
- statement: "\\b(baremodule|begin|break|catch|const|continue|do|else|elseif|end|export|finally|for|function|global|if|import|let|local|macro|module|public|quote|return|struct|try|using|while)\\b"
|
||||
- statement: "\\b(abstract\\s+type|primitive\\s+type|mutable\\s+struct)\\b"
|
||||
# decorators
|
||||
- identifier.macro: "@[A-Za-z0-9_]+"
|
||||
- identifier.macro: "@\\w+"
|
||||
# operators
|
||||
- symbol.operator: "[:+*|=!%~<>/\\-?&\\\\÷∈∉∘]|\\b(in|isa|where)\\b"
|
||||
# for some reason having ^ in the same regex with the other operators broke things
|
||||
|
@ -14,7 +14,7 @@ rules:
|
||||
- type: "\\b(canvas)\\b"
|
||||
|
||||
# functions
|
||||
- identifier.function: "[a-zA-Z_0-9]+\\("
|
||||
- identifier.function: "\\w+\\("
|
||||
|
||||
# built-in functions
|
||||
- type: "\\b(abs|all|any|ascii|bin|bool|breakpoint|bytearray|bytes)\\b"
|
||||
|
@ -6,11 +6,11 @@ detect:
|
||||
rules:
|
||||
- symbol.brackets: "\\(|\\)"
|
||||
- type: "defun|define-syntax|define|defmacro|defmodule|export"
|
||||
- constant: "\\ [A-Za-z][A-Za-z0-9_-]+\\ "
|
||||
- constant: "\\ [A-Za-z][\\w-]+\\ "
|
||||
- symbol.operator: "\\(([\\-+*/<>]|<=|>=)|'"
|
||||
- constant.number: "\\b[0-9]+\\b"
|
||||
- constant.string: "\\\"(\\\\.|[^\"])*\\\""
|
||||
- special: "['|`][A-Za-z][A-Za-z0-9_\\-]+"
|
||||
- special: "['|`][A-Za-z][\\w\\-]+"
|
||||
- constant.specialChar: "\\\\.?"
|
||||
- comment: "(^|[[:space:]]);.*"
|
||||
- indent-char.whitespace: "[[:space:]]+$"
|
||||
|
@ -10,7 +10,7 @@ rules:
|
||||
- special: "\\bnil\\b"
|
||||
- preproc: "\\b[tT]b>"
|
||||
- constant.string: "\\\"(\\\\.|[^\"])*\\\""
|
||||
- constant.specialChar: "'[A-Za-z][A-Za-z0-9_-]+"
|
||||
- constant.specialChar: "'[A-Za-z][\\w-]+"
|
||||
- constant.specialChar: "\\\\.?"
|
||||
- comment: "(^|[[:space:]]);.*"
|
||||
- indent-char.whitespace: "[[:space:]]+$"
|
||||
|
@ -14,7 +14,7 @@ rules:
|
||||
- symbol: "[-=/:;,@]"
|
||||
- symbol.operator: "[<>.&|^!]|\\b(and|ge|gt|le|lt|or|xor)\\b"
|
||||
- constant.string: '([\"]{1})(.*)([\"]{1})'
|
||||
- identifier.var: "[$@][a-zA-Z_.][a-zA-Z0-9_/.-]*"
|
||||
- identifier.var: "[$@][a-zA-Z_.][\\w/.-]*"
|
||||
- comment: "(^|[[:space:]])#([^{].*)?$"
|
||||
- indent-char.whitespace: "[[:space:]]+$"
|
||||
- indent-char: " + +| + +"
|
||||
|
@ -9,7 +9,7 @@ rules:
|
||||
- statement: "(^|[[:space:]{;])(access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth_basic|auth_basic_user_file|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|default_type|deny|directio|directio_alignment|disable_symlinks|empty_gif|env|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|log_format|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|port_in_redirect|postpone_output|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_header|proxy_read_timeout|proxy_redirect|proxy_send_timeout|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|working_directory|xml_entities|xslt_stylesheet|xslt_types)([[:space:]]|$)"
|
||||
- constant.bool.true: "\\b(on)\\b"
|
||||
- constant.bool.false: "\\b(off)\\b"
|
||||
- identifier: "\\$[A-Za-z][A-Za-z0-9_]*"
|
||||
- identifier: "\\$[A-Za-z]\\w*"
|
||||
- symbol: "[*]"
|
||||
- constant-string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
||||
- constant.string:
|
||||
|
@ -8,8 +8,8 @@ rules:
|
||||
- type: "\\b(float|double|CGFloat|id|bool|BOOL|Boolean|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline|Class|SEL|IMP|NS(U)?Integer)\\b"
|
||||
- type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\\b"
|
||||
- type: "\\b[A-Z][A-Z][[:alnum:]]*\\b"
|
||||
- type: "\\b[A-Za-z0-9_]*_t\\b"
|
||||
- type: "\\bdispatch_[a-zA-Z0-9_]*_t\\b"
|
||||
- type: "\\b\\w*_t\\b"
|
||||
- type: "\\bdispatch_\\w*_t\\b"
|
||||
|
||||
- statement: "(__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__|__unused|_Nonnull|_Nullable|__block|__builtin.*)"
|
||||
- statement: "\\b(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\\b"
|
||||
|
@ -17,7 +17,7 @@ rules:
|
||||
- statement: "\\b(if|then|else)\\b"
|
||||
#blocs
|
||||
- type: "\\b(begin|end|object|struct|sig|for|while|do|done|to|downto)\\b"
|
||||
- type: "'[0-9A-Za-z_]+"
|
||||
- type: "'\\w+"
|
||||
#constantes
|
||||
- constant.bool: "\\b(true|false)\\b"
|
||||
#modules/classes
|
||||
|
@ -4,10 +4,10 @@ detect:
|
||||
filename: "\\.l?peg$"
|
||||
|
||||
rules:
|
||||
- identifier: "^[[:space:]]*[A-Za-z][A-Za-z0-9_]*[[:space:]]*<-"
|
||||
- identifier: "^[[:space:]]*[A-Za-z]\\w*[[:space:]]*<-"
|
||||
- constant.number: "\\^[+-]?[0-9]+"
|
||||
- symbol.operator: "[-+*?^/!&]|->|<-|=>"
|
||||
- identifier.var: "%[A-Za-z][A-Za-z0-9_]*"
|
||||
- identifier.var: "%[A-Za-z]\\w*"
|
||||
- special: "\\[[^]]*\\]"
|
||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
||||
- comment: "(^|[[:space:]])\\-\\-.*$"
|
||||
|
@ -22,7 +22,7 @@ rules:
|
||||
end: '"'
|
||||
skip: '\\"'
|
||||
rules:
|
||||
- identifier.var: '[\\$@%].[a-zA-Z0-9_]*'
|
||||
- identifier.var: '[\\$@%].\w*'
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
@ -38,7 +38,7 @@ rules:
|
||||
- constant.number: "\\b[0-9]+"
|
||||
- constant.number: "\\b0x[a-f0-9]+"
|
||||
- constant.string.url: "`(.+?)`"
|
||||
- identifier.var: '[\\$@%].[a-zA-Z0-9_]*'
|
||||
- identifier.var: '[\\$@%].\w*'
|
||||
|
||||
- preproc:
|
||||
start: "(^use| = new)"
|
||||
|
@ -19,10 +19,10 @@ rules:
|
||||
- constant.string.url: "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
|
||||
- comment: "<!--.+?-->"
|
||||
- default: "<\\?(php|=)\" end=\"\\?>"
|
||||
- identifier.class: "([a-zA-Z0-9_-]+)\\("
|
||||
- identifier.class: "([\\w-]+)\\("
|
||||
- type: "\\b(array|bool|callable|float|int|iterable|object|mixed|string|void)\\b"
|
||||
- identifier.class: "[a-zA-Z\\\\]+::"
|
||||
- identifier: "\\b([A-Z][a-zA-Z0-9_]+)\\b"
|
||||
- identifier: "\\b([A-Z]\\w+)\\b"
|
||||
- identifier: "([A-Z0-9_]+)[;|\\s|\\)|,]"
|
||||
- type.keyword: "\\b(global|final|public|private|protected|static|const|var)\\b"
|
||||
- statement: "\\b(abstract|catch|class|declare|do|else(if)?|end(declare|for(each)?|if|switch|while)|enum|finally|for(each)|function|if|interface|namespace|switch|trait|try|while)\\b"
|
||||
@ -33,7 +33,7 @@ rules:
|
||||
- constant.number: "[0-9]"
|
||||
- identifier: "(\\$this|parent|self|\\$this->)"
|
||||
- symbol.operator: "(=>|===|!==|==|!=|&&|\\|\\||::|=|->|\\!)"
|
||||
- identifier.var: "(\\$[a-zA-Z0-9\\-_]+)"
|
||||
- identifier.var: "(\\$[\\w\\-]+)"
|
||||
- symbol.operator: "[\\(|\\)|/|+|\\-|\\*|\\[|.|,|;]"
|
||||
- symbol.brackets: "(\\[|\\]|\\{|\\}|[()])"
|
||||
|
||||
|
@ -7,6 +7,6 @@ rules:
|
||||
- preproc: "^(Name|Description|URL|Version|Conflicts|Cflags):"
|
||||
- preproc: "^(Requires|Libs)(\\.private)?:"
|
||||
- symbol.operator: "="
|
||||
- identifier.var: "\\$\\{[A-Za-z_][A-Za-z0-9_]*\\}"
|
||||
- identifier.var: "\\$\\{[A-Za-z_]\\w*\\}"
|
||||
- indent-char.whitespace: "[[:space:]]+$"
|
||||
- indent-char: " + +| + +"
|
||||
|
@ -18,7 +18,7 @@ rules:
|
||||
- symbol.operator: "(\\-|\\+|\\*|/|\\!|%|<<|>>)"
|
||||
- symbol.operator: "(==|!=|<=|>=|<|>)"
|
||||
- statement: "\\b(is|isnt|not|and|or|xor)\\b"
|
||||
- type: "\\b(_*[A-Z][_a-zA-Z0-9\\']*)\\b"
|
||||
- type: "\\b(_*[A-Z][\\w\\']*)\\b"
|
||||
- constant: "\\b(this)\\b"
|
||||
- constant.bool: "\\b(true|false)\\b"
|
||||
- constant.number: "\\b((0b[0-1_]*)|(0o[0-7_]*)|(0x[0-9a-fA-F_]*)|([0-9_]+(\\.[0-9_]+)?((e|E)(\\\\+|-)?[0-9_]+)?))\\b"
|
||||
|
@ -9,7 +9,7 @@ rules:
|
||||
- type: "\\b(augeas|computer|cron|exec|file|filebucket|group|host|interface|k5login|macauthorization|mailalias|maillist|mcx|mount|nagios_command|nagios_contact|nagios_contactgroup|nagios_host|nagios_hostdependency|nagios_hostescalation|nagios_hostextinfo|nagios_hostgroup|nagios_service|nagios_servicedependency|nagios_serviceescalation|nagios_serviceextinfo|nagios_servicegroup|nagios_timeperiod|notify|package|resources|router|schedule|scheduled_task|selboolean|selmodule|service|ssh_authorized_key|sshkey|stage|tidy|user|vlan|yumrepo|zfs|zone|zpool|anchor)\\b"
|
||||
- statement: "\\b(class|define|if|else|undef|inherits)\\b"
|
||||
- symbol: "(=|-|~|>)"
|
||||
- identifier.var: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*"
|
||||
- identifier.var: "(\\$|@|@@)?\\b[A-Z]+\\w*"
|
||||
- symbol: "([ ]|^):[0-9A-Z_]+\\b"
|
||||
- constant: "/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*"
|
||||
- constant.string: "`[^`]*`|%x\\{[^}]*\\}"
|
||||
|
@ -17,7 +17,7 @@ rules:
|
||||
# types
|
||||
- type: "\\b(basestring|bool|buffer|bytearray|bytes|classmethod|complex|dict|enumerate|file|float|frozenset|int|list|long|map|memoryview|object|property|reversed|set|slice|staticmethod|str|super|tuple|type|unicode|xrange)\\b"
|
||||
# definitions
|
||||
- identifier: "def [a-zA-Z_0-9]+"
|
||||
- identifier: "def \\w+"
|
||||
# keywords
|
||||
- statement: "\\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\\b"
|
||||
# decorators
|
||||
|
@ -16,7 +16,7 @@ rules:
|
||||
# types
|
||||
- type: "\\b(bool|bytearray|bytes|classmethod|complex|dict|enumerate|filter|float|frozenset|int|list|map|memoryview|object|property|range|reversed|set|slice|staticmethod|str|super|tuple|type|zip)\\b"
|
||||
# definitions
|
||||
- identifier: "def [a-zA-Z_0-9]+"
|
||||
- identifier: "def \\w+"
|
||||
# keywords
|
||||
- statement: "\\b(and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|raise|return|try|while|with|yield)\\b"
|
||||
# decorators
|
||||
|
@ -19,7 +19,7 @@ rules:
|
||||
- preproc: "(ifarch|ifnarch|ifos|ifnos)"
|
||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
||||
- statement: "%(if|else|endif|define|global|undefine)"
|
||||
- statement: "%_?([A-Z_a-z_0-9_]*)"
|
||||
- statement: "%_?(\\w*)"
|
||||
- statement:
|
||||
start: "%\\{"
|
||||
end: "\\}"
|
||||
|
@ -17,7 +17,7 @@ rules:
|
||||
- todo: "(XXX|TODO|FIXME|BUG|\\?\\?\\?)"
|
||||
|
||||
- statement: "\\b(BEGIN|END|alias|and|begin|break|case|class|def|defined\\?|do|else|elsif|end|ensure|for|if|in|module|next|nil|not|or|private|protected|public|redo|rescue|retry|return|self|super|then|undef|unless|until|when|while|yield)\\b"
|
||||
- constant: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*"
|
||||
- constant: "(\\$|@|@@)?\\b[A-Z]+\\w*"
|
||||
- constant.number: "(?i)\\b0x[0-9a-fA-F][0-9a-f_]*\\b"
|
||||
- constant.number: "(?i)\\b0b[01][01_]*\\b"
|
||||
- constant.number: "(?i)\\b[0-9][0-9_]*(['.'][0-9_]+)?(e[\\-]?[0-9_]+)?\\b"
|
||||
|
@ -17,7 +17,7 @@ rules:
|
||||
# Booleans
|
||||
- constant: "\\b(true|false)\\b"
|
||||
# Traits/Enums/Structs/Types/etc.
|
||||
- type: "\\b[A-Z]+[a-zA-Z_0-9]*[a-z]+[a-zA-Z_0-9]*\\b"
|
||||
- type: "\\b[A-Z]+\\w*[a-z]+\\w*\\b"
|
||||
# Builtin types that start with lowercase.
|
||||
- type: "\\b(bool|str|char|((i|u)(8|16|32|64|128|size))|f(16|32|64|128))\\b"
|
||||
|
||||
|
@ -17,7 +17,7 @@ rules:
|
||||
# types
|
||||
- type: "\\b(basestring|bool|buffer|bytearray|bytes|classmethod|complex|dict|enumerate|file|float|frozenset|int|list|long|map|memoryview|object|property|reversed|set|slice|staticmethod|str|super|tuple|type|unicode|xrange)\\b"
|
||||
# definitions
|
||||
- identifier: "def [a-zA-Z_0-9]+"
|
||||
- identifier: "def \\w+"
|
||||
# keywords
|
||||
- statement: "\\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\\b"
|
||||
# decorators
|
||||
|
@ -5,7 +5,7 @@ detect:
|
||||
|
||||
rules:
|
||||
- statement: "\\b(self|nil|true|false|ifTrue|ifFalse|whileTrue|whileFalse)\\b"
|
||||
- constant: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*"
|
||||
- constant: "(\\$|@|@@)?\\b[A-Z]+\\w*"
|
||||
- constant.number: "(?i)\\b0x[0-9a-fA-F][0-9a-f_]*\\b"
|
||||
- constant.number: "(?i)\\b0b[01][01_]*\\b"
|
||||
- constant.number: "(?i)\\b[0-9][0-9_]*(['.'][0-9_]+)?(e[\\-]?[0-9_]+)?\\b"
|
||||
|
@ -6,7 +6,7 @@ detect:
|
||||
rules:
|
||||
- preproc: "\\b(contract|library|pragma)\\b"
|
||||
- constant.number: "\\b[-]?([0-9]+|0x[0-9a-fA-F]+)\\b"
|
||||
- identifier: "[a-zA-Z][_a-zA-Z0-9]*[[:space:]]*"
|
||||
- identifier: "[a-zA-Z]\\w*[[:space:]]*"
|
||||
- statement: "\\b(assembly|break|continue|do|for|function|if|else|new|return|returns|while)\\b"
|
||||
- special: "\\b(\\.send|throw)\\b" # make sure they are very visible
|
||||
- type.keyword: "\\b(anonymous|constant|indexed|payable|public|private|external|internal)\\b"
|
||||
|
@ -38,7 +38,7 @@ rules:
|
||||
- constant.number: '[+-]?(\d+_)*\d+(\.(\d+_)*\d+)?[Ee][+-]?(\d+_)*\d+'
|
||||
- constant.number: '(\+|-)(inf|nan)'
|
||||
# Bare key, keys starting with a digit or dash are ambiguous with numbers and are skipped
|
||||
- identifier: '\b[A-Za-z_][A-Za-z0-9_-]*\b'
|
||||
- identifier: '\b[A-Za-z_][\w-]*\b'
|
||||
# Boolean and inf, nan without sign
|
||||
- constant.bool.true: '\btrue\b'
|
||||
- constant.bool.false: '\bfalse\b'
|
||||
|
@ -7,7 +7,7 @@ rules:
|
||||
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
||||
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
||||
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
|
||||
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
|
||||
- identifier: "[A-Za-z_]\\w*[[:space:]]*[(]"
|
||||
- statement: "\\b(abstract|as|async|await|break|case|catch|class|const|constructor|continue)\\b"
|
||||
- statement: "\\b(debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from)\\b"
|
||||
- statement: "\\b(function|get|if|implements|import|in|instanceof|interface|is|let|module|namespace)\\b"
|
||||
|
@ -16,7 +16,7 @@ rules:
|
||||
- identifier.platform: "\\b(amd64|aarch64|x64|x32|little_endian|big_endian)\\b"
|
||||
- identifier.other: "\\b(debug|test|js|glibc|prealloc|no_bounds_checking)\\b"
|
||||
|
||||
- identifier.class: "\\b([A-Z][A-Za-z0-9_]*)\\b"
|
||||
- identifier.class: "\\b([A-Z]\\w*)\\b"
|
||||
- identifier.function: "\\b([a-z_]+\\()"
|
||||
- symbol.operator: "\\b(i[ns])\\b|[-+/*<>!=~*%&:|,.?]"
|
||||
- symbol.attribute:
|
||||
|
@ -5,7 +5,7 @@ detect:
|
||||
|
||||
rules:
|
||||
- type: "\\b(float|double|bool|u?char|u?int(8|16|32|64)?|u?short|u?long|void|s?size_t|unichar)\\b"
|
||||
- identifier.class: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
|
||||
- identifier.class: "[A-Za-z_]\\w*[[:space:]]*[()]"
|
||||
- statement: "\\b(for|if|while|do|else|case|default|switch|try|throw|catch)\\b"
|
||||
- statement: "\\b(inline|typedef|struct|enum|union|extern|static|const)\\b"
|
||||
- statement: "\\b(operator|new|delete|return|null)\\b"
|
||||
|
@ -7,7 +7,7 @@ rules:
|
||||
- preproc: "\\b(module|package|program|endmodule|endpackage|endprogram)\\b"
|
||||
- type.keyword: "\\b(task|interface|class|endtask|endinterface|endclass)\\b"
|
||||
# builtin functions like $display
|
||||
- special: "\\$[0-9A-Za-z_]+"
|
||||
- special: "\\$\\w+"
|
||||
|
||||
# Verilog keywords
|
||||
- statement: "\\b(always|and|assign|automatic|begin|buf|bufif0|bufif1|case|casex|casez|cell|cmos|config)\\b"
|
||||
@ -38,7 +38,7 @@ rules:
|
||||
- constant.number: "\\b[0-9]+\\b"
|
||||
- constant.number: "\\b'[su]?[dboh][0-9xzXZa-fA-F]+\\b"
|
||||
# .asdf(...) argument syntax
|
||||
- special: "\\.((\\*)|([A-Za-z][A-Za-z0-9_]*))"
|
||||
- special: "\\.((\\*)|([A-Za-z]\\w*))"
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
|
@ -5,12 +5,12 @@ detect:
|
||||
|
||||
rules:
|
||||
- type: "(?i)\\b(string|integer|natural|positive|(un)?signed|std_u?logic(_vector)?|bit(_vector)?|boolean|u?x01z?|array|range)\\b"
|
||||
- identifier: "(?i)library[[:space:]]+[a-zA-Z_0-9]+"
|
||||
- identifier: "(?i)use[[:space:]]+[a-zA-Z_0-9\\.]+"
|
||||
- identifier: "(?i)component[[:space:]]+[a-zA-Z_0-9]+"
|
||||
- identifier: "(?i)(architecture|configuration)[[:space:]]+[a-zA-Z_0-9]+[[:space:]]+of[[:space:]]+[a-zA-Z_0-9]+"
|
||||
- identifier: "(?i)(entity|package)[[:space:]]+[a-zA-Z_0-9]+[[:space:]]+is"
|
||||
- identifier: "(?i)end[[:space:]]+((architecture|entity|component|process|package|generate)[[:space:]]+)?[a-zA-Z_0-9]+"
|
||||
- identifier: "(?i)library[[:space:]]+\\w+"
|
||||
- identifier: "(?i)use[[:space:]]+[\\w\\.]+"
|
||||
- identifier: "(?i)component[[:space:]]+\\w+"
|
||||
- identifier: "(?i)(architecture|configuration)[[:space:]]+\\w+[[:space:]]+of[[:space:]]+\\w+"
|
||||
- identifier: "(?i)(entity|package)[[:space:]]+\\w+[[:space:]]+is"
|
||||
- identifier: "(?i)end[[:space:]]+((architecture|entity|component|process|package|generate)[[:space:]]+)?\\w+"
|
||||
- statement: "(?i)\\b(abs|access|after|alias|all|and|architecture|assert|attribute)\\b"
|
||||
- statement: "(?i)\\b(begin|block|body|buffer|bus|case|component|configuration|constant)\\b"
|
||||
- statement: "(?i)\\b(disconnect|downto|else|elsif|end|entity|exit)\\b"
|
||||
|
@ -4,7 +4,7 @@ detect:
|
||||
filename: "(^|/|\\.)(ex|vim)rc$|\\.vim"
|
||||
|
||||
rules:
|
||||
- identifier: "[A-Za-z_][A-Za-z0-9_]*[(]+[A-Za-z0-9_:.,\\s]*[)]+"
|
||||
- identifier: "[A-Za-z_]\\w*[(]+[\\w:.,\\s]*[)]+"
|
||||
- special: "[()]+"
|
||||
- statement: "\\b([nvxsoilc]?(nore|un)?map|[nvlx]n|[ico]?no|[cilovx][um]|s?unm)\\b"
|
||||
- statement: "\\b(snor|nun|nm|set|if|endif|let|unlet|source)\\b"
|
||||
|
Loading…
Reference in New Issue
Block a user