Files
brolang/compiler/token/token.odin
T
2026-06-09 23:05:28 +02:00

41 lines
466 B
Odin

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,
}