You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All control flow keywords are now mapped to either Keyword, Statement or
Conditional. Previously some of them would be mapped to Special, PreProc
or Macro.
As a reference I used the builtin syntax highlighting from neovim for
the following languages that have similar control flow keywords to Zig:
- Rust:
- Keyword: return break continue
- Conditional: match if else
- Repeat: loop while (actually maps to Conditional)
- C
- Statement: goto break return continue asm
- Conditional: if else switch
- Repeat: while for do
- C#: Conditional, Repeat
- Conditional: else if switch
- Repeat: break continue do for foreach goto return while
- JS
- Statement: return with await yield
- Conditional: if else switch break continue
- Repeat: while for do in of
- Go
- Statement: defer go goto return break continue fallthrough
- Conditional: if else switch select
- Repeat: for range
- Zig (old)
- Macro: defer errdefer
- PreProc: asm
- Special: return break continue
- Conditional: if else switch
- Repeat: while for
- Keyword: and or orelse
- Zig (new)
- Statement: return break continue asm defer errdefer and or orelse
- Conditional: if else switch
- Repeat: while for
The try and catch keywords will be adjusted in a future commit.
0 commit comments