X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=syntax_files%2Fc.micro;h=c96d1b602aef0151f6dc6845a61e48e420b8efb5;hb=7e9d119b2dcabae0f6dee1e51001bc8374e675cc;hp=165b38ca776d0e1d78012d132f817baa5192f0cb;hpb=8257e94ab1a331ea25724ddf07d2ae836f4ce35d;p=micro.git diff --git a/syntax_files/c.micro b/syntax_files/c.micro index 165b38ca..c96d1b60 100644 --- a/syntax_files/c.micro +++ b/syntax_files/c.micro @@ -1,39 +1,39 @@ ## Here is an example for C/C++. ## syntax "C" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" "\.(def)$" -color brightred "\b[A-Z_][0-9A-Z_]+\b" -color green "\b(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\b" -color green "\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\b" -color green "\b(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\b" -color green "\b(for|if|while|do|else|case|default|switch)\b" -color green "\b(try|throw|catch|operator|new|delete)\b" -color brightmagenta "\b(goto|continue|break|return)\b" -color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)" +color identifier "\b[A-Z_][0-9A-Z_]+\b" +color type "\b(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\b" +color type "\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\b" +color statement "\b(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\b" +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}'" ## ## GCC builtins -color green "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" +color statement "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" #Operator Color -color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" +color statement "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" #Parenthetical Color -color magenta "[(){}]" "\[" "\]" +# color magenta "[(){}]" "\[" "\]" ## -## String highlighting. You will in general want your comments and +## String highlighting. You will in general want your brightblacks and ## strings to come last, because syntax highlighting rules will be ## applied in the order they are read in. -color cyan ""(\\.|[^"])*"" +color constant ""(\\.|[^"])*"" ## ## This string is VERY resource intensive! -#color cyan "(?s)"(\\.|[^"])*\\[[:space:]]*$.*?^(\\.|[^"])*"" +#color cyan (s) ""(\\.|[^"])*\\[[:space:]]*$.*?^(\\.|[^"])*"" ## Comment highlighting -color brightblue "//.*" -color brightblue "(?s)/\*.*?\*/" +color comment "//.*" +color comment (s) "/\*.*?\*/" ## Trailing whitespace #color ,green "[[:space:]]+$"