public override void EnterEventStmt(VBAParser.EventStmtContext context) { var accessibility = GetMemberAccessibility(context.visibility()); var identifier = context.identifier(); if (identifier == null) { return; } var name = Identifier.GetName(identifier); var declaration = CreateDeclaration( name, null, accessibility, DeclarationType.Event, context, context.identifier().GetSelection(), false, null, null); AddDeclaration(declaration); SetCurrentScope(declaration, name); }
public static string GetName(VBAParser.EventStmtContext context, out Interval tokenInterval) { var nameContext = context.identifier(); return(GetName(nameContext, out tokenInterval)); }