mirror of
https://github.com/nushell/nushell.git
synced 2024-11-08 09:34:30 +01:00
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]]`
|
||||
Table,
|
||||
|
||||
/// A table is allowed, eg `[first second]`
|
||||
/// A list is allowed, eg `[first second]`
|
||||
List(Box<SyntaxShape>),
|
||||
|
||||
/// 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`
|
||||
DateTime,
|
||||
|
||||
/// An operator
|
||||
/// An operator, eg `+`
|
||||
Operator,
|
||||
|
||||
/// 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`
|
||||
MathExpression,
|
||||
|
||||
/// A variable name
|
||||
/// A variable name, eg `$foo`
|
||||
Variable,
|
||||
|
||||
/// 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`
|
||||
Expression,
|
||||
|
||||
/// A boolean value
|
||||
/// A boolean value, eg `true` or `false`
|
||||
Boolean,
|
||||
|
||||
/// A record value
|
||||
/// A record value, eg `{x: 1, y: 2}`
|
||||
Record,
|
||||
|
||||
/// An error value
|
||||
|
Loading…
Reference in New Issue
Block a user