mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 18:57:44 +02:00
Multiline scripts part 2 (#2795)
* Begin allowing comments and multiline scripts. * clippy * Finish moving to groups. Test pass * Keep going * WIP * WIP * BROKEN WIP * WIP * WIP * Fix more tests * WIP: alias starts working * Broken WIP * Broken WIP * Variables begin to work * captures start working * A little better but needs fixed scope * Shorthand env setting * Update main merge * Broken WIP * WIP * custom command parsing * Custom commands start working * Fix coloring and parsing of block * Almost there * Add some tests * Add more param types * Bump version * Fix benchmark * Fix stuff
This commit is contained in:
@ -30,8 +30,10 @@ pub enum SyntaxShape {
|
||||
Unit,
|
||||
/// An operator
|
||||
Operator,
|
||||
/// A math expression, eg `foo > 1`
|
||||
/// A math expression which expands shorthand forms on the lefthand side, eg `foo > 1`
|
||||
Math,
|
||||
/// An initializer expression, eg the right hand side of `set x = 1 + 2`
|
||||
Initializer,
|
||||
}
|
||||
|
||||
impl PrettyDebug for SyntaxShape {
|
||||
@ -52,6 +54,7 @@ impl PrettyDebug for SyntaxShape {
|
||||
SyntaxShape::Unit => "unit",
|
||||
SyntaxShape::Operator => "operator",
|
||||
SyntaxShape::Math => "condition",
|
||||
SyntaxShape::Initializer => "initializer",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user