source: tools/cfa.nanorc @ d94195d

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since d94195d was 307a732, checked in by Andrew Beach <ajbeach@…>, 7 years ago

The exception handling code compilers and translates, but the translation crashes.

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