shecc icon indicating copy to clipboard operation
shecc copied to clipboard

Unable to parse the specific macros

Open DrXiao opened this issue 1 year ago • 1 comments

With the discussion in the pull request (#140) , we found that shecc cannot deal with macros containing assignment and compound assignment operators.

Here are the examples:

#define MACRO1(variable, val) \
               variable = variable + val + 10
#define MACRO2(variable, val) \
               variable += val + 10

By GCC or Clang, the above macros will be expanded and perform the operations, but shecc cannot parse them correctly.

Therefore, the lexer/parser must be improved to handle macros like these examples.

DrXiao avatar Jul 18 '24 12:07 DrXiao