You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an option to only generate the AST and output it (to stdout or a file) without actually generating a smx?
Would be interesting for tools like editors (showing errors etc.) and other static analysis.
Might for example allow to check if all natives in a include-file have a registered implementation, find all references of a variable or check for naming conventions etc.
Maybe something like spcomp --ast-output stdout or spcomp --ast-output ./ast.json would work?
Using it in combination with --syntax-only would skip the generation of smx-files and only output the AST instead.
I'd expect a JSON format, but maybe providing options to use different formats (or using a different format altogether) makes sense. Could use --ast-format json or similar to specify the format (on top of --ast-output ...).
The text was updated successfully, but these errors were encountered:
Is there an option to only generate the AST and output it (to stdout or a file) without actually generating a smx?
Would be interesting for tools like editors (showing errors etc.) and other static analysis.
Might for example allow to check if all natives in a include-file have a registered implementation, find all references of a variable or check for naming conventions etc.
Maybe something like
spcomp --ast-output stdout
orspcomp --ast-output ./ast.json
would work?Using it in combination with
--syntax-only
would skip the generation of smx-files and only output the AST instead.I'd expect a JSON format, but maybe providing options to use different formats (or using a different format altogether) makes sense. Could use
--ast-format json
or similar to specify the format (on top of--ast-output ...
).The text was updated successfully, but these errors were encountered: