fix(docs): update cli docs to reflect changes to various subcommand
arguments
This commit is contained in:
parent
0e1f715ef1
commit
877782a8a4
10 changed files with 75 additions and 16 deletions
|
|
@ -261,15 +261,10 @@ struct Parse {
|
|||
#[arg(long)]
|
||||
pub open_log: bool,
|
||||
/// Deprecated: use --json-summary
|
||||
#[arg(
|
||||
long,
|
||||
short = 'j',
|
||||
conflicts_with = "json_summary",
|
||||
conflicts_with = "stat"
|
||||
)]
|
||||
#[arg(long, conflicts_with = "json_summary", conflicts_with = "stat")]
|
||||
pub json: bool,
|
||||
/// Output parsing results in a JSON format
|
||||
#[arg(long, conflicts_with = "json", conflicts_with = "stat")]
|
||||
#[arg(long, short = 'j', conflicts_with = "json", conflicts_with = "stat")]
|
||||
pub json_summary: bool,
|
||||
/// The path to an alternative config.json file
|
||||
#[arg(long)]
|
||||
|
|
@ -348,7 +343,7 @@ struct Test {
|
|||
/// Show only the pass-fail overview tree
|
||||
#[arg(long)]
|
||||
pub overview_only: bool,
|
||||
/// Output the test summary in a JSON output
|
||||
/// Output the test summary in a JSON format
|
||||
#[arg(long)]
|
||||
pub json_summary: bool,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,18 @@ A list of test names to skip fuzzing.
|
|||
|
||||
The directory containing the parser. This is primarily useful in multi-language repositories.
|
||||
|
||||
### `-p/--grammar-path`
|
||||
|
||||
The path to the directory containing the grammar.
|
||||
|
||||
### `--lib-path`
|
||||
|
||||
The path to the parser's dynamic library. This is used instead of the cached or automatically generated dynamic library.
|
||||
|
||||
### `--lang-name`
|
||||
|
||||
If `--lib-path` is used, the name of the language used to extract the library's language function
|
||||
|
||||
### `--edits <EDITS>`
|
||||
|
||||
The maximum number of edits to perform. The default is 3.
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ Print the overview of states from the given rule. This is useful for debugging a
|
|||
item sets for all given states in a given rule. To solely view state count numbers for rules, pass in `-` for the rule argument.
|
||||
To view the overview of states for every rule, pass in `*` for the rule argument.
|
||||
|
||||
### `--json`
|
||||
### `--json-summary`
|
||||
|
||||
Report conflicts in a JSON format.
|
||||
|
||||
|
|
@ -54,3 +54,7 @@ The path to the JavaScript runtime executable to use when generating the parser.
|
|||
Note that you can also set this with `TREE_SITTER_JS_RUNTIME`. Starting from version 0.26.0, you can
|
||||
also pass in `native` to use the native QuickJS runtime that comes bundled with the CLI. This avoids
|
||||
the dependency on a JavaScript runtime entirely.
|
||||
|
||||
### `--disable-optimization`
|
||||
|
||||
Disable optimizations when generating the parser. Currently, this only affects the merging of compatible parse states.
|
||||
|
|
|
|||
|
|
@ -57,3 +57,7 @@ The path to an alternative configuration (`config.json`) file. See [the init-con
|
|||
### `-n/--test-number <TEST_NUMBER>`
|
||||
|
||||
Highlight the contents of a specific test.
|
||||
|
||||
### `-r/--rebuild`
|
||||
|
||||
Force a rebuild of the parser before running the fuzzer.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# `tree-sitter parse`
|
||||
|
||||
The `parse` command parses source files using a Tree-sitter parser. You can pass any number of file paths and glob patterns
|
||||
to `tree-sitter parse`, and it will parse all the given files. The command will exit with a non-zero status code if any
|
||||
parse errors occurred.
|
||||
to `tree-sitter parse`, and it will parse all the given files. If no paths are provided, input will be parsed from stdin.
|
||||
The command will exit with a non-zero status code if any parse errors occurred.
|
||||
|
||||
```bash
|
||||
tree-sitter parse [OPTIONS] [PATHS]... # Aliases: p
|
||||
|
|
@ -18,6 +18,14 @@ The path to a file that contains paths to source files to parse.
|
|||
|
||||
The path to the directory containing the grammar.
|
||||
|
||||
### `-l/--lib-path`
|
||||
|
||||
The path to the parser's dynamic library. This is used instead of the cached or automatically generated dynamic library.
|
||||
|
||||
### `--lang-name`
|
||||
|
||||
If `--lib-path` is used, the name of the language used to extract the library's language function
|
||||
|
||||
### `--scope <SCOPE>`
|
||||
|
||||
The language scope to use for parsing. This is useful when the language is ambiguous.
|
||||
|
|
@ -81,7 +89,7 @@ in `UTF-16BE` or `UTF-16LE`. If no `BOM` is present, `UTF-8` is the default. One
|
|||
|
||||
When using the `--debug-graph` option, open the log file in the default browser.
|
||||
|
||||
### `-j/--json`
|
||||
### `-j/--json-summary`
|
||||
|
||||
Output parsing results in a JSON format.
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,6 @@ For this to work, you must have already built the parser as a Wasm module. This
|
|||
|
||||
## Options
|
||||
|
||||
### `-e/--export <EXPORT_PATH>`
|
||||
|
||||
Export static playground files to the specified directory instead of serving them.
|
||||
|
||||
### `-q/--quiet`
|
||||
|
||||
Don't automatically open the playground in the default browser.
|
||||
|
|
@ -24,3 +20,7 @@ Don't automatically open the playground in the default browser.
|
|||
### `--grammar-path <GRAMMAR_PATH>`
|
||||
|
||||
The path to the directory containing the grammar and wasm files.
|
||||
|
||||
### `-e/--export <EXPORT_PATH>`
|
||||
|
||||
Export static playground files to the specified directory instead of serving them.
|
||||
|
|
|
|||
|
|
@ -12,6 +12,14 @@ tree-sitter query [OPTIONS] <QUERY_PATH> [PATHS]... # Aliases: q
|
|||
|
||||
The path to the directory containing the grammar.
|
||||
|
||||
### `--lib-path`
|
||||
|
||||
The path to the parser's dynamic library. This is used instead of the cached or automatically generated dynamic library.
|
||||
|
||||
### `--lang-name`
|
||||
|
||||
If `--lib-path` is used, the name of the language used to extract the library's language function
|
||||
|
||||
### `-t/--time`
|
||||
|
||||
Print the time taken to execute the query on the file.
|
||||
|
|
@ -51,3 +59,7 @@ The path to an alternative configuration (`config.json`) file. See [the init-con
|
|||
### `-n/--test-number <TEST_NUMBER>`
|
||||
|
||||
Query the contents of a specific test.
|
||||
|
||||
### `-r/--rebuild`
|
||||
|
||||
Force a rebuild of the parser before executing the query.
|
||||
|
|
|
|||
|
|
@ -36,3 +36,7 @@ The path to an alternative configuration (`config.json`) file. See [the init-con
|
|||
### `-n/--test-number <TEST_NUMBER>`
|
||||
|
||||
Generate tags from the contents of a specific test.
|
||||
|
||||
### `-r/--rebuild`
|
||||
|
||||
Force a rebuild of the parser before running the tags.
|
||||
|
|
|
|||
|
|
@ -24,6 +24,14 @@ Only run tests from the given filename in the corpus.
|
|||
|
||||
The path to the directory containing the grammar.
|
||||
|
||||
### `--lib-path`
|
||||
|
||||
The path to the parser's dynamic library. This is used instead of the cached or automatically generated dynamic library.
|
||||
|
||||
### `--lang-name`
|
||||
|
||||
If `--lib-path` is used, the name of the language used to extract the library's language function
|
||||
|
||||
### `-u/--update`
|
||||
|
||||
Update the expected output of tests.
|
||||
|
|
@ -78,3 +86,7 @@ Force a rebuild of the parser before running tests.
|
|||
### `--overview-only`
|
||||
|
||||
Only show the overview of the test results, and not the diff.
|
||||
|
||||
### `--json-summary`
|
||||
|
||||
Output the test summary in a JSON format.
|
||||
|
|
|
|||
|
|
@ -42,3 +42,11 @@ tree-sitter version
|
|||
### `-p/--grammar-path <PATH>`
|
||||
|
||||
The path to the directory containing the grammar.
|
||||
|
||||
### `--bump`
|
||||
|
||||
Automatically bump the version. Possible values are:
|
||||
|
||||
- `patch`: Bump the patch version.
|
||||
- `minor`: Bump the minor version.
|
||||
- `major`: Bump the major version.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue