## Cforall syntax colouring. ## WIP syntax "cfa" "\.(c|h)fa" # Macros color brightred "\<[A-Z_][0-9A-Z_]+\>" # Types color green "\<(forall|trait|(o|d|f|t)type|mutex|_Bool|volatile|virtual)\>" color green "\<(float|double|bool|char|int|short|long|enum|void|auto)\>" color green "\<(static|const|extern|(un)?signed|inline)\>" "\<(sizeof)\>" color green "\<((s?size)|one|zero|((u_?)?int(8|16|32|64|ptr)))_t\>" # Declarations color brightgreen "\<(struct|union|typedef|trait|coroutine|monitor|thread)\>" color brightgreen "\<(with)\>" # Control Flow Structures color brightyellow "\<(if|else|while|do|for|switch|choose|case|default)\>" color brightyellow "\<(disable|enable|waitfor|when|timeout)\>" color brightyellow "\<(try|catch(Resume)?|finally)\>" # Control Flow Statements color magenta "\<(goto|return|break|continue|fallthr(u|ough)|throw(Resume)?)\>" # Escaped Keywords, now Identifiers. color white "`\w+`" # Operator Names color blue "\^?\?\{\}|\?\[\?\]|\?\(\)" "\?(\+\+|--)" "(\+\+?|--?|\*|~|!)\?" color blue "\?(=|\+|-|\*|/|%|\&|\||\^|<>?)=?\?" "\?!=\?" ## The <...> in attributes can be coloured as strings. (??) ## color red "\<?![[:lower:]]+\>" ## Update/Redistribute # GCC builtins color cyan "__attribute__[[:space:]]*\(\([^()]*(\([^()]*\)[^()]*)*\)\)" ##color cyan "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" # Preprocesser Directives color brightcyan "^[[:space:]]*#[[:space:]]*(include(_next)?|define|(ifn?|un)def|if|el(if|se)|endif|error|warning|pragma)" # Values # Booleans color blue "\<(true|false)\>" # Characters color brightmagenta "'([^'\]|(\\")|(\\['abfnrtv\\]))'" color brightmagenta "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'" # Strings and Angle Strings color yellow ""([^"]|\\")*"" "<[^[:blank:]=]*>" # Multiline Strings: This regex is VERY expencive and often too strong. ###color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" # Comments color brightblue "//.*" color brightblue start="/\*" end="\*/" # Reminders color ,yellow "\<(FIXME|TODO|XXX)\>" # Trailing Whitespace color ,green "[[:space:]]+$"