Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit b655806

Browse files
mununkicristianoc
authored andcommitted
helper fn to raise error with loc
1 parent 4512506 commit b655806

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cli/reactjs_jsx_ppx.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,9 +1510,10 @@ module V4 = struct
15101510
let fullModuleName = String.concat "$" fullModuleName in
15111511
fullModuleName
15121512

1513+
let raiseError ~loc msg = Location.raise_errorf ~loc msg
1514+
15131515
let raiseErrorMultipleReactComponent ~loc =
1514-
Location.raise_errorf ~loc
1515-
"Each module should have one react component at most"
1516+
raiseError ~loc "Each module should have one react component at most"
15161517

15171518
(*
15181519
AST node builders

0 commit comments

Comments
 (0)