Skip to content

Commit 1bb09f1

Browse files
committed
clean up super errors in syntax
1 parent c646742 commit 1bb09f1

File tree

107 files changed

+356
-3840
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+356
-3840
lines changed

jscomp/build_tests/super_errors/expected/syntaxErrors1.res.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Syntax error!
2+
We've found a bug for you!
33
/.../fixtures/syntaxErrors1.res:1:12
44

55
1 │ let b = fo;;;;;;;;;;;;;;;;

jscomp/build_tests/super_errors/expected/syntaxErrors2.res.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Syntax error!
2+
We've found a bug for you!
33
/.../fixtures/syntaxErrors2.res:2:6-10
44

55
1 │ let () =

jscomp/build_tests/super_errors/expected/syntaxErrors3.res.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Syntax error!
2+
We've found a bug for you!
33
/.../fixtures/syntaxErrors3.res:1:20
44

55
1 │ let a = print_char('a)

jscomp/build_tests/super_errors/expected/syntaxErrors5.res.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Syntax error!
2+
We've found a bug for you!
33
/.../fixtures/syntaxErrors5.res:1:14-2:0
44

55
1 │ let a = (1, 2

jscomp/ml/typecore.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4046,9 +4046,6 @@ let report_error env ppf = function
40464046
type_expr typ
40474047
40484048
4049-
let super_report_error_no_wrap_printing_env = report_error
4050-
4051-
40524049
let report_error env ppf err =
40534050
wrap_printing_env env (fun () -> report_error env ppf err)
40544051

jscomp/ml/typecore.mli

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,6 @@ exception Error of Location.t * Env.t * error
115115
exception Error_forward of Location.error
116116

117117

118-
val super_report_error_no_wrap_printing_env: Env.t -> formatter -> error -> unit
119-
120-
121118
val report_error: Env.t -> formatter -> error -> unit
122119
(* Deprecated. Use Location.{error_of_exn, report_error}. *)
123120

jscomp/ml/typemod.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,9 +1917,6 @@ let report_error ppf = function
19171917
path p
19181918

19191919

1920-
let super_report_error_no_wrap_printing_env = report_error
1921-
1922-
19231920
let report_error env ppf err =
19241921
Printtyp.wrap_printing_env env (fun () -> report_error ppf err)
19251922

jscomp/ml/typemod.mli

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ exception Error of Location.t * Env.t * error
8181
exception Error_forward of Location.error
8282

8383

84-
val super_report_error_no_wrap_printing_env: formatter -> error -> unit
85-
86-
8784
val report_error: Env.t -> formatter -> error -> unit
8885

8986

jscomp/syntax/cli/res_cli.ml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,11 @@ module CliArgProcessor = struct
275275
Color.setup None;
276276
if processInterface then
277277
let parseResult = backend.parseInterface ~forPrinter ~filename in
278-
if parseResult.invalid then (
279-
backend.stringOfDiagnostics ~source:parseResult.source
280-
~filename:parseResult.filename parseResult.diagnostics;
278+
if parseResult.invalid then
281279
if recover then
282280
printEngine.printInterface ~width ~filename
283281
~comments:parseResult.comments parseResult.parsetree
284-
else exit 1)
282+
else exit 1
285283
else
286284
let parsetree =
287285
Reactjs_jsx_ppx.rewrite_signature ~jsxVersion ~jsxModule ~jsxMode
@@ -291,13 +289,11 @@ module CliArgProcessor = struct
291289
~comments:parseResult.comments parsetree
292290
else
293291
let parseResult = backend.parseImplementation ~forPrinter ~filename in
294-
if parseResult.invalid then (
295-
backend.stringOfDiagnostics ~source:parseResult.source
296-
~filename:parseResult.filename parseResult.diagnostics;
292+
if parseResult.invalid then
297293
if recover then
298294
printEngine.printImplementation ~width ~filename
299295
~comments:parseResult.comments parseResult.parsetree
300-
else exit 1)
296+
else exit 1
301297
else
302298
let parsetree =
303299
Reactjs_jsx_ppx.rewrite_implementation ~jsxVersion ~jsxModule ~jsxMode

0 commit comments

Comments
 (0)