Skip to content

Commit

Permalink
Break things for fun
Browse files Browse the repository at this point in the history
  • Loading branch information
osyrisrblx committed Oct 5, 2023
1 parent 1e0d903 commit a30496e
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,5 @@ import luau from "LuauAST";
import { render, RenderState } from "LuauRenderer";

export function renderParenthesizedExpression(state: RenderState, node: luau.ParenthesizedExpression) {
// skip nested parentheses
let expression = node.expression;
while (luau.isParenthesizedExpression(expression)) {
expression = expression.expression;
}
if (luau.isSimple(expression)) {
return render(state, node.expression);
} else {
return `(${render(state, node.expression)})`;
}
return render(state, node.expression);
}

0 comments on commit a30496e

Please sign in to comment.