forked from extern/nushell
Add comments for nu syntax shape (#7349)
# Description FIx the typo of `List` and also add more comments to other variants # User-Facing Changes _(List of all changes that impact the user experience here. This helps us keep track of breaking changes.)_ # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date.
This commit is contained in:
parent
21a645b1a9
commit
12deff5d1b
@ -55,7 +55,7 @@ pub enum SyntaxShape {
|
|||||||
/// A table is allowed, eg `[[first, second]; [1, 2]]`
|
/// A table is allowed, eg `[[first, second]; [1, 2]]`
|
||||||
Table,
|
Table,
|
||||||
|
|
||||||
/// A table is allowed, eg `[first second]`
|
/// A list is allowed, eg `[first second]`
|
||||||
List(Box<SyntaxShape>),
|
List(Box<SyntaxShape>),
|
||||||
|
|
||||||
/// A filesize value is allowed, eg `10kb`
|
/// A filesize value is allowed, eg `10kb`
|
||||||
@ -67,7 +67,7 @@ pub enum SyntaxShape {
|
|||||||
/// A datetime value, eg `2022-02-02` or `2019-10-12T07:20:50.52+00:00`
|
/// A datetime value, eg `2022-02-02` or `2019-10-12T07:20:50.52+00:00`
|
||||||
DateTime,
|
DateTime,
|
||||||
|
|
||||||
/// An operator
|
/// An operator, eg `+`
|
||||||
Operator,
|
Operator,
|
||||||
|
|
||||||
/// A math expression which expands shorthand forms on the lefthand side, eg `foo > 1`
|
/// A math expression which expands shorthand forms on the lefthand side, eg `foo > 1`
|
||||||
@ -77,7 +77,7 @@ pub enum SyntaxShape {
|
|||||||
/// A general math expression, eg `1 + 2`
|
/// A general math expression, eg `1 + 2`
|
||||||
MathExpression,
|
MathExpression,
|
||||||
|
|
||||||
/// A variable name
|
/// A variable name, eg `$foo`
|
||||||
Variable,
|
Variable,
|
||||||
|
|
||||||
/// A variable with optional type, `x` or `x: int`
|
/// A variable with optional type, `x` or `x: int`
|
||||||
@ -89,10 +89,10 @@ pub enum SyntaxShape {
|
|||||||
/// A general expression, eg `1 + 2` or `foo --bar`
|
/// A general expression, eg `1 + 2` or `foo --bar`
|
||||||
Expression,
|
Expression,
|
||||||
|
|
||||||
/// A boolean value
|
/// A boolean value, eg `true` or `false`
|
||||||
Boolean,
|
Boolean,
|
||||||
|
|
||||||
/// A record value
|
/// A record value, eg `{x: 1, y: 2}`
|
||||||
Record,
|
Record,
|
||||||
|
|
||||||
/// An error value
|
/// An error value
|
||||||
|
Loading…
Reference in New Issue
Block a user