Implement augmented assignment operators
Add support for +=, -=, *=, and /= operators. This is basically just
syntactic sugar, but it's still nice to have
a += 1
compiles to the equivalent of
a = a + 1
with all the same implications of scoping rules.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -21,6 +21,12 @@ pub enum TokenKind {
|
||||
Star,
|
||||
Slash,
|
||||
|
||||
// Augmented assignment operators
|
||||
PlusEq,
|
||||
MinusEq,
|
||||
StarEq,
|
||||
SlashEq,
|
||||
|
||||
// Unary operators (not already covered)
|
||||
Bang,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user