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); }
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); }
public virtual void Visit (UsingNamespace un) { }