Skip to content

Commit

Permalink
cpp: fixup removal of '##' around macro argument during concatenation
Browse files Browse the repository at this point in the history
Signed-off-by: Efimov Vasily <[email protected]>
  • Loading branch information
laerreal committed Oct 30, 2017
1 parent 9fdca0b commit 0f87468
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ply/cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,11 @@ def macro_prescan(self,macro):
elif (i > 0 and macro.value[i-1].value == '##'):
macro.patch.append(('c',argnum,i-1))
del macro.value[i-1]
i -= 1
continue
elif ((i+1) < len(macro.value) and macro.value[i+1].value == '##'):
macro.patch.append(('c',argnum,i))
i += 1
del macro.value[i + 1]
continue
# Standard expansion
else:
Expand Down

0 comments on commit 0f87468

Please sign in to comment.