public override ISitcomOper Clone(SitcomFile.Keyword keyword) { var oper = new SitcomOrOper(this); oper.keyword = keyword; return(oper); }
public override ISitcomOper Clone(SitcomFile.Keyword keyword) { var oper = new SitcomConditionOper(); oper.keyword = keyword; return(oper); }
public override void AddContent(SitcomFile.Keyword keyword) { if (mLeft != null) { mLeft.AddContent(keyword); } }
public override ISitcomOper AddRightChild(ISitcomOper oper, out ISitcomOper replaced) { replaced = null; if (oper.Identify == SitcomDefine.OPER_COLON || oper.Identify == SitcomDefine.OPER_COLON2) // : { if (!mWaitContent) { mWaitContent = true; return(this); } if (mKey == null) { throw new SitcomCompileException(oper.keyword); } mKey.useKey = true; mUseKV = true; return(this); } else if (!mWaitContent) { if (oper.Identify != SitcomDefine.OPER_REFERENCE) { throw new SitcomCompileException(oper.keyword); } mRight = oper.keyword; return(this); } else if (mKey == null) { mKey = new KeyValue(); mKey.key = oper; oper.Parent = this; return(oper); } else if (mKey.useKey) { replaced = mKey.value; mKey.value = oper; oper.Parent = this; mKVs.Add(mKey); mKey = null; return(oper); } else { mKVs.Add(mKey); mKey = new KeyValue(); mKey.key = oper; oper.Parent = this; return(oper); } throw new SitcomCompileException(oper.keyword); }
public ISitcomOper GetOperator(SitcomFile.Keyword keyword) { if (keyword.type == KeywordType.Content) { return(mDefaultOper.Clone(keyword)); } var oper = GlobalUtil.Binsearch(mOperators, keyword.id); if (oper == null) { oper = mDefaultOper; } return(oper.Clone(keyword)); }
public override void AddContent(SitcomFile.Keyword keyword) { }
public abstract void AddContent(SitcomFile.Keyword keyword);
public abstract ISitcomOper Clone(SitcomFile.Keyword keyword);
public override ISitcomOper Clone(SitcomFile.Keyword keyword) { this.keyword = keyword; return(this); }
public override void AddContent(SitcomFile.Keyword keyword) { throw new SitcomCompileException(keyword); }