'("cast" "it" "sizeof" "alignof" "typeof"))
(defconst onyx-keywords
- '("if" "elseif" "else" "do" "while" "for" "switch" "case" "struct" "enum" "union"
+ '("if" "elseif" "else" "do" "while" "for" "in" "switch" "case" "as" "struct" "enum" "union"
"return" "continue" "break" "fallthrough" "defer" "macro" "package"
"use" "interface" "where"))
# strings in YAML. When using single quoted strings, only single quotes
# need to be escaped: this is done by using two single quotes next to each
# other.
- - match: '\b(package|struct|union|interface|use|where|global|enum|if|elseif|else|for|while|do|break|continue|fallthrough|return|cast|sizeof|alignof|typeof|defer|switch|case|macro)\b'
+ - match: '\b(package|struct|union|interface|use|where|global|enum|if|elseif|else|for|while|do|break|continue|fallthrough|return|cast|sizeof|alignof|typeof|defer|switch|case|macro|in|as)\b'
scope: keyword.control.onyx
- match: '\b(bool|void|i8|u8|i16|u16|i32|u32|i64|u64|f32|f64|rawptr|str|cstr|dyn_str|range|type_expr|any)\b'
syn keyword onyxKeyword package struct union enum use global macro
syn keyword onyxKeyword if elseif else where interface
-syn keyword onyxKeyword for while do
-syn keyword onyxKeyword switch case
+syn keyword onyxKeyword for in while do
+syn keyword onyxKeyword switch case as
syn keyword onyxKeyword break continue return defer fallthrough
syn keyword onyxKeyword cast sizeof alignof typeof
syn keyword onyxType bool void
<array>
<dict>
<key>match</key>
- <string>\b(if|else|elseif|for|while|defer|return|do)\b</string>
+ <string>\b(if|else|elseif|for|in|while|defer|return|do)\b</string>
<key>name</key>
<string>keyword.control.onyx</string>
</dict>
<dict>
<key>match</key>
- <string>\b(break|continue|fallthrough|switch|case)\b</string>
+ <string>\b(break|continue|fallthrough|switch|case|as)\b</string>
<key>name</key>
<string>keyword.control.onyx</string>
</dict>