initial draft

This commit is contained in:
2026-06-09 17:28:28 +02:00
commit 087fdb45d5
40 changed files with 4371 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
package token
import "../source"
Kind :: enum {
Invalid,
Eof,
Newline,
Identifier,
Integer,
Underscore,
Colon_Colon,
Equal,
Plus,
Left_Paren,
Right_Paren,
Left_Brace,
Right_Brace,
Comma,
Keyword_C,
Keyword_Func,
Keyword_Return,
Keyword_Void,
Keyword_Int,
Keyword_I8,
Keyword_I16,
Keyword_I32,
Keyword_I64,
}
Token :: struct {
kind: Kind,
span: source.Span,
text: string,
diagnostic: int,
}
Stream :: struct {
items: [dynamic]Token,
}