mirror of
https://github.com/Noratrieb/uwucc.git
synced 2026-01-16 17:45:11 +01:00
some more binops
This commit is contained in:
parent
94229110cc
commit
d90e21e06c
3 changed files with 65 additions and 7 deletions
|
|
@ -29,11 +29,38 @@ pub enum UnaryOp {
|
|||
}
|
||||
|
||||
#[derive(Debug, DebugPls)]
|
||||
pub enum BinaryOp {
|
||||
pub enum ArithOpKind {
|
||||
Mul,
|
||||
Div,
|
||||
Mod,
|
||||
Add,
|
||||
Sub,
|
||||
Shl,
|
||||
Shr,
|
||||
BitAnd,
|
||||
BitXor,
|
||||
BitOr,
|
||||
}
|
||||
|
||||
#[derive(Debug, DebugPls)]
|
||||
pub enum ComparisonKind {
|
||||
Lt,
|
||||
Gt,
|
||||
LtEq,
|
||||
GtEq,
|
||||
Eq,
|
||||
Neq,
|
||||
}
|
||||
|
||||
#[derive(Debug, DebugPls)]
|
||||
pub enum BinaryOp {
|
||||
Arith(ArithOpKind),
|
||||
LogicalAnd,
|
||||
LogicalOr,
|
||||
Comparison(ComparisonKind),
|
||||
Comma,
|
||||
Index, // lhs[rhs]
|
||||
Assign(Option<ArithOpKind>),
|
||||
}
|
||||
|
||||
#[derive(Debug, DebugPls)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue