2
0
Fork 0
nano-syntax-archived/c.nanorc

26 lines
1.3 KiB
Plaintext

syntax "c" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$"
color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color black "[(]"
color brightyellow "\<[A-Z_][0-9A-Z_]+\>"
color green "\<(float|double|bool|char|int|short|long|void|(un)?signed)\>"
color green "\<[a-z0-9_]+_t\>"
color brightblack "\<(struct|enum|static|const|union|typedef|extern)\>"
color brightblack "\<(for|if|while|do|else|case|default|switch)\>"
color brightblack "\<(return|inline|sizeof|auto|register|volatile|restrict)\>"
color brightblack "\<(try|throw|catch|operator|new|delete)\>"
color brightred "\<(goto|break|continue)\>"
color brightcyan "\<(true|false)\>"
color red "[-+/*=<>?:!~%&|^]"
color blue "\<([0-9]+|0x[0-9a-fA-F]*)\>|'.'"
color brightyellow "^[[:space:]]*#[[:space:]]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)"
color magenta "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
color yellow ""(\\.|[^"])*"|<[A-Za-z_./-]+>"
color magenta "\\([\"'abfnrtv\\]|[0-3]?[0-7]{1,2}|x[A-Fa-f0-9]{1,2}|$)"
color cyan "(^|[[:space:]])//.*"
color cyan start="/\*" end="\*/"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " + +| + +"
# +EXTRALINT