syntax

edit

Synopsis

Meziantou.Framework.Language.Tool syntax [options]

Description

Dump the syntax tree of a CSS, INI, JSON, TOML, XML, regular expression, or shell document as JSON

Options

OptionDescription
--input <input>Path to the file to parse. If omitted, reads from stdin
--output <output>Path to the JSON file to write. If omitted, writes to stdout
--language <language>Language to parse the input as. If omitted, it is detected from the extension of --input, which is why it is required when reading from stdin. One of: css, ini, json, toml, xml, regex, regex-dotnet, regex-javascript, regex-pcre, regex-ere, regex-bre, sh, bash, zsh, powershell, pwsh, cmd
--no-tokensOmit the tokens of each node, and the trivia they carry
--no-triviaOmit the leading and trailing trivia of each token
--no-textOmit the source text of each node, token, and trivia
--no-spansOmit the source spans of each node, token, and trivia
-?, -h, --helpShow help and usage information