Skip to content

Commit 28a0123

Browse files
authored
Remove deprecated %external extension (#8376)
* Remove deprecated %external extension * CHANGELOG
1 parent d0d1a8f commit 28a0123

4 files changed

Lines changed: 1 addition & 24 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
- Support for `break` and `continue` in loops. `break` and `continue` are new keywords. https://github.com/rescript-lang/rescript/pull/8348
1818
- Fix iterator / iterable typedefs, add generator typedefs. https://github.com/rescript-lang/rescript/pull/8355
19+
- Remove deprecated %external extension. https://github.com/rescript-lang/rescript/pull/8376
1920

2021
#### :eyeglasses: Spec Compliance
2122

compiler/frontend/ast_exp_extension.ml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,6 @@ let handle_extension e (self : Bs_ast_mapper.mapper)
6161
Exp.constraint_ ~loc
6262
(Ast_exp_handle_external.handle_raw ~kind:Raw_re loc payload)
6363
(Ast_comb.to_regexp_type loc)
64-
| "external" -> (
65-
Location.deprecated loc
66-
"%external is deprecated, use %raw or regular FFI syntax instead.";
67-
match Ast_payload.as_ident payload with
68-
| Some {txt = Lident x} -> Ast_exp_handle_external.handle_external loc x
69-
| None | Some _ ->
70-
Location.raise_errorf ~loc "external expects a single identifier")
7164
| "debugger" ->
7265
{e with pexp_desc = Ast_exp_handle_external.handle_debugger loc payload}
7366
| "obj" -> (

tests/tests/src/ExternalExtension.mjs

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/tests/src/ExternalExtension.res

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)