fn parse_interpolated_string(
    registry: &dyn SignatureRegistry,
    lite_arg: &Spanned<String>,
) -> (SpannedExpression, Option<ParseError>) {
    trace!("Parse_interpolated_string");
    let inner_string = trim_quotes(&lite_arg.item);
    let mut error = None;

    let (format_result, err) = format(&inner_string, lite_arg.span.start() + 1);

    if error.is_none() {
        error = err;
    }

    let mut output = vec![];

    for f in format_result {
        match f {
            FormatCommand::Text(t) => {
                output.push(SpannedExpression {
                    expr: Expression::Literal(hir::Literal::String(t.item)),
                    span: t.span,
                });
            }
            FormatCommand::Column(c) => {
                let (o, err) = parse_full_column_path(&c, registry);
                if error.is_none() {
                    error = err;
                }
                output.push(o);
            }
        }
    }

    let block = vec![Commands {
        span: lite_arg.span,
        list: vec![ClassifiedCommand::Internal(InternalCommand {
            name: "build-string".to_owned(),
            name_span: lite_arg.span,
            args: hir::Call {
                head: Box::new(SpannedExpression {
                    expr: Expression::Synthetic(hir::Synthetic::String("build-string".to_owned())),
                    span: lite_arg.span,
                }),
                external_redirection: ExternalRedirection::Stdout,
                named: None,
                positional: Some(output),
                span: lite_arg.span,
            },
        })],
    }];

    let call = SpannedExpression {
        expr: Expression::Invocation(Block::new(vec![], block, lite_arg.span)),
        span: lite_arg.span,
    };

    (call, error)
}
/// Parses an interpolated string, one that has expressions inside of it
Parses an interpolated string, one that has expressions inside of it
Parses an interpolated string one that has expressions inside of it
fn parse_interpolated_string(
    registry: &dyn SignatureRegistry,
    lite_arg: &Spanned<String>,
) -> (SpannedExpression, Option<ParseError>) {
    trace!("Parse_interpolated_string");
    let inner_string = trim_quotes(&lite_arg.item);
    let mut error = None;
    let (format_result, err) = format(&inner_string, lite_arg.span.start() + 1);
    if error.is_none() {
        error = err;
    }
    let mut output = vec![];
    for f in format_result {
        match f {
            FormatCommand::Text(t) => {
                output.push(SpannedExpression {
                    expr: Expression::Literal(hir::Literal::String(t.item)),
                    span: t.span,
                });
            }
            FormatCommand::Column(c) => {
                let (o, err) = parse_full_column_path(&c, registry);
                if error.is_none() {
                    error = err;
                }
                output.push(o);
            }
        }
    }
    let block = vec![Commands {
        span: lite_arg.span,
        list: vec![ClassifiedCommand::Internal(InternalCommand {
            name: "build-string".to_owned(),
            name_span: lite_arg.span,
            args: hir::Call {
                head: Box::new(SpannedExpression {
                    expr: Expression::Synthetic(hir::Synthetic::String("build-string".to_owned())),
                    span: lite_arg.span,
                }),
                external_redirection: ExternalRedirection::Stdout,
                named: None,
                positional: Some(output),
                span: lite_arg.span,
            },
        })],
    }];
    let call = SpannedExpression {
        expr: Expression::Invocation(Block::new(vec![], block, lite_arg.span)),
        span: lite_arg.span,
    };
    (call, error)
}
fn parse_interpolated_string ( registry : & dyn SignatureRegistry , lite_arg : & Spanned < String > , ) -> ( SpannedExpression , Option < ParseError > ) { trace ! ( " " ) ; let inner_string = trim_quotes ( & lite_arg . item ) ; let mut error = None ; let ( format_result , err ) = format ( & inner_string , lite_arg . span . start ( ) + 1 ) ; if error . is_none ( ) { error = err ; } let mut output = vec ! [ ] ; for f in format_result { match f { FormatCommand :: Text ( t ) => { output . push ( SpannedExpression { expr : Expression :: Literal ( hir :: Literal :: String ( t . item ) ) , span : t . span , } ) ; } FormatCommand :: Column ( c ) => { let ( o , err ) = parse_full_column_path ( & c , registry ) ; if error . is_none ( ) { error = err ; } output . push ( o ) ; } } } let block = vec ! [ Commands { span lite_arg span list vec [ ClassifiedCommand Internal ( InternalCommand { name " " to_owned ( ) name_span lite_arg span args hir Call { head Box new ( SpannedExpression { expr Expression Synthetic ( hir Synthetic String ( " " to_owned ( ) ) ) span lite_arg span } ) external_redirection ExternalRedirection Stdout named None positional Some ( output ) span lite_arg span } } ) ] } ] ; let call = SpannedExpression { expr : Expression :: Invocation ( Block :: new ( vec ! [ ] , block , lite_arg . span ) ) , span : lite_arg . span , } ; ( call , error ) }
Parses an interpolated string, one that has expressions inside of it
Parses an interpolated string one that has expressions inside of it
registry
&dyn SignatureRegistry
lite_arg
&Spanned<String>
registry
&dyn SignatureRegistry
lite_arg
&Spanned<String>