fix(lua): update escape and adjust coloring

- Numbers and escapes: magenta
This commit is contained in:
davidhcefx 2024-02-26 00:47:03 +08:00
parent bfd06f8741
commit 466a586e17
1 changed files with 4 additions and 4 deletions

View File

@ -53,9 +53,9 @@ color brightmagenta "\<(false|nil|true)\>"
color brightgreen "(\<(dofile|require|include)|%q|%!|%Q|%r|%x)\>"
# Numbers (hex and decimal with scientific notation)
#color red "\<(0[xX](([0-9A-Fa-f]+\.[0-9A-Fa-f]*)|(\.?[0-9A-Fa-f]+))([pP][-+]?[0-9]+)?)\>"
#color red "\<((([0-9]+\.[0-9]*)|(\.?[0-9]+))([eE][-+]?[0-9]+)?)\>"
color red "\<((0[xX](([0-9A-Fa-f]+\.[0-9A-Fa-f]*)|(\.?[0-9A-Fa-f]+))([pP][-+]?[0-9]+)?)|((([0-9]+\.[0-9]*)|(\.?[0-9]+))([eE][-+]?[0-9]+)?))\>"
#color magenta "\<(0[xX](([0-9A-Fa-f]+\.[0-9A-Fa-f]*)|(\.?[0-9A-Fa-f]+))([pP][-+]?[0-9]+)?)\>"
#color magenta "\<((([0-9]+\.[0-9]*)|(\.?[0-9]+))([eE][-+]?[0-9]+)?)\>"
color magenta "\<((0[xX](([0-9A-Fa-f]+\.[0-9A-Fa-f]*)|(\.?[0-9A-Fa-f]+))([pP][-+]?[0-9]+)?)|((([0-9]+\.[0-9]*)|(\.?[0-9]+))([eE][-+]?[0-9]+)?))\>"
# Symbols
color brightmagenta "(\(|\)|\[|\]|\{|\})"
@ -67,7 +67,7 @@ color red "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'"
color red start="\s*\[\[" end="\]\]"
# Escapes
#color red "\\[0-7][0-7][0-7]|\\x[0-9a-fA-F][0-9a-fA-F]|\\[abefnrs]|(\\c|\\C-|\\M-|\\M-\\C-)."
color magenta "\\([abfnrtvz'\"]|[0-9]{1,3}|x[0-9a-fA-F][0-9a-fA-F]|u\{[0-9a-fA-F]+\})"
# Shebang
color brightcyan "^#!.*"