You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.0 KiB
C#
47 lines
1.0 KiB
C#
1 year ago
|
namespace Unity.VisualScripting.Dependencies.NCalc
|
||
|
{
|
||
|
public class BinaryExpression : LogicalExpression
|
||
|
{
|
||
|
public BinaryExpression(BinaryExpressionType type, LogicalExpression leftExpression, LogicalExpression rightExpression)
|
||
|
{
|
||
|
Type = type;
|
||
|
LeftExpression = leftExpression;
|
||
|
RightExpression = rightExpression;
|
||
|
}
|
||
|
|
||
|
public LogicalExpression LeftExpression { get; set; }
|
||
|
|
||
|
public LogicalExpression RightExpression { get; set; }
|
||
|
|
||
|
public BinaryExpressionType Type { get; set; }
|
||
|
|
||
|
public override void Accept(LogicalExpressionVisitor visitor)
|
||
|
{
|
||
|
visitor.Visit(this);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public enum BinaryExpressionType
|
||
|
{
|
||
|
And,
|
||
|
Or,
|
||
|
NotEqual,
|
||
|
LesserOrEqual,
|
||
|
GreaterOrEqual,
|
||
|
Lesser,
|
||
|
Greater,
|
||
|
Equal,
|
||
|
Minus,
|
||
|
Plus,
|
||
|
Modulo,
|
||
|
Div,
|
||
|
Times,
|
||
|
BitwiseOr,
|
||
|
BitwiseAnd,
|
||
|
BitwiseXOr,
|
||
|
LeftShift,
|
||
|
RightShift,
|
||
|
Unknown
|
||
|
}
|
||
|
}
|