From 86966578d7d7f126b6bdc3d4535388c7a811176d Mon Sep 17 00:00:00 2001 From: Robert Borghese <28355157+SomeRanDev@users.noreply.github.com> Date: Fri, 29 Nov 2024 10:58:12 -0500 Subject: [PATCH] Add `TypedExprHelper.wrapParenthesis` --- src/reflaxe/helpers/TypedExprHelper.hx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/reflaxe/helpers/TypedExprHelper.hx b/src/reflaxe/helpers/TypedExprHelper.hx index ad2e633..44121c8 100644 --- a/src/reflaxe/helpers/TypedExprHelper.hx +++ b/src/reflaxe/helpers/TypedExprHelper.hx @@ -51,6 +51,10 @@ class TypedExprHelper { } } + public static function wrapParenthesis(expr: TypedExpr): TypedExpr { + return { expr: TParenthesis(expr), pos: expr.pos, t: expr.t }; + } + public static function unwrapBlock(expr: TypedExpr): Array { return switch(expr.expr) { case TBlock(exprList): exprList;