Esempio n. 1
0
        public static string GetName(VBAParser.SimpleNameExprContext context, out Interval tokenInterval)
        {
            var nameContext = context.identifier();

            tokenInterval = Interval.Of(nameContext.Start.TokenIndex, nameContext.Stop.TokenIndex);
            return(GetName(context));
        }
        public IBoundExpression Resolve()
        {
            string name = Identifier.GetName(_expression.identifier());

            if (PreferProjectOverUdt)
            {
                return(ResolvePreferProject(name));
            }
            return(ResolvePreferUdt(name));
        }
        public IBoundExpression Resolve()
        {
            IBoundExpression boundExpression = null;
            string           name            = Identifier.GetName(_expression.identifier());

            boundExpression = ResolveEnclosingModule(name);
            if (boundExpression != null)
            {
                return(boundExpression);
            }
            boundExpression = ResolveEnclosingProject(name);
            if (boundExpression != null)
            {
                return(boundExpression);
            }
            boundExpression = ResolveOtherModuleInEnclosingProject(name);
            if (boundExpression != null)
            {
                return(boundExpression);
            }
            return(new ResolutionFailedExpression(_expression));
        }
Esempio n. 4
0
 public static string GetName(VBAParser.SimpleNameExprContext context)
 {
     return(GetName(context.identifier()));
 }
Esempio n. 5
0
 private IExpressionBinding Visit(Declaration module, Declaration parent, VBAParser.SimpleNameExprContext expression, IBoundExpression withBlockVariable, StatementResolutionContext statementContext)
 {
     return(new SimpleNameDefaultBinding(_declarationFinder, Declaration.GetProjectParent(parent), module, parent, expression, Identifier.GetName(expression.identifier()), statementContext));
 }