diff --git a/lib/impure/nre.nim b/lib/impure/nre.nim index f0b3074f9d..5129c210f2 100644 --- a/lib/impure/nre.nim +++ b/lib/impure/nre.nim @@ -6,6 +6,9 @@ # distribution, for details about the copyright. # +when defined(js): + {.error: "This library needs to be compiled with a c-like backend, and depends on PCRE.".} + ## What is NRE? ## ============ ## diff --git a/lib/impure/re.nim b/lib/impure/re.nim index 652a92d55d..af4cb71643 100644 --- a/lib/impure/re.nim +++ b/lib/impure/re.nim @@ -7,6 +7,9 @@ # distribution, for details about the copyright. # +when defined(js): + {.error: "This library needs to be compiled with a c-like backend, and depends on PCRE.".} + ## Regular expression support for Nim. ## ## This module is implemented by providing a wrapper around the @@ -665,4 +668,3 @@ when isMainModule: doAssert replace("bar", re"^", "foo") == "foobar" doAssert replace("foo", re"", "-") == "-foo" doAssert replace("foo", re"$", "bar") == "foobar" -