diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index 9f895987..d9f8c174 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -114,13 +114,13 @@ struct Generate { /// Only generate `grammar.json` and `node-types.json` #[arg(long)] pub no_parser: bool, - /// Compile all defined languages in the current dir + /// Deprecated: use the `build` command #[arg(long, short = 'b')] pub build: bool, - /// Compile a parser in debug mode + /// Deprecated: use the `build` command #[arg(long, short = '0')] pub debug_build: bool, - /// The path to the directory containing the parser library + /// Deprecated: use the `build` command #[arg(long, value_name = "PATH")] pub libdir: Option, /// The path to output the generated source files @@ -905,6 +905,7 @@ impl Generate { } } if self.build { + warn!("--build is deprecated, use the `build` command"); if let Some(path) = self.libdir { loader = loader::Loader::with_parser_lib_path(path); } diff --git a/docs/src/cli/generate.md b/docs/src/cli/generate.md index 9014e0ea..32c8437a 100644 --- a/docs/src/cli/generate.md +++ b/docs/src/cli/generate.md @@ -34,17 +34,6 @@ The ABI to use for parser generation. The default is ABI 15, with ABI 14 being a Only generate `grammar.json` and `node-types.json` -### `-0/--debug-build` - -Compile the parser with debug flags enabled. This is useful when debugging issues that require a debugger like `gdb` or `lldb`. - -### `--libdir ` - -The directory to place the compiled parser(s) in. -On Unix systems, the default path is `$XDG_CACHE_HOME/tree-sitter` if `$XDG_CACHE_HOME` is set, -otherwise `$HOME/.config/tree-sitter` is used. On Windows, the default path is `%LOCALAPPDATA%\tree-sitter` if available, -otherwise `$HOME\AppData\Local\tree-sitter` is used. - ### `-o/--output` The directory to place the generated parser in. The default is `src/` in the current directory.