Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comments for nu syntax shape #7349

Merged
merged 1 commit into from
Dec 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add comments for nu syntax shape
  • Loading branch information
Kangaxx-0 committed Dec 4, 2022
commit 538845295b84c4d89a362f6801c1e535a6c339c2
10 changes: 5 additions & 5 deletions crates/nu-protocol/src/syntax_shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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`
Expand All @@ -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`
Expand All @@ -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
Expand Down