2

I am able to parse files using the Clang API (for example, see https://stackoverflow.com/a/40458570/1256041). This allows top-level statements to be parsed:

int n = 1;

int foo() { return 3; }

// etc... 

But how can I parse abitrary C++ expressions that are not complete programs?

For example:

1 + 1

foo()

// etc...
Community
  • 1
  • 1
sdgfsdh
  • 33,689
  • 26
  • 132
  • 245

0 Answers0