summary refs log tree commit diff stats
path: root/lib/js/jsffi.nim
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2019-09-20 20:26:30 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-09-20 20:26:30 +0200
commit38ab51c44572b78845fa62b0c0a597a46a63ad28 (patch)
treedf3a7ffa585c333fcbe65a3f49c18bbd5d6c5e88 /lib/js/jsffi.nim
parent7bc5bf83345a0ebaef3dca9395f0bc7d285ba61e (diff)
downloadNim-38ab51c44572b78845fa62b0c0a597a46a63ad28.tar.gz
importjs symbol (#12218)
* importjs symbol
* importjs warning message, minor warning fixes
Diffstat (limited to 'lib/js/jsffi.nim')
-rw-r--r--lib/js/jsffi.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/js/jsffi.nim b/lib/js/jsffi.nim
index 7f01ad77a..c1b835ee9 100644
--- a/lib/js/jsffi.nim
+++ b/lib/js/jsffi.nim
@@ -292,8 +292,8 @@ macro `.()`*(obj: JsObject,
       {.importcpp: `importString`, gensym, discardable.}
     helper(`obj`)
   for idx in 0 ..< args.len:
-    let paramName = newIdentNode(!("param" & $idx))
-    result[0][3].add newIdentDefs(paramName, newIdentNode(!"JsObject"))
+    let paramName = newIdentNode("param" & $idx)
+    result[0][3].add newIdentDefs(paramName, newIdentNode("JsObject"))
     result[1].add args[idx].copyNimTree
 
 macro `.`*[K: cstring, V](obj: JsAssoc[K, V],
@@ -425,7 +425,7 @@ macro `{}`*(typ: typedesc, xs: varargs[untyped]): auto =
   ##  # This generates roughly the same JavaScript as:
   ##  {.emit: "var obj = {a: 1, k: "foo", d: 42};".}
   ##
-  let a = !"a"
+  let a = ident"a"
   var body = quote do:
     var `a` {.noinit.}: `typ`
     {.emit: "`a` = {};".}
@@ -488,7 +488,7 @@ macro bindMethod*(procedure: typed): auto =
     error("Argument has to be a proc or a symbol corresponding to a proc.")
   var
     rawProc = if procedure.kind == nnkSym:
-        getImpl(procedure.symbol)
+        getImpl(procedure)
       else:
         procedure
     args = rawProc[3]