Files
brolang/compiler/token/token.odin
T
2026-06-12 18:07:21 +02:00

45 lines
554 B
Odin

package token
import "../source"
import "../symbol"
Kind :: enum u8 {
Invalid,
Eof,
Newline,
Identifier,
Integer,
String,
Underscore,
Colon_Colon,
Equal,
Plus,
Minus,
Dot,
Left_Paren,
Right_Paren,
Left_Brace,
Right_Brace,
Comma,
Keyword_Func,
Keyword_Import,
Keyword_Return,
Keyword_Void,
Keyword_Int,
Keyword_I8,
Keyword_I16,
Keyword_I32,
Keyword_I64,
}
Token :: struct {
span: source.Span,
symbol: symbol.Id,
diagnostic: source.Diagnostic_Id,
kind: Kind,
}
Stream :: struct {
items: [dynamic]Token,
}