Merge pull request #329 from DanteFalzone0/master

Fixed higlighting of inline comments in several languages
This commit is contained in:
Anthony Scopatz 2020-08-27 09:33:16 -05:00 committed by GitHub
commit b20013a049
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@
syntax "C" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" "\.(def)$" "\.ino" syntax "C" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" "\.(def)$" "\.ino"
magic "^(C|C\+\+) (source|program)" magic "^(C|C\+\+) (source|program)"
comment "//" comment "//"
color brightred "\<[A-Z_][0-9A-Z_]+\>" color brightred "\<[A-Z_][0-9A-Z_]+\>"
color green "\<(float|double|bool|char|wchar_t|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>" color green "\<(float|double|bool|char|wchar_t|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
color green "\<((s?size)|(char(16|32))|((u_?)?int(_fast|_least)?(8|16|32|64))|u?int(max|ptr))_t\>" color green "\<((s?size)|(char(16|32))|((u_?)?int(_fast|_least)?(8|16|32|64))|u?int(max|ptr))_t\>"
color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>" color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
@ -21,7 +21,7 @@ color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\
color green "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" color green "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
#Operator Color #Operator Color
color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
#Parenthetical Color #Parenthetical Color
color magenta "[(){}]" "\[" "\]" color magenta "[(){}]" "\[" "\]"
@ -37,7 +37,7 @@ color cyan "<[^= ]*>" ""(\\.|[^"])*""
#color cyan start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" #color cyan start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
## Comment highlighting ## Comment highlighting
color brightblue "^\s*//.*" color brightblue "//.*"
color brightblue start="/\*" end="\*/" color brightblue start="/\*" end="\*/"
# Highlighting for documentation comments # Highlighting for documentation comments

View File

@ -10,7 +10,7 @@ color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interfa
color red ""[^"]*"" color red ""[^"]*""
color yellow "\<(true|false|null)\>" color yellow "\<(true|false|null)\>"
icolor yellow "\b(([1-9][0-9]+)|0+)\.[0-9]+\b" "\b[1-9][0-9]*\b" "\b0[0-7]*\b" "\b0x[1-9a-f][0-9a-f]*\b" icolor yellow "\b(([1-9][0-9]+)|0+)\.[0-9]+\b" "\b[1-9][0-9]*\b" "\b0[0-7]*\b" "\b0x[1-9a-f][0-9a-f]*\b"
color blue "^\s*//.*" color blue "//.*"
color blue start="^\s*/\*" end="\*/" color blue start="^\s*/\*" end="\*/"
color brightblue start="/\*\*" end="\*/" color brightblue start="/\*\*" end="\*/"

View File

@ -17,7 +17,7 @@ color green "\<(Number|Object|RegExp|String)\>"
color red "[-+/*=<>!~%?:&|]" color red "[-+/*=<>!~%?:&|]"
color magenta "/[^*]([^/]|(\\/))*[^\\]/[gim]*" color magenta "/[^*]([^/]|(\\/))*[^\\]/[gim]*"
color magenta "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]" color magenta "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]"
color brightblack "(^|[[:space:]])//.*" color brightblack "//.*"
color brightblack "/\*.+\*/" color brightblack "/\*.+\*/"
color brightwhite,cyan "TODO:?" color brightwhite,cyan "TODO:?"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'|(`|\})(\\.|[^`$]|$[^{])*(\$\{|`)" color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'|(`|\})(\\.|[^`$]|$[^{])*(\$\{|`)"