Dump a JSON representation of the V AST for a given .v or .vsh file.
Usage:
v ast demo.v generate demo.json file.
v ast -w demo.v generate demo.json file, and watch for changes.
v ast -c demo.v generate demo.json *and* a demo.c file, and watch for
changes.
v ast -p demo.v print the json output to stdout.
Dump a JSON representation of the V AST for a given .v or .vsh file.
By default, `v ast` will save the JSON to a .json file, named after the .v file.
Pass -p to see it instead.
The arguments should be at least 1 in number.
Options:
-w, --watch Watch a .v file for changes, rewrite the .json file,
when a change is detected
-p, --print Print the AST to stdout
-c, --compile Watch the .v file for changes, rewrite the .json
File, *AND* generate a .c file too on any change
-t, --terse terse output, only with tree node names
(AST structure), no details
-s, --skip-defaults skip properties that have default values like [], {}, false, 0, ""
--hide Hide the specified fields. You can give several, by
separating them with `,`
-h, --help Display this help and exit
--version Output version information and exit