示例#1
0
文件: CallStmt.cs 项目: Myvar/Eclang
        public override Statement Interprete(string src, int line)
        {
            var returns = new CallStmt();
            returns.Line = line;
            var reg = new Regex(Parser.Grammar.GetPattern("call").ToString());
            Match match = reg.Match(src);
            if (match.Success)
            {
                returns.Paramaters = new List<Primitive>();
                returns.Name = match.Groups[1].Value;
                if (match.Groups["params"].Value.Contains(','))
                {
                    foreach (string i in match.Groups["params"].Value.TrimEnd(')').Split(','))
                    {
                        returns.Paramaters.Add(StatmentVarHandler.HandleVar(i));
                    }
                }
            }

            return returns;
        }
示例#2
0
文件: CallStmt.cs 项目: Myvar/Eclang
        public override Statement Interprete(string src, int line)
        {
            var returns = new CallStmt();

            returns.Line = line;
            var   reg   = new Regex(Parser.Grammar.GetPattern("call").ToString());
            Match match = reg.Match(src);

            if (match.Success)
            {
                returns.Paramaters = new List <Primitive>();
                returns.Name       = match.Groups[1].Value;
                if (match.Groups["params"].Value.Contains(','))
                {
                    foreach (string i in match.Groups["params"].Value.TrimEnd(')').Split(','))
                    {
                        returns.Paramaters.Add(StatmentVarHandler.HandleVar(i));
                    }
                }
            }

            return(returns);
        }
示例#3
0
 public override void Visit(CallStmt call)
 {
     Result += call.Name + "\r";
 }
示例#4
0
 public virtual void Visit(CallStmt call)
 {
 }