From 881833b187cfa0a4dd5b3f75d23669feec1dbc31 Mon Sep 17 00:00:00 2001 From: Luna Date: Sat, 5 Oct 2019 10:27:38 -0300 Subject: [PATCH] s/TypeSolver/Analyzer --- src/analysis.zig | 6 +++--- src/main.zig | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/analysis.zig b/src/analysis.zig index a960cbf..cb392f3 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -8,7 +8,7 @@ const Token = @import("tokens.zig").Token; const SymbolUnderlyingType = comp.SymbolUnderlyingType; -pub const TypeSolver = struct { +pub const Analyzer = struct { allocator: *std.mem.Allocator, // error handling @@ -18,8 +18,8 @@ pub const TypeSolver = struct { err_ctx_buffer: []u8, - pub fn init(allocator: *std.mem.Allocator) !TypeSolver { - return TypeSolver{ + pub fn init(allocator: *std.mem.Allocator) !Analyzer { + return Analyzer{ .allocator = allocator, .err_ctx_buffer = try allocator.alloc(u8, 512), }; diff --git a/src/main.zig b/src/main.zig index a249060..17e004e 100644 --- a/src/main.zig +++ b/src/main.zig @@ -50,7 +50,7 @@ pub fn run(allocator: *std.mem.Allocator, slice: []const u8) !Result { std.debug.warn("parse tree\n"); printer.printNode(root, 0); - var solver = try analysis.TypeSolver.init(allocator); + var solver = try analysis.Analyzer.init(allocator); var ctx = try solver.pass(root); std.debug.warn("symbol table\n");