Separate op-assignment with other function calls.

This commit is contained in:
Stephen Chung
2021-02-25 10:59:22 +08:00
parent 49e5382ab0
commit 9495d3f733
4 changed files with 13 additions and 13 deletions

View File

@@ -1657,14 +1657,6 @@ pub fn is_valid_identifier(name: impl Iterator<Item = char>) -> bool {
first_alphabetic
}
/// Is a text string an assignment operator?
pub fn is_assignment_operator(op: &str) -> bool {
match op {
"+=" | "-=" | "*=" | "/=" | "<<=" | ">>=" | "&=" | "|=" | "^=" | "%=" | "**=" => true,
_ => false,
}
}
/// Is a character valid to start an identifier?
#[cfg(feature = "unicode-xid-ident")]
#[inline(always)]