Skip to content

Commit f78b2c2

Browse files
krendelhoff2rinderknecht
authored andcommitted
[#1997] Make #import directive ignored
1 parent e6f3520 commit f78b2c2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/ligo_preprocessor/LowAPI.mll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ module Make (Config : Config.S) (Options : Options.S) =
329329
else callback state lexbuf
330330

331331
(* Scanning #import directives *)
332-
332+
(*
333333
let import_action ~callback hash_pos state lexbuf =
334334
match Directive.scan_import hash_pos state lexbuf with
335335
Error (region, error) -> fail state region error
@@ -362,6 +362,7 @@ let import_action ~callback hash_pos state lexbuf =
362362
identical to the original #import. *)
363363
let () = state#copy_nl lexbuf
364364
in callback state lexbuf
365+
*)
365366

366367
(* Scanning #if directives *)
367368

@@ -601,8 +602,9 @@ rule scan state = parse
601602
match id with
602603
"include" ->
603604
include_action ~callback:scan region#start state lexbuf
604-
| "import" ->
605-
import_action ~callback:scan region#start state lexbuf
605+
(* NOTE: import directive is deprecated *)
606+
(* | "import" ->
607+
import_action ~callback:scan region#start state lexbuf *)
606608
| "define" ->
607609
define_action ~callback:scan region#start state lexbuf
608610
| "undef" ->

0 commit comments

Comments
 (0)