smoke tests

This commit is contained in:
agra
2026-02-15 19:44:20 +02:00
parent a3be9cce7c
commit 7da3ecfa7c
9 changed files with 1046 additions and 149 deletions

View File

@@ -745,6 +745,7 @@ pub const Parser = struct {
}
// Body: block `{ ... }`, arrow `=> expr;`, #builtin, or #foreign marker
var is_arrow = false;
const body = if (self.current.tag == .hash_builtin) blk: {
const bi_start = self.current.loc.start;
self.advance();
@@ -756,6 +757,7 @@ pub const Parser = struct {
try self.expect(.semicolon);
break :blk try self.createNode(fi_start, .{ .foreign_expr = {} });
} else if (self.current.tag == .fat_arrow) blk: {
is_arrow = true;
self.advance();
const expr = try self.parseExpr();
try self.expect(.semicolon);
@@ -774,6 +776,7 @@ pub const Parser = struct {
.return_type = return_type,
.body = body,
.type_params = type_params,
.is_arrow = is_arrow,
} });
}