## Cforall syntax colouring. ## WIP syntax "cfa" "\.cfa$" ## No magic # Macros color brightred "\<[A-Z_][0-9A-Z_]+\>" # Types color green "\<(forall|otype|dtype|ftype|trait|mutex|_Bool|volatile)\>" color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|auto)\>" color green "\<(static|const|struct|union|typedef|extern|(un)?signed|inline)\>" color green "\<((s?size)|one|zero|((u_?)?int(8|16|32|64|ptr)))_t\>" # Declarations color brightgreen "\<(struct|union|typedef|trait|coroutine|monitor)\>" # Control Flow Structures color brightyellow "\<(if|else|while|do|for|switch|choose|case|default)\>" ##color brightyellow "\<(try|catch|catchResume|finally)\>" # Control Flow Statements color magenta "\<(return|break|continue|fallthru|throw)\>" # 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 brightyellow ""([^"]|\\")*"" "<[^[: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:]]+$"