Beispiel #1
0
        internal void Initialize(DIndentEngine engine, IndentState parent = null)
        {
            Parent = parent;
            Engine = engine;

            InitializeState();
        }
Beispiel #2
0
        /// <summary>
        ///     Creates a new indentation state that is a copy of the given
        ///     prototype.
        /// </summary>
        /// <param name="prototype">
        ///     The prototype state.
        /// </param>
        /// <param name="engine">
        ///     The engine of the new state.
        /// </param>
        protected IndentState(IndentState prototype, DIndentEngine engine)
        {
            Engine = engine;
            Parent = prototype.Parent != null?prototype.Parent.Clone(engine) : null;

            ThisLineIndent = prototype.ThisLineIndent.Clone();
            NextLineIndent = prototype.NextLineIndent.Clone();
        }
Beispiel #3
0
        public IStateMachineIndentEngine Clone()
        {
            var eng = new DIndentEngine();

            return(eng);
        }
Beispiel #4
0
 public abstract IndentState Clone(DIndentEngine engine);
Beispiel #5
0
		public IStateMachineIndentEngine Clone ()
		{
			var eng = new DIndentEngine ();

			return eng;
		}