diff options
| author | Vexu <git@vexu.eu> | 2020-05-16 14:17:50 +0300 |
|---|---|---|
| committer | Vexu <git@vexu.eu> | 2020-05-16 14:17:50 +0300 |
| commit | 3e375ee2b92db3ab4603c5f42f5a7fce8610ccab (patch) | |
| tree | 3485ea364de30f606d2c22a88f8882d0481627d2 | |
| parent | 0122f2cff6fd44b08b17214e8535e8afba3d4985 (diff) | |
| download | zig-3e375ee2b92db3ab4603c5f42f5a7fce8610ccab.tar.gz zig-3e375ee2b92db3ab4603c5f42f5a7fce8610ccab.zip | |
translate-c use tagName for token id
| -rw-r--r-- | src-self-hosted/translate_c.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src-self-hosted/translate_c.zig b/src-self-hosted/translate_c.zig index 508d781b7b..9037548d30 100644 --- 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; }, |
