]> git.xonotic.org Git - xonotic/gmqcc.git/blob - syntax/nano/qc.nanorc
52224859b93ea2adf8ec2d19e938179314f3a776
[xonotic/gmqcc.git] / syntax / nano / qc.nanorc
1 # Language:   QuakeC
2 # Maintainer: Dale Weiler
3
4 syntax "qc" "\.(qc|QC)$" "\.(qh|QH)$"
5 color brightred "\<[A-Z_][0-9A-Z_]+\>" 
6 color green "\<(float|string|enum|void|const|typedef|nil)\>"
7 color brightyellow "\<(for|if|while|do|else|case|default|switch)\>"
8 color magenta "\<(goto|continue|break|return)\>"
9 color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)"
10 color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
11
12 color brightyellow "<[^=        ]*>" ""(\\.|[^"])*""
13
14 ## This string is VERY resource intensive!
15 color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
16
17 ## Comment highlighting
18 color brightblue "//.*"
19 color brightblue start="/\*" end="\*/"
20
21 ## Trailing whitespace
22 color ,green "[[:space:]]+$"