private string GetShortReferenceTypeName(Using usi) { if (usi.IsAlias) return usi.Name; else return usi.Name.Substring(usi.Name.LastIndexOf('.') + 1); }
public override object TrackedVisitUsing(Using @using, object data) { @using.Name = Replace(@using.Name); if (@using.IsAlias) @using.Alias.Type = Replace(@using.Alias.Type); return base.TrackedVisitUsing(@using, data); }
private string GetFullyQualifiedName(Using usi) { if (usi.IsAlias) return usi.Alias.Type; else return usi.Name; }
public override object VisitUsing(Using @using, object data) { if (usings != null && [email protected]) { usings[@using.Name] = @using.Name; } return base.VisitUsing(@using, data); }
public override object TrackedVisitUsing(Using us, object data) { if (us.IsAlias) Add(us.Alias.Type); else Add(us.Name); return base.TrackedVisitUsing(us, data); }
public override object VisitUsing(Using @using, object data) { base.VisitUsing(@using, data); if (DefaultImportsToRemove != null && [email protected]) { if (DefaultImportsToRemove.Contains(@using.Name)) { RemoveCurrentNode(); } } return null; }
public object VisitUsing(Using @using, object data) { B.Import import; if (@using.IsAlias) { import = new B.Import(@using.Alias.Type, null, new B.ReferenceExpression(@using.Name)); import.LexicalInfo = GetLexicalInfo(@using); } else { import = new B.Import(GetLexicalInfo(@using), @using.Name); } module.Imports.Add(import); return import; }
public override object VisitUsing(Using @using, object data) { base.VisitUsing(@using, data); if (projectContent != null && projectContent.DefaultImports != null) { if ([email protected]) { // remove using if it is already part of the project-wide imports foreach (string defaultImport in projectContent.DefaultImports.Usings) { if (resolver.IsSameName(defaultImport, @using.Name)) { RemoveCurrentNode(); break; } } } } return null; }
public override object VisitUsing(AST.Using u, object data) { Debug.Assert(data is DefaultUsing); DefaultUsing us = (DefaultUsing)data; if (u.IsAlias) { IReturnType rt = CreateReturnType(u.Alias); if (rt != null) { us.AddAlias(u.Name, rt); } } else { us.Usings.Add(u.Name); } return(data); }
public override object TrackedVisitUsing(Using usi, object data) { if (Mode == "IKVM") { string key = ContainsKey(usi.Name); if (key != null) usi.Name = usi.Name.Replace(key, "@" + key); } if (usi.Name.EndsWith(".*")) { usi.Name = usi.Name.Substring(0, usi.Name.LastIndexOf('.')); } else { string name = usi.Name.Substring(usi.Name.LastIndexOf('.') + 1); usi.Alias = AstUtil.GetTypeReference(usi.Name, usi); usi.Name = name; } return base.TrackedVisitUsing(usi, data); }
public virtual object VisitUsing(Using @using, object data) { throw CreateException(@using); }
public override object VisitUsing(Using @using, object data) { return base.VisitUsing(@using, data); }
private bool IsMatch(Using left, Using right) { return left.Name == right.Name; }
public virtual object VisitUsing(Using @using, object data) { Debug.Assert((@using != null)); Debug.Assert((@using.Alias != null)); nodeStack.Push(@using.Alias); @using.Alias.AcceptVisitor(this, data); @using.Alias = ((TypeReference)(nodeStack.Pop())); return null; }
public override object TrackedVisitUsing(Using @using, object data) { return null; }
public virtual object TrackedVisitUsing(Using @using, object data) { return base.VisitUsing(@using, data); }
void ImportClause( #line 319 "VBNET.ATG" out Using u) { #line 321 "VBNET.ATG" string qualident = null; TypeReference aliasedType = null; u = null; Qualident( #line 325 "VBNET.ATG" out qualident); if (la.kind == 10) { lexer.NextToken(); TypeName( #line 326 "VBNET.ATG" out aliasedType); } #line 328 "VBNET.ATG" if (qualident != null && qualident.Length > 0) { if (aliasedType != null) { u = new Using(qualident, aliasedType); } else { u = new Using(qualident); } } }
public override object VisitUsing(Using @using, object data) { WriteLine("VisitUsing"); return base.VisitUsing(@using, data); }
public virtual bool VisitUsing(Using @using, object d) { if ((@using == null)) { return SetFailure(); } if ((d == null)) { return SetFailure(); } if ((@using.Alias == null)) { return SetFailure(); } if(@using.GetType() != d.GetType()) {return SetFailure();} var data = (Using)d; if (!IsMatch(@using, data)) { return SetFailure(); } return @using.Alias.AcceptVisitor(this, data.Alias); }
public virtual object VisitUsing(Using @using, object data) { throw new global::System.NotImplementedException("Using"); }
public object VisitUsing(Using @using, object data) { throw new NotImplementedException (); }
public sealed override object VisitUsing(Using @using, object data) { this.BeginVisit(@using); object result = this.TrackedVisitUsing(@using, data); this.EndVisit(@using); return result; }
public virtual object VisitUsing(Using @using, object data) { Debug.Assert((@using != null)); Debug.Assert((@using.Alias != null)); return @using.Alias.AcceptVisitor(this, data); }
void ImportClause( //#line 335 "VBNET.ATG" out Using u) { //#line 337 "VBNET.ATG" string qualident = null; TypeReference aliasedType = null; u = null; if (StartOf(4)) { Qualident( //#line 342 "VBNET.ATG" out qualident); if (la.kind == 20) { lexer.NextToken(); TypeName( //#line 343 "VBNET.ATG" out aliasedType); } //#line 345 "VBNET.ATG" if (qualident != null && qualident.Length > 0) { if (aliasedType != null) { u = new Using(qualident, aliasedType); } else { u = new Using(qualident); } } } else if (la.kind == 10) { //#line 353 "VBNET.ATG" string prefix = null; lexer.NextToken(); Identifier(); //#line 354 "VBNET.ATG" prefix = t.val; Expect(20); Expect(3); //#line 354 "VBNET.ATG" u = new Using(t.literalValue as string, prefix); Expect(11); } else SynErr(247); }
public override object VisitUsing (Using @using, object data) { Write ("'" + @using.Name + '"'); return null; }