-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Remove preprinter, add parenthesizer callback to emit #43652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6785,6 +6785,8 @@ namespace ts { | |
|
||
/* @internal */ | ||
export interface ParenthesizerRules { | ||
getParenthesizeLeftSideOfBinaryForOperator(binaryOperator: SyntaxKind): (leftSide: Expression) => Expression; | ||
getParenthesizeRightSideOfBinaryForOperator(binaryOperator: SyntaxKind): (rightSide: Expression) => Expression; | ||
Comment on lines
+6788
to
+6789
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are new, and exist to support passing in a |
||
parenthesizeLeftSideOfBinary(binaryOperator: SyntaxKind, leftSide: Expression): Expression; | ||
parenthesizeRightSideOfBinary(binaryOperator: SyntaxKind, leftSide: Expression | undefined, rightSide: Expression): Expression; | ||
parenthesizeExpressionOfComputedPropertyName(expression: Expression): Expression; | ||
|
@@ -6798,6 +6800,7 @@ namespace ts { | |
parenthesizeExpressionsOfCommaDelimitedList(elements: readonly Expression[]): NodeArray<Expression>; | ||
parenthesizeExpressionForDisallowedComma(expression: Expression): Expression; | ||
parenthesizeExpressionOfExpressionStatement(expression: Expression): Expression; | ||
parenthesizeConciseBodyOfArrowFunction(body: Expression): Expression; | ||
parenthesizeConciseBodyOfArrowFunction(body: ConciseBody): ConciseBody; | ||
parenthesizeMemberOfConditionalType(member: TypeNode): TypeNode; | ||
parenthesizeMemberOfElementType(member: TypeNode): TypeNode; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,4 +161,6 @@ var _brokenTree = (0, renderer_1.dom)(component_1.MySFC, { x: 1, y: 2 }, | |
(0, renderer_1.dom)(component_1.MyClass, { x: 3, y: 4 }), | ||
(0, renderer_1.dom)(component_1.MyClass, { x: 5, y: 6 })); | ||
// Should fail, nondom isn't allowed as children of dom | ||
var _brokenTree2 = (0, renderer_1.dom)(DOMSFC, { x: 1, y: 2 }, component_1.tree, component_1.tree); | ||
var _brokenTree2 = (0, renderer_1.dom)(DOMSFC, { x: 1, y: 2 }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This indentation matches the emit in |
||
component_1.tree, | ||
component_1.tree); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is simply a reordering of existing properties to match the order in
transformNodes
so they (hopefully) share the same "map" in V8.