mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-16 15:25:38 +00:00
internal: prepare a dedicated module for all operators
This commit is contained in:
parent
beca92b245
commit
faa420fc32
3 changed files with 40 additions and 28 deletions
17
crates/syntax/src/ast/operators.rs
Normal file
17
crates/syntax/src/ast/operators.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
|
||||
pub enum PrefixOp {
|
||||
/// The `*` operator for dereferencing
|
||||
Deref,
|
||||
/// The `!` operator for logical inversion
|
||||
Not,
|
||||
/// The `-` operator for negation
|
||||
Neg,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
|
||||
pub enum RangeOp {
|
||||
/// `..`
|
||||
Exclusive,
|
||||
/// `..=`
|
||||
Inclusive,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue