public virtual AliasDefinition VisitAliasDefinition(AliasDefinition aliasDefinition) { if (aliasDefinition == null) return null; aliasDefinition.AliasedType = this.VisitTypeReference(aliasDefinition.AliasedType); return aliasDefinition; }
public override AliasDefinition VisitAliasDefinition(AliasDefinition aliasDefinition) { if (aliasDefinition == null) return null; return base.VisitAliasDefinition((AliasDefinition)aliasDefinition.Clone()); }
public override AliasDefinition VisitAliasDefinition(AliasDefinition aliasDefinition) { WriteStart("using {0}=", aliasDefinition.Alias.Name); this.VisitExpression(aliasDefinition.AliasedExpression); WriteFinish(";"); return aliasDefinition; }
private void ParseExternalAliasDirective(Namespace ns, TokenSet followers){ Debug.Assert(this.currentToken == Token.Extern); SourceContext sctx = this.scanner.CurrentSourceContext; this.GetNextToken(); if (this.currentToken == Token.Alias) this.GetNextToken(); else{ if (!Parser.IdentifierOrNonReservedKeyword[this.currentToken]){ this.SkipTo(followers, Error.SyntaxError, "alias"); return; } this.HandleError(Error.SyntaxError, "alias"); } if (!Parser.IdentifierOrNonReservedKeyword[this.currentToken]){ this.SkipTo(followers, Error.ExpectedIdentifier); return; } Identifier id = this.scanner.GetIdentifier(); this.GetNextToken(); this.SkipSemiColon(followers); sctx.EndPos = this.scanner.endPos; AliasDefinition aliasD = new AliasDefinition(id, null, sctx); aliasD.AliasedAssemblies = new AssemblyReferenceList(); ns.AliasDefinitions.Add(aliasD); }
public EventingVisitor(Action<AliasDefinition> visitAliasDefinition) { VisitedAliasDefinition += visitAliasDefinition; } public event Action<AliasDefinition> VisitedAliasDefinition; public override AliasDefinition VisitAliasDefinition(AliasDefinition aliasDefinition) { if (VisitedAliasDefinition != null) VisitedAliasDefinition(aliasDefinition); return base.VisitAliasDefinition(aliasDefinition); }