fn user_ident(&self, expr: &Spanned<Expr<'src>>) -> ParseResult<'src, UserIdent<'src>> {
        Ok(match expr.node.kind() {
            ExprKind::Ident(n) => UserIdent::new(&self.source.name, n),
            ExprKind::Access { left, identifier } => {
                if let ExprKind::Ident(left) = left.node.kind() {
                    UserIdent::new(left, identifier.node)
                } else {
                    return Err(Spanned::from_span(
                        left.span,
                        ParseError::InternalError(
                            "The left side of this expression has to be an Identifier",
                        ),
                    ));
                }
            }
            _ => {
                return Err(Spanned::from_span(
                    expr.span,
                    ParseError::InternalError(
                        "The expression for a user_ident has to be an Ident or an Access",
                    ),
                ));
            }
        })
    }
/// Parses a user ident of type name or package.name
Parses a user ident of type name or package.name
Parses a user ident of type name or package . name
fn user_ident(&self, expr: &Spanned<Expr<'src>>) -> ParseResult<'src, UserIdent<'src>> {
        Ok(match expr.node.kind() {
            ExprKind::Ident(n) => UserIdent::new(&self.source.name, n),
            ExprKind::Access { left, identifier } => {
                if let ExprKind::Ident(left) = left.node.kind() {
                    UserIdent::new(left, identifier.node)
                } else {
                    return Err(Spanned::from_span(
                        left.span,
                        ParseError::InternalError(
                            "The left side of this expression has to be an Identifier",
                        ),
                    ));
                }
            }
            _ => {
                return Err(Spanned::from_span(
                    expr.span,
                    ParseError::InternalError(
                        "The expression for a user_ident has to be an Ident or an Access",
                    ),
                ));
            }
        })
    }
fn user_ident ( & self , expr : & Spanned < Expr < ' src > > ) -> ParseResult < ' src , UserIdent < ' src > > { Ok ( match expr . node . kind ( ) { ExprKind :: Ident ( n ) => UserIdent :: new ( & self . source . name , n ) , ExprKind :: Access { left , identifier } => { if let ExprKind :: Ident ( left ) = left . node . kind ( ) { UserIdent :: new ( left , identifier . node ) } else { return Err ( Spanned :: from_span ( left . span , ParseError :: InternalError ( " " , ) , ) ) ; } } _ => { return Err ( Spanned :: from_span ( expr . span , ParseError :: InternalError ( " " , ) , ) ) ; } } ) }
Parses a user ident of type name or package.name
Parses a user ident of type name or package . name
&self
expr
&Spanned<Expr<'src>>
&self
expr
&Spanned<Expr<'src>>