| author | |
| committer | |
| log | 67c6ac947a2945974c375977c237eac073d81f56 |
| tree | af9243577b78b47080aa19308797549309523343 |
| parent | 68bf81432cd0bafc355821370268eedc91ed8eb7 |
2 files changed, 8 insertions(+), 4 deletions(-)
lib/compiler/resinator/main.zig+7-1| ... | ... | @@ -143,7 +143,13 @@ pub fn main(init: std.process.Init.Minimal) !void { |
| 143 | 143 | if (!zig_integration) io.unlockStderr(); |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | var comp = aro.Compilation.init(aro_arena, aro_arena, io, &diagnostics, Io.Dir.cwd()); | |
| 146 | var comp = try aro.Compilation.init(.{ | |
| 147 | .gpa = aro_arena, | |
| 148 | .arena = aro_arena, | |
| 149 | .io = io, | |
| 150 | .diagnostics = &diagnostics, | |
| 151 | .environ_map = &environ_map, | |
| 152 | }); | |
| 147 | 153 | defer comp.deinit(); |
| 148 | 154 | |
| 149 | 155 | var argv: std.ArrayList([]const u8) = .empty; |
lib/compiler/resinator/preprocess.zig+1-3| ... | ... | @@ -14,8 +14,6 @@ pub fn preprocess( |
| 14 | 14 | argv: []const []const u8, |
| 15 | 15 | maybe_dependencies: ?*Dependencies, |
| 16 | 16 | ) PreprocessError!void { |
| 17 | try comp.addDefaultPragmaHandlers(); | |
| 18 | ||
| 19 | 17 | var driver: aro.Driver = .{ .comp = comp, .diagnostics = comp.diagnostics, .aro_name = "arocc" }; |
| 20 | 18 | defer driver.deinit(); |
| 21 | 19 | |
| ... | ... | @@ -47,7 +45,7 @@ pub fn preprocess( |
| 47 | 45 | if (hasAnyErrors(comp)) return error.GeneratedSourceError; |
| 48 | 46 | |
| 49 | 47 | comp.generated_buf.items.len = 0; |
| 50 | var pp = aro.Preprocessor.initDefault(comp) catch |err| switch (err) { | |
| 48 | var pp = aro.Preprocessor.init(comp, .{ .base_file = source.id }) catch |err| switch (err) { | |
| 51 | 49 | error.FatalError => return error.GeneratedSourceError, |
| 52 | 50 | error.OutOfMemory => |e| return e, |
| 53 | 51 | }; |