예제 #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));
        }
예제 #2
0
        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));
        }
예제 #4
0
 public static string GetName(VBAParser.SimpleNameExprContext context)
 {
     return(GetName(context.identifier()));
 }
예제 #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));
 }