diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-02-02 17:32:06 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-02-03 00:06:11 -0700 |
| commit | 873bb29c984b976021fb9ca95ad3298e03a8b3ff (patch) | |
| tree | 5731533a3903e43279d0435c00ffe726560aec6d /src/Module.zig | |
| parent | 03cdb4fb5853109e46bdc08d8a849a23780093ae (diff) | |
| download | zig-873bb29c984b976021fb9ca95ad3298e03a8b3ff.tar.gz zig-873bb29c984b976021fb9ca95ad3298e03a8b3ff.zip | |
introduce ZON: Zig Object Notation
* std.zig.parse is moved to std.zig.Ast.parse
* the new function has an additional parameter that requires passing
Mode.zig or Mode.zon
* moved parser.zig code to Parse.zig
* added parseZon function next to parseRoot function
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Module.zig b/src/Module.zig index b395c0a950..3bb15e78c3 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -2057,7 +2057,7 @@ pub const File = struct { if (file.tree_loaded) return &file.tree; const source = try file.getSource(gpa); - file.tree = try std.zig.parse(gpa, source.bytes); + file.tree = try Ast.parse(gpa, source.bytes, .zig); file.tree_loaded = true; return &file.tree; } @@ -3662,7 +3662,7 @@ pub fn astGenFile(mod: *Module, file: *File) !void { file.source = source; file.source_loaded = true; - file.tree = try std.zig.parse(gpa, source); + file.tree = try Ast.parse(gpa, source, .zig); defer if (!file.tree_loaded) file.tree.deinit(gpa); if (file.tree.errors.len != 0) { @@ -3977,7 +3977,7 @@ pub fn populateBuiltinFile(mod: *Module) !void { else => |e| return e, } - file.tree = try std.zig.parse(gpa, file.source); + file.tree = try Ast.parse(gpa, file.source, .zig); file.tree_loaded = true; assert(file.tree.errors.len == 0); // builtin.zig must parse |
