2024-01-17 06:30:14 +00:00
|
|
|
syntax def "\.def$"
|
|
|
|
comment "//"
|
|
|
|
|
2024-04-08 04:41:40 +00:00
|
|
|
# Mistakes
|
|
|
|
# Missing semicolon
|
|
|
|
color red "[^;]$"
|
|
|
|
# Missing type
|
|
|
|
color red "^(((static|virtual)-)?method|property|static-property(-array)?) [a-zA-Z_][a-zA-Z0-9_]* ?(\(|=)"
|
|
|
|
# Missing prefix
|
|
|
|
color red "^[^ ]+"
|
|
|
|
# Missing vtable
|
|
|
|
color red "^(vtable(-size|-destructor-offset))? .+$"
|
|
|
|
|
|
|
|
# Reset
|
|
|
|
color normal "(\(|\))"
|
|
|
|
|
2024-01-17 06:30:14 +00:00
|
|
|
# Commands
|
2024-05-04 07:13:49 +00:00
|
|
|
color magenta "^(extends|size|vtable(-size|-destructor-offset)?|property|static-property|((static|virtual)-)?method|constructor)\>"
|
2024-01-17 06:30:14 +00:00
|
|
|
|
|
|
|
# Types
|
2024-04-08 04:41:40 +00:00
|
|
|
color green "\<((u?(char|short|int))|float|bool|void|std::(string|vector|map))\>"
|
2024-01-17 06:30:14 +00:00
|
|
|
|
|
|
|
# Numbers
|
|
|
|
color yellow "0x[a-f0-9]+"
|
2024-04-08 04:41:40 +00:00
|
|
|
# Non-hex numbers
|
|
|
|
color red " [0-9][a-f0-9]+;"
|
2024-01-17 06:30:14 +00:00
|
|
|
|
|
|
|
# Comments
|
|
|
|
color brightblue "//.*"
|
|
|
|
|
2024-04-08 04:41:40 +00:00
|
|
|
# Whitespace.
|
|
|
|
color normal "[[:space:]]+"
|
2024-01-17 06:30:14 +00:00
|
|
|
# Trailing whitespace.
|
|
|
|
color ,green "[[:space:]]+$"
|