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