summary refs log tree commit diff stats
path: root/lib/js
diff options
context:
space:
mode:
authorMiran <narimiran@disroot.org>2020-07-24 21:15:20 +0200
committerGitHub <noreply@github.com>2020-07-24 21:15:20 +0200
commit4b93c61f0d783cbc1ce35d4494b533186595cdbd (patch)
tree55b5847214ab2656ac1e521c9b17c3020c1ea1e3 /lib/js
parent12a9fe017e4a49a161f5cabbbbcae0f5668b0ae3 (diff)
downloadNim-4b93c61f0d783cbc1ce35d4494b533186595cdbd.tar.gz
jsre: try to fix nightlies (#15057)
Diffstat (limited to 'lib/js')
-rw-r--r--lib/js/jsre.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/js/jsre.nim b/lib/js/jsre.nim
index 31cfa3d0b..b4f273d0b 100644
--- a/lib/js/jsre.nim
+++ b/lib/js/jsre.nim
@@ -1,6 +1,9 @@
 ## Regular Expressions for the JavaScript target.
 ## * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
 
+when not defined(js) and not defined(Nimdoc):
+  {.error: "This module only works on the JavaScript platform".}
+
 type RegExp* {.importjs.} = object    ## Regular Expressions for JavaScript target.
   flags* {.importjs.}: cstring        ## cstring that contains the flags of the RegExp object.
   dotAll* {.importjs.}: bool          ## Whether `.` matches newlines or not.