Ejemplo n.º 1
0
        public void Emit(IList <Expr> args, TokenTextWriter stream, int contextBindingStrength, bool fragileContext)
        {
            Debug.Assert(args.Count == ArgumentCount);

            // TODO: Don't ignore contextBindingStrength and fragileContext
            stream.SetToken(ref this.Token);
            var popRequired = stream.push(FunctionName);

            stream.Write(this.FunctionName);
            stream.Write("(");
            for (int index = 0; index < args.Count; ++index)
            {
                args[index].Emit(stream, contextBindingStrength, fragileContext);

                if (index < (args.Count - 1))
                {
                    stream.Write(", ");
                }
            }

            stream.Write(")");
            stream.pop(popRequired);
        }
Ejemplo n.º 2
0
 public void Emit(TokenTextWriter stream) {
   Contract.Requires(stream != null);
   stream.SetToken(this);
   Contract.Assert(this.Tr.Count >= 1);
   string/*!*/ sep = Pos ? "{ " : "{:nopats ";
   foreach (Expr/*!*/ e in this.Tr) {
     Contract.Assert(e != null);
     stream.Write(sep);
     sep = ", ";
     e.Emit(stream);
   }
   stream.Write(" }");
 }
Ejemplo n.º 3
0
 public void Emit(TokenTextWriter stream) {
   Contract.Requires(stream != null);
   stream.SetToken(this);
   if (this.Name != NoName) {
     stream.Write("{0}: ", TokenTextWriter.SanitizeIdentifier(this.Name));
   }
   this.Type.Emit(stream);
   if (this.WhereExpr != null) {
     stream.Write(" where ");
     this.WhereExpr.Emit(stream);
   }
 }
Ejemplo n.º 4
0
 public void Emit(TokenTextWriter stream) {
   Contract.Requires(stream != null);
   stream.SetToken(this);
   this.TopLevelDeclarations.Emit(stream);
 }