fn parse_primary_expr(&mut self, ctx: &mut ErrorContext) -> ParseResult<Expr> {
        let expr = match self.peek()?.token {
            Token::Class => unimplemented!(),
            Token::Fun => self.parse_function_decl_expr(ctx)?,
            
            Token::If => self.parse_if_expr(ctx)?,
            Token::Begin => self.parse_block_expr(ctx, None)?,
            
            Token::Label(..) => self.parse_expr_label(ctx)?,
            
            // Token::OpenBrace => Ok(ExprMeta::ObjectCtor(self.parse_object_constructor(ctx)?)),
            
            Token::Echo => {
                ctx.set_start(&self.advance().unwrap());
                Expr::Echo(Box::new(self.parse_expr_variant(ctx)?))
            },
            
            _ => self.parse_primary(ctx)?,
        };
        Ok(expr)
    }
/*
        Here we parse all the things that are tighter binding than either unary or binary operator expressions.
        We look for anything that can be immediately identified from the next token, or else fall back to a primary expression.
    */
Here we parse all the things that are tighter binding than either unary or binary operator expressions.
We look for anything that can be immediately identified from the next token, or else fall back to a primary expression.
Here we parse all the things that are tighter binding than either unary or binary operator expressions . We look for anything that can be immediately identified from the next token or else fall back to a primary expression .
fn parse_primary_expr(&mut self, ctx: &mut ErrorContext) -> ParseResult<Expr> {
        let expr = match self.peek()?.token {
            Token::Class => unimplemented!(),
            Token::Fun => self.parse_function_decl_expr(ctx)?,
            Token::If => self.parse_if_expr(ctx)?,
            Token::Begin => self.parse_block_expr(ctx, None)?,
            Token::Label(..) => self.parse_expr_label(ctx)?,
            // Token::OpenBrace => Ok(ExprMeta::ObjectCtor(self.parse_object_constructor(ctx)?)),
            Token::Echo => {
                ctx.set_start(&self.advance().unwrap());
                Expr::Echo(Box::new(self.parse_expr_variant(ctx)?))
            },
            _ => self.parse_primary(ctx)?,
        };
        Ok(expr)
    }
fn parse_primary_expr ( & mut self , ctx : & mut ErrorContext ) -> ParseResult < Expr > { let expr = match self . peek ( ) ? . token { Token :: Class => unimplemented ! ( ) , Token :: Fun => self . parse_function_decl_expr ( ctx ) ? , Token :: If => self . parse_if_expr ( ctx ) ? , Token :: Begin => self . parse_block_expr ( ctx , None ) ? , Token :: Label ( .. ) => self . parse_expr_label ( ctx ) ? , // Token::OpenBrace => Ok(ExprMeta::ObjectCtor(self.parse_object_constructor(ctx)?)), Token :: Echo => { ctx . set_start ( & self . advance ( ) . unwrap ( ) ) ; Expr :: Echo ( Box :: new ( self . parse_expr_variant ( ctx ) ? ) ) } , _ => self . parse_primary ( ctx ) ? , } ; Ok ( expr ) }
Here we parse all the things that are tighter binding than either unary or binary operator expressions.
Here we parse all the things that are tighter binding than either unary or binary operator expressions .
&mut self
ctx
&mut ErrorContext
&mut self
ctx
&mut ErrorContext