public override void ExitUsingDeclarationWithIdentifier([NotNull] SBP.UsingDeclarationWithIdentifierContext context) { if (context.ChildCount == 3) { m_usings.Add(new UsingData(context.Start.Line, "i", context.GetChild(1).GetText())); } else if (context.ChildCount == 4) { m_usings.Add(new UsingData(context.Start.Line, "I", context.GetChild(2).GetText())); } }
public override void ExitUsingDeclarationWithIdentifier([NotNull] SBP.UsingDeclarationWithIdentifierContext context) { var stack = m_expressionData.PopStackLevel(); if (!m_file.TypeScanIncluded) { var identifierExpression = stack.Pop(); if (identifierExpression.IsUnresolvedIdentifier) { var identifier = (string)identifierExpression.Value; // TODO: check the identifier m_file.AddNamespaceUsing(context.Start.Line, identifier); } } }
public override void EnterUsingDeclarationWithIdentifier([NotNull] SBP.UsingDeclarationWithIdentifierContext context) { m_expressionData.PushStackLevel("Using identifier"); }