fn reformat_expression(target: &mut dyn LineWriteable, token: &Token) {
        for current in token.clone().into_inner() {
            match current.as_rule() {
                Rule::numeric_literal => target.write(current.as_str()),
                Rule::string_literal => target.write(current.as_str()),
                Rule::boolean_literal => target.write(current.as_str()),
                Rule::constant_literal => target.write(current.as_str()),
                Rule::function => Self::reformat_function_expression(target, &current),
                Rule::array_expression => Self::reformat_array_expression(target, &current),
                Rule::doc_comment | Rule::doc_comment_and_new_line => {
                    panic!("Comments inside expressions not supported yet.")
                }
                _ => Self::reformat_generic_token(target, &current),
            }
        }
    }
/// Parses an expression, given a Pest parser token.
Parses an expression, given a Pest parser token.
Parses an expression given a Pest parser token .
fn reformat_expression(target: &mut dyn LineWriteable, token: &Token) {
        for current in token.clone().into_inner() {
            match current.as_rule() {
                Rule::numeric_literal => target.write(current.as_str()),
                Rule::string_literal => target.write(current.as_str()),
                Rule::boolean_literal => target.write(current.as_str()),
                Rule::constant_literal => target.write(current.as_str()),
                Rule::function => Self::reformat_function_expression(target, &current),
                Rule::array_expression => Self::reformat_array_expression(target, &current),
                Rule::doc_comment | Rule::doc_comment_and_new_line => {
                    panic!("Comments inside expressions not supported yet.")
                }
                _ => Self::reformat_generic_token(target, &current),
            }
        }
    }
fn reformat_expression ( target : & mut dyn LineWriteable , token : & Token ) { for current in token . clone ( ) . into_inner ( ) { match current . as_rule ( ) { Rule :: numeric_literal => target . write ( current . as_str ( ) ) , Rule :: string_literal => target . write ( current . as_str ( ) ) , Rule :: boolean_literal => target . write ( current . as_str ( ) ) , Rule :: constant_literal => target . write ( current . as_str ( ) ) , Rule :: function => Self :: reformat_function_expression ( target , & current ) , Rule :: array_expression => Self :: reformat_array_expression ( target , & current ) , Rule :: doc_comment | Rule :: doc_comment_and_new_line => { panic ! ( " " ) } _ => Self :: reformat_generic_token ( target , & current ) , } } }
Parses an expression, given a Pest parser token.
Parses an expression given a Pest parser token .
target
&mut dyn LineWriteable
token
&Token
target
&mut dyn LineWriteable
token
&Token