diff --git a/src/LuauAST/types/operators.ts b/src/LuauAST/types/operators.ts index 74cc513..2958798 100644 --- a/src/LuauAST/types/operators.ts +++ b/src/LuauAST/types/operators.ts @@ -3,6 +3,7 @@ export type BinaryOperator = | "-" | "*" | "/" + | "//" | "^" | "%" | ".." @@ -17,4 +18,4 @@ export type BinaryOperator = export type UnaryOperator = "-" | "not" | "#"; -export type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "^=" | "..="; +export type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "//=" | "%=" | "^=" | "..="; diff --git a/src/LuauRenderer/util/needsParentheses.ts b/src/LuauRenderer/util/needsParentheses.ts index 5e9fb94..36d609a 100644 --- a/src/LuauRenderer/util/needsParentheses.ts +++ b/src/LuauRenderer/util/needsParentheses.ts @@ -35,6 +35,7 @@ const BINARY_OPERATOR_PRECEDENCE: { [K in luau.BinaryOperator]: number } = { "-": 5, "*": 6, "/": 6, + "//": 6, "%": 6, "^": 8, };