- match: '\b(package|struct|proc|use|global|enum|if|elseif|else|for|while|do|break|continue|fallthrough|return|as|cast|sizeof|alignof|defer|switch|case)\b'
scope: keyword.control.onyx
- - match: '\b(bool|void|i8|u8|i16|u16|i32|u32|i64|u64|f32|f64|rawptr)\b'
- scope: keyword.control.onyx
+ - match: '\b(bool|void|i8|u8|i16|u16|i32|u32|i64|u64|f32|f64|rawptr|string|cstring|range)\b'
+ scope: storage.type
- match: '\b(i8x16|i16x8|i32x4|i64x2|f32x4|f64x2|v128)\b'
- scope: keyword.control.onyx
+ scope: storage.type
- match: '\b(true|false|null|context)\b'
scope: constant.numeric.onyx
syn keyword onyxKeyword if elseif else
syn keyword onyxKeyword for while do
syn keyword onyxKeyword switch case
-syn keyword onyxKeyword break continue return defer fallthrough
-syn keyword onyxKeyword as cast sizeof alignof
-
+syn keyword onyxKeyword break continue return defer fallthrough syn keyword onyxKeyword as cast sizeof alignof
syn keyword onyxType bool void
syn keyword onyxType i8 u8
syn keyword onyxType i16 u16
syn keyword onyxConstant true false null
+syn match onyxNumber "\<0x[a-fA-F0-9]\+\>"
+syn match onyxNumber "\<\d\+[lf]\=\>"
+syn match onyxNumber "\<\d\+\.\d*f\=\>"
+syn match onyxNumber "\.\d\+f\=\>"
+
syn keyword onyxCommentStart contained TODO NOTE BUG HACK
syn region onyxComment start="//" end="$" keepend contains=onyxCommentStart
hi def link onyxConstant Constant
hi def link onyxDirective Constant
hi def link onyxString String
+hi def link onyxNumber Number
let b:current_syntax = "onyx"
let &cpo = s:cpo_save