mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
## C3 syntax highlighting support for nano
|
|
## https://github.com/c3lang/c3c
|
|
|
|
syntax c3 "\.(c3|c3t)$"
|
|
comment "//"
|
|
|
|
# Default color
|
|
color white ".*"
|
|
|
|
# Constants
|
|
#color brightred "\<[A-Z_][0-9A-Z_]+\>"
|
|
|
|
# Function names
|
|
color magenta "\<[A-Za-z_]+\>\("
|
|
color normal "\(|\)"
|
|
|
|
# Types
|
|
color green "\<(virtual|anyerr|void|bool|quad|double|float|long|ulong|int|uint|short|ushort|ichar|char|isize|usize|iptr|uptr|iptrdiff|uptrdiff|half)\>"
|
|
|
|
# Keywords
|
|
color yellow "\<(alias|as|asm|assert|attribute|break|case|catch|const|continue|default|defer|define|do|else|enum|extern|errtype|false|for|foreach|fn|generic|if|import|interface|macro|module|nextcase|null|private|return|static|struct|switch|true|try|typeid|typeof|union|while|var|volatile|yield)\>"
|
|
|
|
# $ Statements
|
|
color brightyellow "\$\<(assert|case|default|elif|else|endif|endswitch|for|if|switch|unreachable)\>"
|
|
|
|
# @ Attributes
|
|
color brightred "@\<[A-Za-z_]+\>"
|
|
|
|
# Strings
|
|
color brightblack "\"[^"]*\""
|
|
|
|
# Everything down from here should stay in the current order
|
|
|
|
# Comments
|
|
color cyan "//.*"
|
|
color cyan start="/\+" end="\+/"
|
|
color cyan start="/\*" end="\*/"
|
|
|
|
# Reminders
|
|
color brightwhite,red "\<(FIXME|TODO|XXX)\>"
|
|
|
|
# Trailing whitespace
|
|
color ,green "[[:space:]]+$"
|