github / semantic

Parsing, analyzing, and comparing source code across many languages
8.94k stars 454 forks source link

Re-enable `semantic parse --json` output. #613

Closed patrickt closed 4 years ago

patrickt commented 4 years ago

When we switched away from alacarte syntax, we lost the --json option for AST output. However, the majority of the needed code was already implemented by @aymannadeem, so all we had to do was have the syntax types opt into the MarshalJSON API, and to define the boilerplate needed to plug it into the Serialize interface.

Fixes #471.