## Syntax highlighting for hare files.
syntax hare "\.ha$"
comment "//"
# Keywords and types
color blue "\<(as|break|case|const|continue|def|defer|else|enum|export|fconst|fn|for|iconst|if|is|let|match|rconst|return|static|struct|switch|type|union|yield|_)\>"
color blue "\<(abort|alloc|append|assert|delete|free|insert|len|offset|vastart|vaarg|vaend)\>"
color lightyellow "@(fini|init|noreturn|offset|symbol|test)\>"
color cyan "\<(bool|char|f32|f64|false|i16|i32|i64|i8|int|null|nullable|rune|size|str|true|u16|u32|u64|u8|uint|uintptr|valist|void)\>"
# Strings and numbers
color italic,pink "\".*\""
color slate "[[:digit:]]+(.[[:digit:]]+)?(u|i|z|f32|f64|i16|i32|i64|i8|u16|u32|u64|u8)?"
# Remove highlighting in variables and function calls
color normal "[[:alpha:]][[:digit:]]+.?"
# Imports
color yellow "^use .+;"
# Comments
color grey "//.*"
# Trailing whitespace
color ,red "[[:space:]]+$"