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

            InitializeState();
        }
Exemple #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();
        }
Exemple #3
0
        public IStateMachineIndentEngine Clone()
        {
            var eng = new DIndentEngine();

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

			return eng;
		}