コード例 #1
0
ファイル: QuipCompiler.cs プロジェクト: Blecki/conv-compiler
        public void BeginQuip(String ID, String Name, QuipType Type, bool Repeatable, bool Restrictive)
        {
            OpenQuip = new Quip();
            if (!String.IsNullOrEmpty(ID))
            {
                if (Quips.ContainsKey(ID)) Quips[ID] = OpenQuip;
                else Quips.Add(ID, OpenQuip);
            }
            AllQuips.Add(OpenQuip);
            OpenQuip.Name = Name;
            OpenQuip.Type = Type;
            OpenQuip.Repeatable = Repeatable;
            OpenQuip.Restrictive = Restrictive;
            OpenQuip.ID = NextGeneratedID;

            if (BlockStateStack.Count > 0)
               foreach (var state in BlockStateStack)
                    state.ApplyState(OpenQuip);
        }
コード例 #2
0
ファイル: QuipCompiler.cs プロジェクト: Blecki/conv-compiler
 internal override void ApplyState(Quip to)
 {
     if (to.Supplies == null) to.Supplies = new List<string>();
     to.Supplies.AddRange(supplies);
 }
コード例 #3
0
ファイル: QuipCompiler.cs プロジェクト: Blecki/conv-compiler
 internal override void ApplyState(Quip to)
 {
     to.Directly = null; //Override any directly-following going on.
     /*if (to.Follows == null)*/ to.Follows = new List<Quip>();
     to.Follows.AddRange(follows);
 }
コード例 #4
0
ファイル: QuipCompiler.cs プロジェクト: Blecki/conv-compiler
 internal override void ApplyState(Quip to)
 {
     to.Follows = null; //Override any indirectly-following going on.
     to.Directly = new List<Quip>();
     to.Directly.AddRange(directly);
 }
コード例 #5
0
ファイル: QuipCompiler.cs プロジェクト: Blecki/conv-compiler
 internal virtual void ApplyState(Quip to)
 {
     throw new NotImplementedException();
 }
コード例 #6
0
ファイル: QuipCompiler.cs プロジェクト: Blecki/conv-compiler
 public void EndBlock()
 {
     if (BlockStateStack.Count > 0)
     {
         OpenQuip = BlockStateStack[BlockStateStack.Count - 1].SavedOpenQuip;
         BlockStateStack.RemoveAt(BlockStateStack.Count - 1);
     }
 }