Files
brolang/compiler/token/token.odin
T
2026-06-10 21:46:26 +02:00

45 lines
522 B
Odin

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