authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2020-05-16 14:17:50+03:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2020-05-16 14:17:50+03:00
log3e375ee2b92db3ab4603c5f42f5a7fce8610ccab
tree3485ea364de30f606d2c22a88f8882d0481627d2
parent0122f2cff6fd44b08b17214e8535e8afba3d4985
signature Commit is signed but in an unrecognized format.

translate-c use tagName for token id


1 files changed, 6 insertions(+), 6 deletions(-)

src-self-hosted/translate_c.zig+6-6
......@@ -5013,8 +5013,8 @@ fn transMacroDefine(c: *Context, it: *CTokenList.Iterator, source: []const u8, n
50135013 c,
50145014 source_loc,
50155015 name,
5016 "unable to translate C expr: unexpected token {}",
5017 .{last.id},
5016 "unable to translate C expr: unexpected token .{}",
5017 .{@tagName(last.id)},
50185018 );
50195019
50205020 node.semicolon_token = try appendToken(c, .Semicolon, ";");
......@@ -5123,8 +5123,8 @@ fn transMacroFnDefine(c: *Context, it: *CTokenList.Iterator, source: []const u8,
51235123 c,
51245124 source_loc,
51255125 name,
5126 "unable to translate C expr: unexpected token {}",
5127 .{last.id},
5126 "unable to translate C expr: unexpected token .{}",
5127 .{@tagName(last.id)},
51285128 );
51295129 _ = try appendToken(c, .Semicolon, ";");
51305130 const type_of_arg = if (expr.id != .Block) expr else blk: {
......@@ -5658,8 +5658,8 @@ fn parseCPrimaryExpr(c: *Context, it: *CTokenList.Iterator, source: []const u8,
56585658 c,
56595659 source_loc,
56605660 source[first_tok.start..first_tok.end],
5661 "unable to translate C expr: unexpected token {}",
5662 .{tok.id},
5661 "unable to translate C expr: unexpected token .{}",
5662 .{@tagName(tok.id)},
56635663 );
56645664 return error.ParseError;
56655665 },