| [f2e746d] | 1 | ## Cforall syntax colouring.
 | 
|---|
 | 2 | ## WIP
 | 
|---|
 | 3 | 
 | 
|---|
| [fe5c01d] | 4 | syntax "cfa" "\.cfa"
 | 
|---|
| [f2e746d] | 5 | 
 | 
|---|
 | 6 | # Macros
 | 
|---|
 | 7 | color brightred "\<[A-Z_][0-9A-Z_]+\>"
 | 
|---|
 | 8 | 
 | 
|---|
 | 9 | # Types
 | 
|---|
| [ea91c42] | 10 | color green "\<(forall|trait|(o|d|f|t)type|mutex|_Bool|volatile|virtual)\>"
 | 
|---|
| [f2e746d] | 11 | color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|auto)\>"
 | 
|---|
 | 12 | color green "\<(static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
 | 
|---|
| [58daf53] | 13 | color green "\<((s?size)|one|zero|((u_?)?int(8|16|32|64|ptr)))_t\>"
 | 
|---|
| [f2e746d] | 14 | 
 | 
|---|
 | 15 | # Declarations
 | 
|---|
| [ea91c42] | 16 | color brightgreen "\<(struct|union|typedef|trait|coroutine|monitor|thread)\>"
 | 
|---|
 | 17 | color brightgreen "\<(with)\>"
 | 
|---|
| [f2e746d] | 18 | 
 | 
|---|
 | 19 | # Control Flow Structures
 | 
|---|
 | 20 | color brightyellow "\<(if|else|while|do|for|switch|choose|case|default)\>"
 | 
|---|
| [307a732] | 21 | color brightyellow "\<(try|catch(Resume)?|finally)\>"
 | 
|---|
| [f2e746d] | 22 | 
 | 
|---|
 | 23 | # Control Flow Statements
 | 
|---|
| [307a732] | 24 | color magenta "\<(goto|return|break|continue|fallthr(u|ough)|throw(Resume)?)\>"
 | 
|---|
| [f2e746d] | 25 | 
 | 
|---|
 | 26 | # Operator Names
 | 
|---|
 | 27 | color blue "\^?\?\{\}|\?\[\?\]|\?\(\)" "\?(\+\+|--)" "(\+\+?|--?|\*|~|!)\?"
 | 
|---|
 | 28 | color blue "\?(=|\+|-|\*|/|%|\&|\||\^|<<?|>>?)=?\?" "\?!=\?"
 | 
|---|
 | 29 | 
 | 
|---|
 | 30 | ## The <...> in attributes can be coloured as strings. (??)
 | 
|---|
 | 31 | ## color red "\<<?[[:alpha:]][[:alnum:]_]*>?![[:lower:]]+\>"
 | 
|---|
 | 32 | 
 | 
|---|
 | 33 | ## Update/Redistribute
 | 
|---|
 | 34 | # GCC builtins
 | 
|---|
| [ca78437] | 35 | color cyan "__attribute__[[:space:]]*\(\([^()]*(\([^()]*\)[^()]*)*\)\)"
 | 
|---|
 | 36 | ##color cyan "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
 | 
|---|
| [f2e746d] | 37 | 
 | 
|---|
 | 38 | # Preprocesser Directives
 | 
|---|
 | 39 | color brightcyan "^[[:space:]]*#[[:space:]]*(include(_next)?|define|(ifn?|un)def|if|el(if|se)|endif|error|warning|pragma)"
 | 
|---|
 | 40 | 
 | 
|---|
 | 41 | # Values
 | 
|---|
| [58daf53] | 42 | # Booleans
 | 
|---|
 | 43 | color blue "\<(true|false)\>"
 | 
|---|
| [f2e746d] | 44 | # Characters
 | 
|---|
 | 45 | color brightmagenta "'([^'\]|(\\")|(\\['abfnrtv\\]))'"
 | 
|---|
 | 46 | color brightmagenta "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
 | 
|---|
 | 47 | # Strings and Angle Strings
 | 
|---|
| [fe5c01d] | 48 | color yellow ""([^"]|\\")*"" "<[^[:blank:]=]*>"
 | 
|---|
| [f2e746d] | 49 | # Multiline Strings: This regex is VERY expencive and often too strong.
 | 
|---|
 | 50 | ###color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
 | 
|---|
 | 51 | 
 | 
|---|
 | 52 | # Comments
 | 
|---|
 | 53 | color brightblue "//.*"
 | 
|---|
 | 54 | color brightblue start="/\*" end="\*/"
 | 
|---|
 | 55 | 
 | 
|---|
 | 56 | # Reminders
 | 
|---|
 | 57 | color ,yellow "\<(FIXME|TODO|XXX)\>"
 | 
|---|
 | 58 | 
 | 
|---|
 | 59 | # Trailing Whitespace
 | 
|---|
 | 60 | color ,green "[[:space:]]+$"
 | 
|---|