示例#1
0
        internal StatementInfo Parse(ClzInfo model)
        {
            StatementInfo rslt = null;

            if (this.Expression != null)
            {
                rslt = this.Expression.Parse();
            }
            if (this.Declare_Statement != null)
            {
                rslt = this.Declare_Statement.Parse();
            }
            if (this.IfStatement != null)
            {
                rslt = this.IfStatement.Parse();
            }

            if (this.SwitchStatement != null)
            {
                rslt = this.SwitchStatement.Parse();
            }
            if (this.WhileStatement != null)
            {
                rslt = this.WhileStatement.Parse();
            }
            if (this.DoWhileStatement != null)
            {
                rslt = this.DoWhileStatement.Parse();
            }
            if (this.ForStatement != null)
            {
                rslt = this.ForStatement.Parse();
            }
            if (this.ForEachStatement != null)
            {
                rslt = this.ForEachStatement.Parse();
            }
            if (this.GotoStatement != null)
            {
                rslt = this.GotoStatement.Parse();
            }
            if (this.BreakStatement != null)
            {
                rslt = this.BreakStatement.Parse();
            }
            if (this.ContinueStatement != null)
            {
                rslt = this.ContinueStatement.Parse();
            }
            return(rslt);
        }
示例#2
0
文件: Clz.cs 项目: ruo2012/CodeHelper
        internal ClzInfo Parse()
        {
            var rslt = new ClzInfo();

            rslt.TokenPair = this;
            rslt.Name      = Name;

            foreach (var f in this.Fields)
            {
                rslt.fields.Add(f.Parse());
            }

            return(rslt);
        }
示例#3
0
        internal List<StatementInfo> Parse(ClzInfo model)
        {
            var rslt = new List<StatementInfo>();

            for(var i = 0 ; i < this.Statements.Count ; i ++)
            {
                var s = this.Statements[i].Parse(model);
                rslt.Add(s);

                if (i > 0)
                    s.Region.Prev = rslt[i - 1].Region;
            }

            return rslt;
        }
示例#4
0
        internal List <StatementInfo> Parse(ClzInfo model)
        {
            var rslt = new List <StatementInfo>();

            for (var i = 0; i < this.Statements.Count; i++)
            {
                var s = this.Statements[i].Parse(model);
                rslt.Add(s);

                if (i > 0)
                {
                    s.Region.Prev = rslt[i - 1].Region;
                }
            }

            return(rslt);
        }
示例#5
0
        internal StatementInfo Parse(ClzInfo model)
        {
            StatementInfo rslt = null;
            if (this.Expression != null)
            {
                rslt = this.Expression.Parse();

            }
            if (this.Declare_Statement !=null )
            {
                rslt = this.Declare_Statement.Parse();

            }
            if (this.IfStatement != null)
            {
                rslt = this.IfStatement.Parse();
            }

            if (this.SwitchStatement != null)
                rslt = this.SwitchStatement.Parse();
            if (this.WhileStatement != null)
                rslt = this.WhileStatement.Parse();
            if (this.DoWhileStatement != null)
                rslt = this.DoWhileStatement.Parse();
            if (this.ForStatement != null)
                rslt = this.ForStatement.Parse();
            if (this.ForEachStatement != null)
                rslt = this.ForEachStatement.Parse();
            if (this.GotoStatement != null)
                rslt = this.GotoStatement.Parse();
            if (this.BreakStatement != null)
                rslt = this.BreakStatement.Parse();
            if (this.ContinueStatement != null)
                rslt = this.ContinueStatement.Parse();
            return rslt;
        }