jorts/src/compiler.zig

18 lines
453 B
Zig
Raw Normal View History

const std = @import("std");
const scanner = @import("new_scanner.zig");
const Allocator = std.mem.Allocator;
pub const Compiler = struct {
src: []const u8,
allocator: *Allocator,
pub fn init(allocator: *Allocator, source: []const u8) Compiler {
return Compiler{ .src = source, .allocator = allocator };
}
2019-06-01 19:21:36 +00:00
pub fn compile(self: *Compiler) void {
var scanr = scanner.Scanner.init(self.allocator, self.src);
}
};