Skip to content

Commit 8ad20f8

Browse files
Merge pull request #7673 from gamebox/parse-next-steps
[zig] Parser: Add support for basic import exposes PASSING all zig-workflow runs Should not be running old-workflows
2 parents 62c1ea2 + 45c51f9 commit 8ad20f8

12 files changed

+438
-99
lines changed

src/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This table provides a summary of progress for the zig compiler re-write and shou
44

55
| | Str & Num * | Functions | Modules | Collections | Records & Tuples | Recursive Types | Static Dispatch |
66
|--------------------------|:-----------:|:----------:|:-------:|:-----------:|:-----------------:|:----------------:|:----------------:|
7-
| **Parse** | 🚧 | 🚧 | | | | | |
7+
| **Parse** | 🪫 | 🪫 | 🚧 | 🪫 | 🪫 | 🪫 | 🪫 |
88
| **Canonicalize** | 🚧 | 🚧 | | | | | |
99
| **Resolve Imports** | | | | | | | |
1010
| **Check Types** | | | | | | | |

src/check/parse.zig

+7-1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ fn testSExprHelper(source: []const u8, expected: []const u8) !void {
100100
// parse our source
101101
var parse_ast = parse(&env, source);
102102
defer parse_ast.deinit();
103+
std.testing.expectEqualSlices(IR.Diagnostic, &[_]IR.Diagnostic{}, parse_ast.errors) catch {
104+
std.debug.print("Tokens:\n{any}", .{parse_ast.tokens.tokens.items(.tag)});
105+
std.debug.panic("Test failed with parse errors", .{});
106+
};
103107

104108
// shouldn't be required in future
105109
parse_ast.store.emptyScratch();
@@ -126,7 +130,9 @@ test "example s-expr" {
126130

127131
const expected =
128132
\\(file
129-
\\ (header 'foo' 'bar')
133+
\\ (header
134+
\\ (exposed_item (lower_ident 'foo'))
135+
\\ (exposed_item (lower_ident 'bar')))
130136
\\ (decl
131137
\\ (ident 'foo')
132138
\\ (string 'hey'))

0 commit comments

Comments
 (0)