mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 06:12:35 +09:00
Add string group to syntax files
This commit adds the string group (constant.string) to valid strings in all the syntax files that support colorschemes (see the readme in the runtime/syntax directory). Fixes #178
This commit is contained in:
@@ -62,22 +62,22 @@ color constant "\b(__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION_
|
||||
## String literals
|
||||
## TODO: multiline backtick and doublequote string. (Unlikely possible at all with nano.)
|
||||
### DoubleQuotedString
|
||||
color constant ""(\\.|[^"])*""
|
||||
color constant.string ""(\\.|[^"])*""
|
||||
|
||||
### WysiwygString
|
||||
color constant start="r"" end="""
|
||||
color constant "`[^`]*`"
|
||||
color constant.string start="r"" end="""
|
||||
color constant.string "`[^`]*`"
|
||||
|
||||
### HexString
|
||||
color ,constant "x"([[:space:]]*[[:xdigit:]][[:space:]]*[[:xdigit:]])*[[:space:]]*""
|
||||
color constant.string "x"([[:space:]]*[[:xdigit:]][[:space:]]*[[:xdigit:]])*[[:space:]]*""
|
||||
|
||||
### DelimitedString
|
||||
color constant "q"\(.*\)""
|
||||
color constant "q"\{.*\}""
|
||||
color constant "q"\[.*\]""
|
||||
color constant "q"<.*>""
|
||||
color constant start="q"[^({[<"][^"]*$" end="^[^"]+""
|
||||
color constant "q"([^({[<"]).*""
|
||||
color constant.string "q"\(.*\)""
|
||||
color constant.string "q"\{.*\}""
|
||||
color constant.string "q"\[.*\]""
|
||||
color constant.string "q"<.*>""
|
||||
color constant.string start="q"[^({[<"][^"]*$" end="^[^"]+""
|
||||
color constant.string "q"([^({[<"]).*""
|
||||
|
||||
### TokenString
|
||||
### True token strings require nesting, so, again, they can't be implemented accurately here.
|
||||
|
||||
Reference in New Issue
Block a user