Skip to content

Commit ca876de

Browse files
committed
No need to copy syntax changelog anymore.
1 parent e87d6b5 commit ca876de

File tree

5 files changed

+39
-101
lines changed

5 files changed

+39
-101
lines changed

jscomp/napkin/CHANGELOG.md

Lines changed: 0 additions & 97 deletions
This file was deleted.

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52168,6 +52168,8 @@ val arrowReturnTypExpr : Parsetree.core_type -> bool
5216852168

5216952169
val patternRecordRowRhs : Parsetree.pattern -> bool
5217052170

52171+
val exprRecordRowRhs : Parsetree.expression -> kind
52172+
5217152173
end = struct
5217252174
#1 "res_parens.ml"
5217352175
module ParsetreeViewer = Res_parsetree_viewer
@@ -52187,6 +52189,16 @@ let expr expr =
5218752189
| {pexp_desc = Pexp_constraint _} -> Parenthesized
5218852190
| _ -> Nothing)
5218952191

52192+
let exprRecordRowRhs e =
52193+
let kind = expr e in
52194+
match kind with
52195+
| Nothing when Res_parsetree_viewer.hasOptionalAttribute e.pexp_attributes
52196+
-> (
52197+
match e.pexp_desc with
52198+
| Pexp_ifthenelse _ | Pexp_fun _ -> Parenthesized
52199+
| _ -> kind)
52200+
| _ -> kind
52201+
5219052202
let callExpr expr =
5219152203
let optBraces, _ = ParsetreeViewer.processBracesAttr expr in
5219252204
match optBraces with
@@ -58261,7 +58273,7 @@ and printExpressionRecordRow ~customLayout (lbl, expr) cmtTbl punningAllowed =
5826158273
Doc.text ": ";
5826258274
printOptionalLabel expr.pexp_attributes;
5826358275
(let doc = printExpressionWithComments ~customLayout expr cmtTbl in
58264-
match Parens.expr expr with
58276+
match Parens.exprRecordRowRhs expr with
5826558277
| Parens.Parenthesized -> addParens doc
5826658278
| Braced braces -> printBraces doc expr braces
5826758279
| Nothing -> doc);

lib/4.06.1/unstable/js_playground_compiler.ml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52168,6 +52168,8 @@ val arrowReturnTypExpr : Parsetree.core_type -> bool
5216852168

5216952169
val patternRecordRowRhs : Parsetree.pattern -> bool
5217052170

52171+
val exprRecordRowRhs : Parsetree.expression -> kind
52172+
5217152173
end = struct
5217252174
#1 "res_parens.ml"
5217352175
module ParsetreeViewer = Res_parsetree_viewer
@@ -52187,6 +52189,16 @@ let expr expr =
5218752189
| {pexp_desc = Pexp_constraint _} -> Parenthesized
5218852190
| _ -> Nothing)
5218952191

52192+
let exprRecordRowRhs e =
52193+
let kind = expr e in
52194+
match kind with
52195+
| Nothing when Res_parsetree_viewer.hasOptionalAttribute e.pexp_attributes
52196+
-> (
52197+
match e.pexp_desc with
52198+
| Pexp_ifthenelse _ | Pexp_fun _ -> Parenthesized
52199+
| _ -> kind)
52200+
| _ -> kind
52201+
5219052202
let callExpr expr =
5219152203
let optBraces, _ = ParsetreeViewer.processBracesAttr expr in
5219252204
match optBraces with
@@ -58261,7 +58273,7 @@ and printExpressionRecordRow ~customLayout (lbl, expr) cmtTbl punningAllowed =
5826158273
Doc.text ": ";
5826258274
printOptionalLabel expr.pexp_attributes;
5826358275
(let doc = printExpressionWithComments ~customLayout expr cmtTbl in
58264-
match Parens.expr expr with
58276+
match Parens.exprRecordRowRhs expr with
5826558277
| Parens.Parenthesized -> addParens doc
5826658278
| Braced braces -> printBraces doc expr braces
5826758279
| Nothing -> doc);

lib/4.06.1/whole_compiler.ml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228030,6 +228030,8 @@ val arrowReturnTypExpr : Parsetree.core_type -> bool
228030228030

228031228031
val patternRecordRowRhs : Parsetree.pattern -> bool
228032228032

228033+
val exprRecordRowRhs : Parsetree.expression -> kind
228034+
228033228035
end = struct
228034228036
#1 "res_parens.ml"
228035228037
module ParsetreeViewer = Res_parsetree_viewer
@@ -228049,6 +228051,16 @@ let expr expr =
228049228051
| {pexp_desc = Pexp_constraint _} -> Parenthesized
228050228052
| _ -> Nothing)
228051228053

228054+
let exprRecordRowRhs e =
228055+
let kind = expr e in
228056+
match kind with
228057+
| Nothing when Res_parsetree_viewer.hasOptionalAttribute e.pexp_attributes
228058+
-> (
228059+
match e.pexp_desc with
228060+
| Pexp_ifthenelse _ | Pexp_fun _ -> Parenthesized
228061+
| _ -> kind)
228062+
| _ -> kind
228063+
228052228064
let callExpr expr =
228053228065
let optBraces, _ = ParsetreeViewer.processBracesAttr expr in
228054228066
match optBraces with
@@ -234123,7 +234135,7 @@ and printExpressionRecordRow ~customLayout (lbl, expr) cmtTbl punningAllowed =
234123234135
Doc.text ": ";
234124234136
printOptionalLabel expr.pexp_attributes;
234125234137
(let doc = printExpressionWithComments ~customLayout expr cmtTbl in
234126-
match Parens.expr expr with
234138+
match Parens.exprRecordRowRhs expr with
234127234139
| Parens.Parenthesized -> addParens doc
234128234140
| Braced braces -> printBraces doc expr braces
234129234141
| Nothing -> doc);

scripts/ninja.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1569,7 +1569,6 @@ rule copy
15691569
description = $in -> $out
15701570
${buildNapkinFiles}
15711571
${buildNapkinCliFiles}
1572-
o napkin/CHANGELOG.md : copy ../res_syntax/CHANGELOG.md
15731572
`;
15741573
var cppoNinjaFile = "cppoVendor.ninja";
15751574
writeFileSync(path.join(jscompDir, cppoNinjaFile), cppoNative);

0 commit comments

Comments
 (0)