@@ -16,49 +16,6 @@ type callbackStyle =
16
16
*)
17
17
| ArgumentsFitOnOneLine
18
18
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
-
62
19
let addParens doc =
63
20
Doc. group
64
21
(Doc. concat
@@ -2154,7 +2111,7 @@ and printPackageConstraint ~state i cmtTbl (longidentLoc, typ) =
2154
2111
]
2155
2112
2156
2113
and printExtension ~state ~atModuleLvl (stringLoc , payload ) cmtTbl =
2157
- let txt = convertBsExtension stringLoc.Location. txt in
2114
+ let txt = stringLoc.Location. txt in
2158
2115
let extName =
2159
2116
let doc =
2160
2117
Doc. concat
@@ -5466,7 +5423,7 @@ and printAttribute ?(standalone = false) ~state
5466
5423
(Doc. concat
5467
5424
[
5468
5425
Doc. text (if standalone then " @@" else " @" );
5469
- Doc. text (convertBsExternalAttribute id.txt) ;
5426
+ Doc. text id.txt;
5470
5427
printPayload ~state payload cmtTbl;
5471
5428
]),
5472
5429
Doc. line )
0 commit comments