add loop keyword
This commit is contained in:
parent
1ab966b853
commit
460055e186
3 changed files with 8 additions and 0 deletions
|
@ -6,6 +6,11 @@ a vlang parser in zig
|
|||
|
||||
because i can
|
||||
|
||||
## variations
|
||||
|
||||
- `for` is split between `for` and `loop` because my fucking god i cant stand
|
||||
having *four* different variations of `for`.
|
||||
|
||||
## how
|
||||
|
||||
```
|
||||
|
|
|
@ -50,6 +50,7 @@ const keywords = [_][]const u8{
|
|||
"false",
|
||||
"None",
|
||||
"println",
|
||||
"loop",
|
||||
};
|
||||
|
||||
const keyword_ttypes = [_]TokenType{
|
||||
|
@ -78,6 +79,7 @@ const keyword_ttypes = [_]TokenType{
|
|||
.False,
|
||||
.None,
|
||||
.Println,
|
||||
.Loop,
|
||||
};
|
||||
|
||||
fn getKeyword(keyword: []const u8) ?TokenType {
|
||||
|
|
|
@ -55,6 +55,7 @@ pub const TokenType = enum {
|
|||
Enum,
|
||||
Fn,
|
||||
For,
|
||||
Loop,
|
||||
Go,
|
||||
Goto,
|
||||
If,
|
||||
|
|
Loading…
Reference in a new issue