Luna
c4401dc8cf
the java part would still fuck me up since it lies on OOP stuff that zig doesnt provide, so i'm skipping towards the C part of the book which will hopefully be more understandable from a zig perspective.
13 lines
320 B
Zig
13 lines
320 B
Zig
const token = @import("token.zig");
|
|
const scanner = @import("scanner.zig");
|
|
const main = @import("main.zig");
|
|
|
|
pub const Compiler = struct {
|
|
tokens: *scanner.TokenList,
|
|
|
|
fn init(tokens: *scanner.TokenList) Compiler {
|
|
return Compiler{ .tokens = tokens };
|
|
}
|
|
|
|
fn advance(self: *Compiler) void {}
|
|
};
|