Skip to content

Commit 2ad7c7a

Browse files
committed
change arrow function precedence
1 parent 6dd73bb commit 2ad7c7a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/print/handlers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ const EXPRESSIONS_PRECEDENCE: Record<string, number> = {
153153
CallExpression: 19,
154154
NewExpression: 19,
155155
AwaitExpression: 17,
156-
ArrowFunctionExpression: 17,
157156
ClassExpression: 17,
158157
FunctionExpression: 17,
159158
ObjectExpression: 17,
@@ -162,6 +161,7 @@ const EXPRESSIONS_PRECEDENCE: Record<string, number> = {
162161
BinaryExpression: 14,
163162
LogicalExpression: 13,
164163
ConditionalExpression: 4,
164+
ArrowFunctionExpression: 3,
165165
AssignmentExpression: 3,
166166
YieldExpression: 2,
167167
RestElement: 1

test/samples/arrow-function-parenthesized/expected.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)