🚀 add operator ^= &= |=

fix bug of parsing expressions beginning with floater
This commit is contained in:
ValKmjolnir
2023-02-28 00:30:27 +08:00
parent 461e5ac647
commit e11793d340
14 changed files with 214 additions and 104 deletions

View File

@@ -234,7 +234,7 @@ Bitwise operators `~` `|` `&` `^` have the same function as C/C++.
0x8^0x1; # xor
```
Operators `=` `+=` `-=` `*=` `/=` `~=` are used in assignment expressions.
Operators `=` `+=` `-=` `*=` `/=` `~=` `^=` `&=` `|=` are used in assignment expressions.
```javascript
a=b=c=d=1;
@@ -243,6 +243,10 @@ a-=1;
a*=1;
a/=1;
a~="string";
a^=0xff;
a&=0xca;
a|=0xba;
```
</details>