@@ -65592,6 +65592,7 @@ val fuseAll: ?loc:Ast_helper.loc -> t -> item
6559265592
6559365593val constraint_ : ?loc:Ast_helper.loc -> t -> Ast_signature.t -> item
6559465594
65595+ val dummy_item : Location.t -> item
6559565596end = struct
6559665597#1 "ast_structure.ml"
6559765598(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
@@ -65648,6 +65649,8 @@ let constraint_ ?(loc=Location.none) (stru : t) (sign : Ast_signature.t) =
6564865649 (Incl.mk ~loc
6564965650 (Mod.constraint_ ~loc (Mod.structure ~loc stru) (Mty.signature ~loc sign)))
6565065651
65652+ let dummy_item loc : item =
65653+ Str.eval ~loc (Ast_literal.val_unit ~loc ())
6565165654end
6565265655module Ast_derive : sig
6565365656#1 "ast_derive.mli"
@@ -112560,6 +112563,15 @@ let rec unsafe_mapper : Bs_ast_mapper.mapper =
112560112563 | Pstr_extension ( ({txt = ("bs.raw"| "raw") ; loc}, payload), _attrs)
112561112564 ->
112562112565 Ast_util.handle_raw_structure loc payload
112566+ | Pstr_extension (({txt = ("bs.debugger.chrome" | "debugger.chrome") ;loc}, payload),_)
112567+ ->
112568+ if !Js_config.debug then
112569+ let open Ast_helper in
112570+ Str.eval ~loc (Exp.apply ~loc
112571+ (Exp.ident ~loc {txt = Ldot(Ldot (Lident"Belt","Debug"), "setupChromeDebugger");loc} )
112572+ ["", Ast_literal.val_unit ~loc ()]
112573+ )
112574+ else Ast_structure.dummy_item loc
112563112575 | Pstr_type (_ :: _ as tdcls ) (* [ {ptype_attributes} as tdcl ] *)->
112564112576 Ast_tdcls.handleTdclsInStru self str tdcls
112565112577 | Pstr_primitive prim
@@ -117127,7 +117139,7 @@ let out_ident ppf s =
117127117139 | "Belt_HashMap" -> "Belt.HashMap"
117128117140 | "Belt_HashMapString" -> "Belt.HashMap.String"
117129117141 | "Belt_HashMapInt" -> "Belt.HashMap.Int"
117130-
117142+ | "Belt_Debug" -> "Belt.Debug"
117131117143 | s ->
117132117144 (match Ext_namespace.try_split_module_name s with
117133117145 | None -> s
@@ -119811,7 +119823,10 @@ let buckle_script_flags : (string * Arg.spec * string) list =
119811119823 )
119812119824 ::
119813119825 ("-bs-g",
119814- Arg.Set Js_config.debug,
119826+ Arg.Unit
119827+ (fun _ -> Js_config.debug := true;
119828+ Lexer.replace_directive_bool "DEBUG" true
119829+ ),
119815119830 " debug mode"
119816119831 )
119817119832 ::
0 commit comments