/// Creates a new parser, given an input `str` and a `HashMap` binding
/// an operator and its precedence in binary expressions.
Creates a new parser, given an input `str` and a `HashMap` binding
an operator and its precedence in binary expressions.
Creates a new parser given an input ` str ` and a ` HashMap ` binding an operator and its precedence in binary expressions .
pub fn new(input: String, op_precedence: &'a mut HashMap<char, i32>) -> Self {
        let mut lexer = Lexer::new(input.as_str());
        let tokens = lexer.by_ref().collect();
        Parser {
            tokens: tokens,
            prec: op_precedence,
            pos: 0,
        }
    }
pub fn new ( input : String , op_precedence : & ' a mut HashMap < char , i32 > ) -> Self { let mut lexer = Lexer :: new ( input . as_str ( ) ) ; let tokens = lexer . by_ref ( ) . collect ( ) ; Parser { tokens : tokens , prec : op_precedence , pos : 0 , } }
Creates a new parser, given an input `str` and a `HashMap` binding
an operator and its precedence in binary expressions.
Creates a new parser given an input ` str ` and a ` HashMap ` binding an operator and its precedence in binary expressions .
input
String
op_precedence
&'a mut HashMap<char, i32>