Exemplo n.º 1
0
        private ZCallDesc ToZCallDesc(ZMethodDesc methodDesc)
        {
            ZCallDesc callDesc = new ZCallDesc();

            foreach (var part in methodDesc.Parts)
            {
                if (part is string)
                {
                    callDesc.Add(part);
                }
                else if (part is ZMethodNormalArg)
                {
                    ZMethodNormalArg mna     = part as ZMethodNormalArg;
                    ZCallValueArg    callArg = new ZCallValueArg(mna.ArgZType);
                    callDesc.Add(callArg);
                }
                else if (part is ZMethodGenericArg)
                {
                    ZMethodGenericArg mna     = part as ZMethodGenericArg;
                    ZCallValueArg     callArg = new ZCallValueArg(mna.ArgBaseZType);
                    callDesc.Add(callArg);
                }
                else
                {
                    throw new CompileException();
                }
            }
            return(callDesc);
        }
Exemplo n.º 2
0
 public ZMethodDesc Parser(string code)
 {
     i    = 0;
     desc = new ZMethodDesc();
     Code = code;
     while (i < Code.Length)
     {
         if (ch == '(')
         {
             parseBracket();
         }
         else
         {
             parseText();
         }
     }
     return(desc);
 }
Exemplo n.º 3
0
 public void AnalyName(NameTypeParser parser)
 {
     AnlayNameBody(parser);
     this.ProcContext.ProcDesc = ProcDesc;
 }