コード例 #1
0
        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
        }
コード例 #2
0
 public override void ExitUdtDeclaration(VBAParser.UdtDeclarationContext context)
 {
     SetCurrentScope();
 }
コード例 #3
0
 public override void EnterUdtDeclaration(VBAParser.UdtDeclarationContext context)
 {
     SetCurrentScope(Identifier.GetName(context.untypedIdentifier()), DeclarationType.UserDefinedType);
 }
コード例 #4
0
 public static string GetName(VBAParser.UdtDeclarationContext context, out Interval tokenInterval)
 {
     return(GetName(context.untypedIdentifier(), out tokenInterval));
 }
コード例 #5
0
 public override void EnterUdtDeclaration(VBAParser.UdtDeclarationContext context)
 {
     CheckContext(context, context.END_TYPE());
     base.EnterUdtDeclaration(context);
 }