Added forgotten member of operator

This commit is contained in:
Kyler 2024-03-06 23:57:39 -07:00
parent e23888844b
commit 3034995a58
3 changed files with 4 additions and 0 deletions

View File

@ -336,6 +336,7 @@ Here are all operators and their types and names in order of operator precedence
| `++` | Unary (Prefix) | Prefix Increment *Operator* | | `++` | Unary (Prefix) | Prefix Increment *Operator* |
| `-` | Unary (Prefix) | Negate *Operator* | | `-` | Unary (Prefix) | Negate *Operator* |
| `!` | Unary (Prefix) | Boolean NOT *Operator* | | `!` | Unary (Prefix) | Boolean NOT *Operator* |
| `.` | Binary | Member of *Operator* |
| `>>` | Binary | Right Shift *Operator* | | `>>` | Binary | Right Shift *Operator* |
| `<<` | Binary | Left Shift *Operator* | | `<<` | Binary | Left Shift *Operator* |
| `^` | Binary | Bitwise XOR *Operator* | | `^` | Binary | Bitwise XOR *Operator* |

View File

@ -22,6 +22,7 @@ fn test_func(arg1: int, arg2: unsigned = 10) -> fixed {
} }
fn test_func2() -> Point { fn test_func2() -> Point {
Point.points;
test++; test++;
test--; test--;
--test; --test;

View File

@ -257,6 +257,7 @@ class BinaryOperatorEnum(Enum):
BitwiseXOR = "^" BitwiseXOR = "^"
LeftShift = "<<" LeftShift = "<<"
RightShift = ">>" RightShift = ">>"
MemberOf = "."
Assignment = "=" Assignment = "="
AdditionAssignment = "+=" AdditionAssignment = "+="
SubtractionAssignment = "-=" SubtractionAssignment = "-="
@ -375,6 +376,7 @@ _Operator_Precedence: tuple[
PrefixUnaryOperatorEnum.Increment, PrefixUnaryOperatorEnum.Increment,
PrefixUnaryOperatorEnum.Negate, PrefixUnaryOperatorEnum.Negate,
PrefixUnaryOperatorEnum.BooleanNOT, PrefixUnaryOperatorEnum.BooleanNOT,
BinaryOperatorEnum.MemberOf,
BinaryOperatorEnum.RightShift, BinaryOperatorEnum.RightShift,
BinaryOperatorEnum.LeftShift, BinaryOperatorEnum.LeftShift,
BinaryOperatorEnum.BitwiseXOR, BinaryOperatorEnum.BitwiseXOR,