fn parse_function_assignment_target(&mut self, ctx: &mut ErrorContext) -> ParseResult<LValue> {
        ctx.push(ContextTag::PrimaryExpr);
        
        let atom = self.parse_atom(ctx)?;
        
        let mut items = Vec::new();
        loop {
            let next = self.peek()?;
            match next.token {
                
                // access ::= "." IDENTIFIER ;
                Token::OpAccess => items.push(self.parse_member_access(ctx)?),
                
                // subscript ::= "[" expression "]" ;
                Token::OpenSquare => items.push(self.parse_index_access(ctx)?),
                
                _ => break,
            };
        }
        
        ctx.pop_extend();
        
        let lvalue =
            if items.is_empty() { LValue::try_from(atom) } 
            else { LValue::try_from(Primary::new(atom, items)) }
            .map_err(|_| ParserError::from("cannot assign a function to this"))?;
        
        Ok(lvalue)
    }
// similar to parse_primary(), except we only allow member access and index access, and convert to an LValue after
similar to parse_primary(), except we only allow member access and index access, and convert to an LValue after
similar to parse_primary () except we only allow member access and index access and convert to an LValue after
fn parse_function_assignment_target(&mut self, ctx: &mut ErrorContext) -> ParseResult<LValue> {
        ctx.push(ContextTag::PrimaryExpr);
        let atom = self.parse_atom(ctx)?;
        let mut items = Vec::new();
        loop {
            let next = self.peek()?;
            match next.token {
                // access ::= "." IDENTIFIER ;
                Token::OpAccess => items.push(self.parse_member_access(ctx)?),
                // subscript ::= "[" expression "]" ;
                Token::OpenSquare => items.push(self.parse_index_access(ctx)?),
                _ => break,
            };
        }
        ctx.pop_extend();
        let lvalue =
            if items.is_empty() { LValue::try_from(atom) } 
            else { LValue::try_from(Primary::new(atom, items)) }
            .map_err(|_| ParserError::from("cannot assign a function to this"))?;
        Ok(lvalue)
    }
fn parse_function_assignment_target ( & mut self , ctx : & mut ErrorContext ) -> ParseResult < LValue > { ctx . push ( ContextTag :: PrimaryExpr ) ; let atom = self . parse_atom ( ctx ) ? ; let mut items = Vec :: new ( ) ; loop { let next = self . peek ( ) ? ; match next . token { // access ::= "." IDENTIFIER ; Token :: OpAccess => items . push ( self . parse_member_access ( ctx ) ? ) , // subscript ::= "[" expression "]" ; Token :: OpenSquare => items . push ( self . parse_index_access ( ctx ) ? ) , _ => break , } ; } ctx . pop_extend ( ) ; let lvalue = if items . is_empty ( ) { LValue :: try_from ( atom ) } else { LValue :: try_from ( Primary :: new ( atom , items ) ) } . map_err ( | _ | ParserError :: from ( " " ) ) ? ; Ok ( lvalue ) }
similar to parse_primary(), except we only allow member access and index access, and convert to an LValue after
similar to parse_primary () except we only allow member access and index access and convert to an LValue after
&mut self
ctx
&mut ErrorContext
&mut self
ctx
&mut ErrorContext