zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 3e375ee2b92db3ab4603c5f42f5a7fce8610ccab (tree)
parent 0122f2cff6fd44b08b17214e8535e8afba3d4985
Author: Vexu <git@vexu.eu>
Date:   Sat, 16 May 2020 14:17:50 +0300

translate-c use tagName for token id

Diffstat:
Msrc-self-hosted/translate_c.zig | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src-self-hosted/translate_c.zig b/src-self-hosted/translate_c.zig @@ -5013,8 +5013,8 @@ fn transMacroDefine(c: *Context, it: *CTokenList.Iterator, source: []const u8, n c, source_loc, name, - "unable to translate C expr: unexpected token {}", - .{last.id}, + "unable to translate C expr: unexpected token .{}", + .{@tagName(last.id)}, ); node.semicolon_token = try appendToken(c, .Semicolon, ";"); @@ -5123,8 +5123,8 @@ fn transMacroFnDefine(c: *Context, it: *CTokenList.Iterator, source: []const u8, c, source_loc, name, - "unable to translate C expr: unexpected token {}", - .{last.id}, + "unable to translate C expr: unexpected token .{}", + .{@tagName(last.id)}, ); _ = try appendToken(c, .Semicolon, ";"); 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, c, source_loc, source[first_tok.start..first_tok.end], - "unable to translate C expr: unexpected token {}", - .{tok.id}, + "unable to translate C expr: unexpected token .{}", + .{@tagName(tok.id)}, ); return error.ParseError; },