示例#1
0
 public virtual AliasDefinition VisitAliasDefinition(AliasDefinition aliasDefinition)
 {
     if (aliasDefinition == null) return null;
     aliasDefinition.AliasedType = this.VisitTypeReference(aliasDefinition.AliasedType);
     return aliasDefinition;
 }
示例#2
0
 public override AliasDefinition VisitAliasDefinition(AliasDefinition aliasDefinition)
 {
     if (aliasDefinition == null) return null;
     return base.VisitAliasDefinition((AliasDefinition)aliasDefinition.Clone());
 }
示例#3
0
 public override AliasDefinition VisitAliasDefinition(AliasDefinition aliasDefinition)
 {
     WriteStart("using {0}=", aliasDefinition.Alias.Name);
     this.VisitExpression(aliasDefinition.AliasedExpression);
     WriteFinish(";");
     return aliasDefinition;
 }
示例#4
0
 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); }