mirror of
https://github.com/nushell/nushell.git
synced 2024-11-23 08:53:29 +01:00
Fix build issues
This commit is contained in:
parent
fbd980f8b0
commit
3f600c5b82
@ -407,7 +407,7 @@ impl ColorSyntax for CommandTailShape {
|
|||||||
for (name, kind) in &signature.named {
|
for (name, kind) in &signature.named {
|
||||||
trace!(target: "nu::color_syntax", "looking for {} : {:?}", name, kind);
|
trace!(target: "nu::color_syntax", "looking for {} : {:?}", name, kind);
|
||||||
|
|
||||||
match kind {
|
match &kind.0 {
|
||||||
NamedType::Switch => {
|
NamedType::Switch => {
|
||||||
match token_nodes.extract(|t| t.as_flag(name, context.source())) {
|
match token_nodes.extract(|t| t.as_flag(name, context.source())) {
|
||||||
Some((pos, flag)) => args.insert(pos, vec![flag.color()]),
|
Some((pos, flag)) => args.insert(pos, vec![flag.color()]),
|
||||||
@ -502,7 +502,7 @@ impl ColorSyntax for CommandTailShape {
|
|||||||
for arg in &signature.positional {
|
for arg in &signature.positional {
|
||||||
trace!("Processing positional {:?}", arg);
|
trace!("Processing positional {:?}", arg);
|
||||||
|
|
||||||
match arg {
|
match &arg.0 {
|
||||||
PositionalType::Mandatory(..) => {
|
PositionalType::Mandatory(..) => {
|
||||||
if token_nodes.at_end() {
|
if token_nodes.at_end() {
|
||||||
break;
|
break;
|
||||||
@ -527,7 +527,7 @@ impl ColorSyntax for CommandTailShape {
|
|||||||
color_syntax(&MaybeSpaceShape, token_nodes, context);
|
color_syntax(&MaybeSpaceShape, token_nodes, context);
|
||||||
|
|
||||||
// If no match, we should roll back any whitespace we chomped
|
// If no match, we should roll back any whitespace we chomped
|
||||||
color_fallible_syntax(&arg.syntax_type(), token_nodes, context)?;
|
color_fallible_syntax(&arg.0.syntax_type(), token_nodes, context)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
});
|
});
|
||||||
@ -539,7 +539,7 @@ impl ColorSyntax for CommandTailShape {
|
|||||||
|
|
||||||
trace_remaining("after positional", token_nodes.clone(), context.source());
|
trace_remaining("after positional", token_nodes.clone(), context.source());
|
||||||
|
|
||||||
if let Some(syntax_type) = signature.rest_positional {
|
if let Some((syntax_type, _)) = signature.rest_positional {
|
||||||
loop {
|
loop {
|
||||||
if token_nodes.at_end_possible_ws() {
|
if token_nodes.at_end_possible_ws() {
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user