Example #1
0
 public virtual void Visit(JsUnaryOperator node)
 {
     if (node != null)
     {
         if (node.Operand != null)
         {
             node.Operand.Accept(this);
         }
     }
 }
 public virtual void Visit(JsUnaryOperator node)
 {
     if (node != null)
     {
         if (node.Operand != null)
         {
             node.Operand.Accept(this);
         }
     }
 }
Example #3
0
 public static JsUnaryExpression Unary(JsUnaryOperator @operator, JsExpression operand)
 {
     return(new JsUnaryExpression(@operator, operand));
 }
Example #4
0
 public JsUnaryExpression(JsUnaryOperator @operator, JsExpression operand)
 {
     Operator = @operator;
     Operand  = operand;
 }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JsUnaryExpression"/> class.
 /// </summary>
 /// <param name="operator">The operator.</param>
 /// <param name="argument">The argument.</param>
 /// <exception cref="ServiceStack.Script.SyntaxErrorException">Operator missing in Unary Expression</exception>
 /// <exception cref="ServiceStack.Script.SyntaxErrorException">Argument missing in Unary Expression</exception>
 public JsUnaryExpression(JsUnaryOperator @operator, JsToken argument)
 {
     Operator = @operator ?? throw new SyntaxErrorException("Operator missing in Unary Expression");
     Argument = argument ?? throw new SyntaxErrorException("Argument missing in Unary Expression");
 }
Example #6
0
 public JsUnaryExpression(JsUnaryOperator op, JsToken target)
 {
     Op     = op;
     Target = target;
 }