Exemplo n.º 1
0
 public override void Execute
 (
     PftContext context
 )
 {
     context.Write
     (
         this,
         Text
     );
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
         }
     }
 }
Exemplo n.º 4
0
        public override void Execute
        (
            PftContext context
        )
        {
            OnBeforeExecution(context);

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

            OnAfterExecution(context);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }