public override void Compile() { if (mCondition == null) { throw new SitcomCompileException(keyword); } mCondition.Compile(); }
public override void Compile() { if (!mFinish) { throw new SitcomCompileException(keyword); } if (mContent != null) { mContent.Compile(); } }
public override void Compile() { if (mLeft != null) { mLeft.Compile(); } if (mRight != null) { mRight.Compile(); } }
public override void Compile() { if (mLeft == null) { throw new SitcomCompileException(keyword); } if (mRight == null) { throw new SitcomCompileException(keyword); } mLeft.Compile(); mRight.Compile(); }
public bool Read(SitcomFile sitcom) { if (sitcom.NextCmd()) { mKeys.Clear(); while (sitcom.NextKeyword()) { mKeys.Add(sitcom.keyword); } ISitcomOper replaced; var dom = new SitcomDomainOper(); dom.keyword = sitcom.keyword; mOper = dom; for (int i = 0; i < mKeys.Count; i++) { var oper = SitcomFactory.Instance.GetOperator(mKeys[i]); var root = GetRoot(mOper, oper.Priority); if (!root.IsBlock && root.Priority >= oper.Priority) { oper.AddLeftChild(root); mOper = oper; } else { mOper = root.AddRightChild(oper, out replaced); if (replaced != null) { oper.AddLeftChild(replaced); } } } while (mOper.Parent != null) { mOper = mOper.Parent; } if (mOper.RequireContent && sitcom.NextContent()) { mOper.AddContent(sitcom.keyword); } mOper.Compile(); return(true); } else { mOper = null; return(false); } }
public override void Compile() { if (mLeft != null) { mLeft.Compile(); } if (mKey != null) { mKVs.Add(mKey); mKey = null; } for (int i = 0; i < mKVs.Count; i++) { mKVs[i].key.Compile(); if (mKVs[i].value != null) { mKVs[i].value.Compile(); } } }