Commit a63599f 1 parent c604ba8 commit a63599f Copy full SHA for a63599f
File tree 1 file changed +0
-12
lines changed
1 file changed +0
-12
lines changed Original file line number Diff line number Diff line change @@ -35,22 +35,12 @@ pub trait PrattParser {
35
35
impl PrattParser for Parser < ' _ > {
36
36
/// Parse an expression using Pratt's parsing algorithm
37
37
fn parse_expression_pratt ( & mut self , precedence : u8 ) -> Result < Expression , ParsingError > {
38
- dbg ! ( "parse_expression_pratt" ) ;
39
38
let mut expression = self . parse_prefix ( ) ?;
40
39
41
- dbg ! ( "prefix expression: {:?}" , & expression) ;
42
40
loop {
43
- println ! ( "precedence: {:?}" , precedence) ;
44
41
let current_token = self . peek_token ( ) ?;
45
42
let next_precedence = get_precedence ( & current_token. token_type ) ;
46
43
47
- dbg ! ( "current_token: {:?}" , & current_token) ;
48
- dbg ! (
49
- "precedence: {:?}, next_precedence: {:?}" ,
50
- & precedence,
51
- & next_precedence
52
- ) ;
53
-
54
44
if precedence >= next_precedence {
55
45
break ;
56
46
}
@@ -66,8 +56,6 @@ impl PrattParser for Parser<'_> {
66
56
left : Expression ,
67
57
precedence : u8 ,
68
58
) -> Result < Expression , ParsingError > {
69
- dbg ! ( "parse_infix" ) ;
70
-
71
59
let token = self . peek_token ( ) ?;
72
60
73
61
let binary_operator_result = BinaryOp :: try_from ( & token. token_type ) ;
You can’t perform that action at this time.
0 commit comments