Ejemplo n.º 1
0
 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()));
     }
 }
Ejemplo n.º 2
0
        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);
                }
            }
        }
Ejemplo n.º 3
0
 public override void EnterUsingDeclarationWithIdentifier([NotNull] SBP.UsingDeclarationWithIdentifierContext context)
 {
     m_expressionData.PushStackLevel("Using identifier");
 }