mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-24 17:50:15 +09:00
Cache syntax highlighting rules
This commit is contained in:
@@ -95,7 +95,7 @@ color brightyellow "\b(setup|loop)\b"
|
||||
color brightcyan "^[[:space:]]*#[[:space:]]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)"
|
||||
|
||||
##
|
||||
color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
|
||||
color brightmagenta "'([^'\\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
|
||||
|
||||
## GCC builtins
|
||||
color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
|
||||
|
||||
@@ -16,7 +16,7 @@ color brightblue "\b(split|sprintf|strtonum|sub|substr|tolower|toupper)\b"
|
||||
color brightblue "\b(mktime|strftime|systime)\b"
|
||||
color brightblue "\b(and|compl|lshift|or|rshift|xor)\b"
|
||||
color brightblue "\b(bindtextdomain|dcgettext|dcngettext)\b"
|
||||
color magenta "/.*[^\]/"
|
||||
color magenta "/.*[^\\]/"
|
||||
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
|
||||
color magenta "\\."
|
||||
color brightblack "(^|[[:space:]])#([^{].*)?$"
|
||||
|
||||
@@ -9,7 +9,7 @@ color statement "\b(for|if|while|do|else|case|default|switch)\b"
|
||||
color statement "\b(try|throw|catch|operator|new|delete)\b"
|
||||
color statement "\b(goto|continue|break|return)\b"
|
||||
color preproc "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
|
||||
color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
|
||||
color constant "'([^'\\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
|
||||
|
||||
##
|
||||
## GCC builtins
|
||||
|
||||
@@ -77,7 +77,7 @@ color constant "q"\{.*\}""
|
||||
color constant "q"\[.*\]""
|
||||
color constant "q"<.*>""
|
||||
color constant (s) "q"[^({[<"][^"]*$.*?^[^"]+""
|
||||
color constant "q"([^({[<"]).*\1""
|
||||
color constant "q"([^({[<"]).*""
|
||||
|
||||
### TokenString
|
||||
### True token strings require nesting, so, again, they can't be implemented accurately here.
|
||||
|
||||
Reference in New Issue
Block a user