Skip to content

Commit 70019fa

Browse files
committed
Remove irrelevant code
1 parent d4a0ccb commit 70019fa

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

jscomp/main/jsoo_playground_main.ml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,6 @@ end
115115
exception RescriptParsingErrors of locErrInfo list
116116

117117
module ErrorRet = struct
118-
type err =
119-
| SyntaxErr of locErrInfo array
120-
| TypecheckErr of locErrInfo array
121-
| WarningFlagErr of string * string (* warning, warning_error flags *)
122-
| WarningErrs of LocWarnInfo.t array
123-
| UnexpectedErr of string
124-
125118
let locErrorAttributes ~(type_: string) ~(fullMsg: string) ~(shortMsg: string) (loc: Location.t) =
126119
let (_file,line,startchar) = Location.get_pos_info loc.Location.loc_start in
127120
let (_file,endline,endchar) = Location.get_pos_info loc.Location.loc_end in
@@ -226,16 +219,6 @@ let lexbuf_from_string ~filename str =
226219
lexbuf.lex_curr_p <- { lexbuf.lex_curr_p with pos_fname = filename };
227220
lexbuf
228221

229-
(* We need this for a specific parsing issue in Reason: Whenever you are
230-
* parsing a source where the last line is a comment (and not a \n) the parser
231-
* enters an infinite loop. To prevent this, we need to make sure to append a
232-
* newline before doing any parsing attempt *)
233-
let maybe_add_newline str =
234-
let last = (String.length str) - 1 in
235-
match String.get str last with
236-
| '\n' -> str
237-
| _ -> str ^ "\n"
238-
239222
let ocaml_parse ~filename str =
240223
lexbuf_from_string ~filename str |> Parse.implementation
241224

@@ -410,7 +393,6 @@ module Compile = struct
410393
let collectTypeHints typed_tree =
411394
let open Typedtree in
412395
let createTypeHintObj loc kind hint =
413-
let open Lexing in
414396
let open Location in
415397
let (_ , startline, startcol) = Location.get_pos_info loc.loc_start in
416398
let (_ , endline, endcol) = Location.get_pos_info loc.loc_end in
@@ -531,7 +513,6 @@ module Compile = struct
531513
| _ -> handle_err e;;
532514

533515
let syntax_format ?(filename: string option) ~(from:Lang.t) ~(to_:Lang.t) (src: string) =
534-
let open Lang in
535516
let filename = get_filename ~lang:from filename in
536517
try
537518
let code = match (from, to_) with
@@ -691,7 +672,6 @@ module Export = struct
691672
end
692673

693674
let () =
694-
let open Lang in
695675
export "rescript_compiler"
696676
(Js.Unsafe.(obj
697677
[|

0 commit comments

Comments
 (0)