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
signaturelock-open 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...@@ -5013,8 +5013,8 @@ fn transMacroDefine(c: *Context, it: *CTokenList.Iterator, source: []const u8, n
5013 c,5013 c,
5014 source_loc,5014 source_loc,
5015 name,5015 name,
5016 "unable to translate C expr: unexpected token {}",5016 "unable to translate C expr: unexpected token .{}",
5017 .{last.id},5017 .{@tagName(last.id)},
5018 );5018 );
50195019
5020 node.semicolon_token = try appendToken(c, .Semicolon, ";");5020 node.semicolon_token = try appendToken(c, .Semicolon, ";");
...@@ -5123,8 +5123,8 @@ fn transMacroFnDefine(c: *Context, it: *CTokenList.Iterator, source: []const u8,...@@ -5123,8 +5123,8 @@ fn transMacroFnDefine(c: *Context, it: *CTokenList.Iterator, source: []const u8,
5123 c,5123 c,
5124 source_loc,5124 source_loc,
5125 name,5125 name,
5126 "unable to translate C expr: unexpected token {}",5126 "unable to translate C expr: unexpected token .{}",
5127 .{last.id},5127 .{@tagName(last.id)},
5128 );5128 );
5129 _ = try appendToken(c, .Semicolon, ";");5129 _ = try appendToken(c, .Semicolon, ";");
5130 const type_of_arg = if (expr.id != .Block) expr else blk: {5130 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,...@@ -5658,8 +5658,8 @@ fn parseCPrimaryExpr(c: *Context, it: *CTokenList.Iterator, source: []const u8,
5658 c,5658 c,
5659 source_loc,5659 source_loc,
5660 source[first_tok.start..first_tok.end],5660 source[first_tok.start..first_tok.end],
5661 "unable to translate C expr: unexpected token {}",5661 "unable to translate C expr: unexpected token .{}",
5662 .{tok.id},5662 .{@tagName(tok.id)},
5663 );5663 );
5664 return error.ParseError;5664 return error.ParseError;
5665 },5665 },