s/TypeSolver/Analyzer
This commit is contained in:
parent
5c58ac0238
commit
881833b187
2 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ const Token = @import("tokens.zig").Token;
|
||||||
|
|
||||||
const SymbolUnderlyingType = comp.SymbolUnderlyingType;
|
const SymbolUnderlyingType = comp.SymbolUnderlyingType;
|
||||||
|
|
||||||
pub const TypeSolver = struct {
|
pub const Analyzer = struct {
|
||||||
allocator: *std.mem.Allocator,
|
allocator: *std.mem.Allocator,
|
||||||
|
|
||||||
// error handling
|
// error handling
|
||||||
|
@ -18,8 +18,8 @@ pub const TypeSolver = struct {
|
||||||
|
|
||||||
err_ctx_buffer: []u8,
|
err_ctx_buffer: []u8,
|
||||||
|
|
||||||
pub fn init(allocator: *std.mem.Allocator) !TypeSolver {
|
pub fn init(allocator: *std.mem.Allocator) !Analyzer {
|
||||||
return TypeSolver{
|
return Analyzer{
|
||||||
.allocator = allocator,
|
.allocator = allocator,
|
||||||
.err_ctx_buffer = try allocator.alloc(u8, 512),
|
.err_ctx_buffer = try allocator.alloc(u8, 512),
|
||||||
};
|
};
|
||||||
|
|
|
@ -50,7 +50,7 @@ pub fn run(allocator: *std.mem.Allocator, slice: []const u8) !Result {
|
||||||
std.debug.warn("parse tree\n");
|
std.debug.warn("parse tree\n");
|
||||||
printer.printNode(root, 0);
|
printer.printNode(root, 0);
|
||||||
|
|
||||||
var solver = try analysis.TypeSolver.init(allocator);
|
var solver = try analysis.Analyzer.init(allocator);
|
||||||
var ctx = try solver.pass(root);
|
var ctx = try solver.pass(root);
|
||||||
|
|
||||||
std.debug.warn("symbol table\n");
|
std.debug.warn("symbol table\n");
|
||||||
|
|
Loading…
Reference in a new issue