예제 #1
0
 public override void Execute
 (
     PftContext context
 )
 {
     context.Write
     (
         this,
         Text
     );
 }
예제 #2
0
        // ReSharper restore UnusedParameter.Local

        #endregion

        #region Private members

        #endregion

        #region Public methods

        #endregion

        #region PftAst members

        public override void Execute
        (
            PftContext context
        )
        {
            OnBeforeExecution(context);

            context.Write
            (
                this,
                Environment.NewLine
            );

            OnAfterExecution(context);
        }
예제 #3
0
 private void _Printer
 (
     PftContext context,
     PftNode node,
     PftNode[] arguments
 )
 {
     for (int i = 0; i < arguments.Length; i++)
     {
         string text = context.GetStringArgument(arguments, i);
         if (!string.IsNullOrEmpty(text))
         {
             context.Write(node, text);
         }
     }
 }
예제 #4
0
        public override void Execute
        (
            PftContext context
        )
        {
            OnBeforeExecution(context);

            if (Shift > 0)
            {
                context.Write
                (
                    this,
                    new string(' ', Shift)
                );
            }

            OnAfterExecution(context);
        }
예제 #5
0
        public override void Execute
        (
            PftContext context
        )
        {
            OnBeforeExecution(context);

            string     argument = context.Evaluate(Children);
            NumberText text     = new NumberText(argument);
            string     result   = text.Increment().ToString();

            context.Write
            (
                this,
                result
            );

            OnAfterExecution(context);
        }
예제 #6
0
        public override void Execute
        (
            PftContext context
        )
        {
            OnBeforeExecution(context);

            int desired = NewPosition * 8;
            int current = context.Output.GetCaretPosition();
            int delta   = desired - current;

            if (delta > 0)
            {
                context.Write
                (
                    this,
                    new string(' ', delta)
                );
            }

            OnAfterExecution(context);
        }