source: tools/cfa.nanorc @ 17e0dc9

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 17e0dc9 was f2e746d, checked in by Andrew Beach <ajbeach@…>, 7 years ago

Added nanorc file for Cforall. It is not complete but is useable.

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