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