public override IDeclaration?FindDeclaration(S.SyntaxNode expression)
        {
            switch (expression)
            {
            case S.TypeSpecifier expr:
                return(FindDeclarationCore(expr));

            case S.AccessExpression expr:
                return(FindDeclarationCore(expr));

            case S.Identifier expr:
                return(FindDeclarationCore(expr));

            default:
                Error(DiagnosticCode.InvalidTypeSpecifier, expression.Location);
                return(null);
            }
        }
Example #2
0
 public abstract IDeclaration?FindDeclaration(S.SyntaxNode expression);
Example #3
0
 public override IDeclaration?FindDeclaration(S.SyntaxNode expr) => Parent?.FindDeclaration(expr);