authorgravatar for lgustaf1@binghamton.eduLayne Gustafson <lgustaf1@binghamton.edu> 2020-03-28 20:40:13-04:00
committergravatar for lgustaf1@binghamton.eduLayne Gustafson <lgustaf1@binghamton.edu> 2020-03-28 20:40:13-04:00
log2a05ca1c9449fb26beaa948402e2742dee680137
treed06e35986f5fbd2723773720f63ff4553aa39959
parentf9db21f03eaf0b800e531d12c2677d579eceaff0

Conv macro string concat to ++


1 files changed, 12 insertions(+), 0 deletions(-)

src-self-hosted/translate_c.zig+12
...@@ -5782,6 +5782,18 @@ fn parseCSuffixOpExpr(c: *Context, it: *CTokenList.Iterator, source: []const u8,...@@ -5782,6 +5782,18 @@ fn parseCSuffixOpExpr(c: *Context, it: *CTokenList.Iterator, source: []const u8,
5782 op_id = .Mod;5782 op_id = .Mod;
5783 op_token = try appendToken(c, .Percent, "%");5783 op_token = try appendToken(c, .Percent, "%");
5784 },5784 },
5785 .StringLiteral => {
5786 op_id = .ArrayCat;
5787 op_token = try appendToken(c, .PlusPlus, "++");
5788
5789 _ = it.prev();
5790 },
5791 .Identifier => {
5792 op_id = .ArrayCat;
5793 op_token = try appendToken(c, .PlusPlus, "++");
5794
5795 _ = it.prev();
5796 },
5785 else => {5797 else => {
5786 _ = it.prev();5798 _ = it.prev();
5787 return node;5799 return node;