appleseedlab / maki

A tool for analyzing syntactic and semantic properties of C Preprocessor macros in C programs
9 stars 3 forks source link

Unify output as a JSON array w/ JSONPrinter class & emit body #11

Closed SilverMight closed 5 months ago

SilverMight commented 5 months ago

These changes unify the output of Maki as a single array of JSON objects containing a new property "Kind" which will represent if it was a Definition, Invocation, etc. This is done with the new JSONPrinter class.

In addition, the definition entries now emit the body of the macro.

PappasBrent commented 5 months ago

Looks good so far. Change JSONPrinter::generateJSONproperty() to escape string values for safe printing to JSON and I'll merge this PR.