示例#1
0
文件: Ast.cs 项目: rytmis/Escape
 public UpdateExpression(UpdateOperator op, Expression argument, bool prefix, Location location = null) :
     base(SyntaxNodeType.UpdateExpression, location)
 {
     if (!FastEnumValidator <UpdateOperator> .IsDefined((int)op))
     {
         throw new ArgumentOutOfRangeException("op");
     }
     if (argument == null)
     {
         throw new ArgumentNullException("argument");
     }
     Operator = op;
     Argument = argument;
     Prefix   = prefix;
 }
示例#2
0
文件: Ast.cs 项目: rytmis/Escape
 public AssignmentExpression(AssignmentOperator op, Expression left, Expression right, Location location = null) :
     base(SyntaxNodeType.AssignmentExpression, location)
 {
     if (!FastEnumValidator <AssignmentOperator> .IsDefined((int)op))
     {
         throw new ArgumentOutOfRangeException("op");
     }
     if (left == null)
     {
         throw new ArgumentNullException("left");
     }
     if (right == null)
     {
         throw new ArgumentNullException("right");
     }
     Operator = op;
     Left     = left;
     Right    = right;
 }
示例#3
0
文件: Ast.cs 项目: rytmis/Escape
 public Property(PropertyKind kind, IPropertyKeyExpression key, Expression value, Location location = null) :
     base(SyntaxNodeType.Property, location)
 {
     if (!FastEnumValidator <PropertyKind> .IsDefined((int)kind))
     {
         throw new ArgumentOutOfRangeException("kind");
     }
     if (key == null)
     {
         throw new ArgumentNullException("key");
     }
     if (value == null)
     {
         throw new ArgumentNullException("value");
     }
     Value = value;
     Key   = key;
     Kind  = kind;
 }