Merge branch 'redbrain-parser-fix'

* redbrain-parser-fix:
  Add testcase for macros with commas in comment
  Fix bug with comments inline in macros  - commit fixes #974

Closes #974
This commit is contained in:
William S Fulton 2017-04-27 19:48:25 +01:00
commit fcde570091
4 changed files with 40 additions and 0 deletions

View file

@ -370,3 +370,20 @@ int methodX(int x);
int methodX(int x) { return x+100; }
%}
// Comma in macro - Github issue #974
%inline %{
#define __attribute__(x)
#define TCX_PACKED(d) d __attribute__ ((__packed__))
TCX_PACKED (typedef struct tcxMessageTestImpl
{
int mHeader; /**< comment */
}) tcxMessageTest;
TCX_PACKED (typedef struct tcxMessageBugImpl
{
int mBid; /**< Bid price and size, check PresentMap if available in message */
}) tcxMessageBug;
%}

View file

@ -14,3 +14,6 @@ if 2 * preproc.one != preproc.two:
if preproc.methodX(99) != 199:
raise RuntimeError
t1 = preproc.tcxMessageTest()
t2 = preproc.tcxMessageBug()