private void AddUdtDeclaration(VBAParser.UdtDeclarationContext udtDeclaration, Accessibility accessibility, ParserRuleContext context)
        {
            var identifier          = Identifier.GetName(udtDeclaration.untypedIdentifier());
            var identifierSelection = Identifier.GetNameSelection(udtDeclaration.untypedIdentifier());
            var declaration         = CreateDeclaration(
                identifier,
                null,
                accessibility,
                DeclarationType.UserDefinedType,
                context,
                identifierSelection,
                false,
                null,
                null);

            AddDeclaration(declaration);
            _parentDeclaration = declaration; // treat members as child declarations, but keep them scoped to module
        }
 public override void EnterUdtDeclaration(VBAParser.UdtDeclarationContext context)
 {
     SetCurrentScope(Identifier.GetName(context.untypedIdentifier()), DeclarationType.UserDefinedType);
 }
示例#3
0
 public static string GetName(VBAParser.UdtDeclarationContext context, out Interval tokenInterval)
 {
     return(GetName(context.untypedIdentifier(), out tokenInterval));
 }