예제 #1
0
 public void VisitClass(ClassDef c)
 {
     w.Write("class");
     w.Write(" ");
     w.Write(c.name.Name);
     if (c.args != null && c.args.Count > 0)
     {
         w.Write("(");
         w.Write(string.Join(",", c.args.Select(e => e.ToString())));
         w.Write(")");
     }
     w.WriteLine(":");
     ++w.IndentLevel;
     c.body.Accept(this);
     --w.IndentLevel;
 }
예제 #2
0
 public void VisitAsync(AsyncStatement a)
 {
     w.Write("async");
     w.Write(" ");
     a.Statement.Accept(this);
 }
예제 #3
0
 public void VisitComment(CommentStatement c)
 {
     w.Write("#{0}", c.comment);
 }