Exemplo n.º 1
0
			public override void Visit(UsingNamespace un)
			{
				var ud = new UsingDeclaration();
				var loc = LocationsBag.GetLocations(un);
				ud.AddChild(new CSharpTokenNode(Convert(un.Location), UsingDeclaration.UsingKeywordRole), UsingDeclaration.UsingKeywordRole);
				if (un.NamespaceExpression != null)
					ud.AddChild(ConvertToType(un.NamespaceExpression), UsingDeclaration.ImportRole);
				if (loc != null)
					ud.AddChild(new CSharpTokenNode(Convert(loc [0]), Roles.Semicolon), Roles.Semicolon);
				AddToNamespace(ud);
			}
Exemplo n.º 2
0
void case_18()
#line 475 "cs-parser.jay"
{
		UsingClause uc;
		if (yyVals[-2+yyTop] != null) {
			if (lang_version <= LanguageVersion.V_5)
				FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "using static");

			uc = new UsingType ((ATypeNameExpression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
			lbag.AddLocation (uc, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
		} else {
			uc = new UsingNamespace ((ATypeNameExpression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
			lbag.AddLocation (uc, GetLocation (yyVals[0+yyTop]));
		}

		current_namespace.AddUsing (uc);
	  }
Exemplo n.º 3
0
		public virtual void Visit (UsingNamespace un)
		{
		}