public static string GetName(VBAParser.IdentifierContext context, out Interval tokenInterval) { tokenInterval = Interval.Of(context.Start.TokenIndex, context.Stop.TokenIndex); return(GetName(context)); }
public static string GetName(VBAParser.IdentifierContext context) { return(GetName(GetIdentifierValueContext(context))); }
public static Selection GetNameSelection(VBAParser.IdentifierContext context) { return(GetIdentifierValueContext(context).GetSelection()); }
private (Declaration declaration, bool mightHaveSetType) SetTypeDeterminingDeclarationOfExpression(VBAParser.IdentifierContext identifier, QualifiedModuleName containingModule, DeclarationFinder finder) { var declaration = finder.IdentifierReferences(identifier, containingModule) .Select(reference => reference.Declaration) .LastOrDefault(); return(declaration, MightHaveSetType(declaration)); }
public static VBAParser.TypeHintContext GetTypeHintContext(VBAParser.IdentifierContext identifier) { return(identifier.untypedIdentifier() != null ? null : identifier.typedIdentifier().typeHint()); }
public static string GetTypeHintValue(VBAParser.IdentifierContext identifier) { var typeHintContext = GetTypeHintContext(identifier); return(typeHintContext?.GetText()); }