@@ -16,49 +16,6 @@ type callbackStyle =
1616 *)
1717 | ArgumentsFitOnOneLine
1818
19- (* Since compiler version 8.3, the bs. prefix is no longer needed *)
20- (* Synced from
21- https://github.com/rescript-lang/rescript-compiler/blob/29174de1a5fde3b16cf05d10f5ac109cfac5c4ca/jscomp/frontend/ast_external_process.ml#L291-L367 *)
22- let convertBsExternalAttribute = function
23- | "bs.as" -> " as"
24- | "bs.deriving" -> " deriving"
25- | "bs.get" -> " get"
26- | "bs.get_index" -> " get_index"
27- | "bs.ignore" -> " ignore"
28- | "bs.inline" -> " inline"
29- | "bs.int" -> " int"
30- | "bs.meth" -> " meth"
31- | "bs.module" -> " module"
32- | "bs.new" -> " new"
33- | "bs.obj" -> " obj"
34- | "bs.optional" -> " optional"
35- | "bs.return" -> " return"
36- | "bs.send" -> " send"
37- | "bs.scope" -> " scope"
38- | "bs.set" -> " set"
39- | "bs.set_index" -> " set_index"
40- | "bs.splice" | "bs.variadic" -> " variadic"
41- | "bs.string" -> " string"
42- | "bs.this" -> " this"
43- | "bs.uncurry" -> " uncurry"
44- | "bs.unwrap" -> " unwrap"
45- | "bs.val" -> " val"
46- (* bs.send.pipe shouldn't be transformed *)
47- | txt -> txt
48-
49- (* These haven't been needed for a long time now *)
50- (* Synced from
51- https://github.com/rescript-lang/rescript-compiler/blob/29174de1a5fde3b16cf05d10f5ac109cfac5c4ca/jscomp/frontend/ast_exp_extension.ml *)
52- let convertBsExtension = function
53- | "bs.debugger" -> " debugger"
54- | "bs.external" -> " raw"
55- (* We should never see this one since we use the sugared object form, but still *)
56- | "bs.obj" -> " obj"
57- | "bs.raw" -> " raw"
58- | "bs.re" -> " re"
59- (* TODO: what about bs.time and bs.node? *)
60- | txt -> txt
61-
6219let addParens doc =
6320 Doc. group
6421 (Doc. concat
@@ -2154,7 +2111,7 @@ and printPackageConstraint ~state i cmtTbl (longidentLoc, typ) =
21542111 ]
21552112
21562113and printExtension ~state ~atModuleLvl (stringLoc , payload ) cmtTbl =
2157- let txt = convertBsExtension stringLoc.Location. txt in
2114+ let txt = stringLoc.Location. txt in
21582115 let extName =
21592116 let doc =
21602117 Doc. concat
@@ -5466,7 +5423,7 @@ and printAttribute ?(standalone = false) ~state
54665423 (Doc. concat
54675424 [
54685425 Doc. text (if standalone then " @@" else " @" );
5469- Doc. text (convertBsExternalAttribute id.txt) ;
5426+ Doc. text id.txt;
54705427 printPayload ~state payload cmtTbl;
54715428 ]),
54725429 Doc. line )
0 commit comments