11use std:: { error:: Error , fmt:: Display , hash:: Hash , iter:: Peekable } ;
2- use super :: lexer:: { DataToken , Token } ;
2+ use crate :: lexer:: { DataToken , Token } ;
33
44#[ derive( Debug ) ]
55pub struct ParseError {
@@ -20,7 +20,7 @@ impl ParseError {
2020
2121impl Display for ParseError {
2222 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
23- if super :: LOG . verbosity >= 2 {
23+ if crate :: LOG . verbosity >= 2 {
2424 write ! ( f, "Parsing error token {:?}!\n \n {}\n ({:?})" , self . token, self . descriptive, self . reason)
2525 } else {
2626 write ! ( f, "Parsing error at token {:?}: {:?}" , self . token, self . reason)
@@ -264,7 +264,7 @@ fn parse_global(tokens: &mut tokenstream!()) -> Result<AST, ParseError> {
264264
265265 loop {
266266 #[ cfg( feature = "slow_dev_debugging" ) ]
267- super :: LOG . debug ( & format ! ( "Parsing Token: {:?}" , tokens. peek( ) ) ) ;
267+ crate :: LOG . debug ( & format ! ( "Parsing Token: {:?}" , tokens. peek( ) ) ) ;
268268
269269 match tokens. next ( ) {
270270 Some ( t) => match t. inner ( ) {
@@ -398,7 +398,7 @@ fn parse_scope(tokens: &mut tokenstream!()) -> Result<Scope, ParseError> {
398398 let mut statements = Vec :: new ( ) ;
399399 loop {
400400 #[ cfg( feature = "slow_dev_debugging" ) ]
401- super :: LOG . debug ( & format ! ( "Parsing token in scope: {:?}" , tokens. peek( ) ) ) ;
401+ crate :: LOG . debug ( & format ! ( "Parsing token in scope: {:?}" , tokens. peek( ) ) ) ;
402402
403403 expect_token_peek ! ( tokens, tok, match tok. inner( ) {
404404 Token :: BracesEnd => { tokens. next( ) ; return Ok ( Scope { statements } ) } ,
@@ -487,7 +487,7 @@ fn parse_scope(tokens: &mut tokenstream!()) -> Result<Scope, ParseError> {
487487
488488 statements. push( Stmt :: If { id, cond, if_cond, else_cond, } )
489489 } ,
490- Token :: Terminator => { super :: LOG . explicit( & format!( "Stray terminator `;`: {:?}" , & tok) ) ; tokens. next( ) ; } ,
490+ Token :: Terminator => { crate :: LOG . explicit( & format!( "Stray terminator `;`: {:?}" , & tok) ) ; tokens. next( ) ; } ,
491491 _ => {
492492 statements. push( Stmt :: Expr ( parse_expr( tokens, 0 ) ?) ) ;
493493 optional!( tokens, Comma ) ;
@@ -498,7 +498,7 @@ fn parse_scope(tokens: &mut tokenstream!()) -> Result<Scope, ParseError> {
498498
499499fn parse_expr ( tokens : & mut tokenstream ! ( ) , min_bp : u8 ) -> Result < Expr , ParseError > {
500500 #[ cfg( feature = "slow_dev_debugging" ) ]
501- super :: LOG . debug ( & format ! ( "Expr parsing: {:?}" , tokens. peek( ) ) ) ;
501+ crate :: LOG . debug ( & format ! ( "Expr parsing: {:?}" , tokens. peek( ) ) ) ;
502502
503503 let mut lhs = expect_token_peek ! ( tokens, tok, match tok. inner( ) {
504504 Token :: ParenthesesBegin => {
@@ -537,7 +537,7 @@ fn parse_expr(tokens: &mut tokenstream!(), min_bp: u8) -> Result<Expr, ParseErro
537537 tokens. next( ) ;
538538
539539 #[ cfg( feature = "slow_dev_debugging" ) ]
540- super :: LOG . debug( & format!( "Expr parsing post ident: {:?}" , tokens. peek( ) ) ) ;
540+ crate :: LOG . debug( & format!( "Expr parsing post ident: {:?}" , tokens. peek( ) ) ) ;
541541
542542 expect_token_peek!( tokens, t, match t. inner( ) {
543543 // POSTFIX OPERATORS
0 commit comments