add src/new_scanner.zig

This commit is contained in:
Luna 2019-06-01 16:21:36 -03:00
parent b80cd52c50
commit 63045e4df5
2 changed files with 18 additions and 1 deletions

View file

@ -11,5 +11,7 @@ pub const Compiler = struct {
return Compiler{ .src = source, .allocator = allocator };
}
pub fn compile(self: *Compiler) void {}
pub fn compile(self: *Compiler) void {
var scanr = scanner.Scanner.init(self.allocator, self.src);
}
};

15
src/new_scanner.zig Normal file
View file

@ -0,0 +1,15 @@
const std = @import("std");
const Allocator = std.mem.Allocator;
pub const Scanner = struct {
source: []const u8,
allocator: *Allocator,
pub fn init(allocator: *Allocator, data: []const u8) Scanner {
return Scanner{
.allocator = allocator,
.source = data,
};
}
};