Example #1
0
        private static Name EncodeTupleParamName(TupleExpr param)
        {
            // we encode a tuple parameter so we can extract the compound
            // members back out of it's name.
            StringBuilder sb = new StringBuilder(tupleArgHeader);

            AppendTupleParamNames(sb, param);

            return(Name.Make(sb.ToString()));
        }
Example #2
0
 private static void AppendTupleParamNames(StringBuilder sb, TupleExpr param)
 {
     for (int i = 0; i < param.items.Length; i++)
     {
         NameExpr ne = param.items[i] as NameExpr;
         if (ne != null)
         {
             sb.Append('!');
             sb.Append(ne.name.GetString());
         }
         else
         {
             // nested tuple
             AppendTupleParamNames(sb, param.items[i] as TupleExpr);
         }
     }
 }
Example #3
0
 public override bool Walk(TupleExpr node)
 {
     return(true);
 }
 public virtual void PostWalk(TupleExpr node)
 {
 }
 // TupleExpr
 public virtual bool Walk(TupleExpr node)
 {
     return(false);
 }