Пример #1
0
 public override void AcceptEvaluator(RCToken token)
 {
     FinishValue(true);
     MakeExpression();
     // When this applies there is no actual opening bracket defining the block.
     // This happens in the shell.
     // I call it an "implied" block.
     if (_block == null)
     {
         _block = RCBlock.Empty;
     }
     FinishBlock();
     if (_maybeOperator != null)
     {
         // _maybeOp is not an operator, its a variable.
         _variable      = _maybeOperator;
         _maybeOperator = null;
     }
     if (_variable == null)
     {
         // It is an unnamed block.
         _variable = "";
     }
     // If anything was left over on the right, it doesn't belong here.
     // Should this be an invalid state for the parser?
     _result    = null;
     _evaluator = RCEvaluator.For(token.Text);
 }
Пример #2
0
 public RCBlock(RCBlock previous, string name, string instr, RCValue val)
     : this(previous, name, RCEvaluator.For(instr), val)
 {
 }
Пример #3
0
 public RCBlock(RCBlock previous, string name, string instr, params RCSymbolScalar[] val)
     : this(previous, name, RCEvaluator.For(instr), new RCSymbol(val))
 {
 }
Пример #4
0
 public RCBlock(RCBlock previous, string name, string instr, params bool[] val)
     : this(previous, name, RCEvaluator.For(instr), new RCBoolean(val))
 {
 }
Пример #5
0
 public RCBlock(RCBlock previous, string name, string instr, params decimal[] val)
     : this(previous, name, RCEvaluator.For(instr), new RCDecimal(val))
 {
 }
Пример #6
0
 public RCBlock(RCBlock previous, string name, string instr, params long[] val)
     : this(previous, name, RCEvaluator.For(instr), new RCLong(val))
 {
 }