about summary refs log tree commit diff stats
path: root/src/js
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-06-03 20:28:57 +0200
committerbptato <nincsnevem662@gmail.com>2024-06-03 20:28:57 +0200
commit5acbab703ba074e20dbc0ce729d9f57f467901e0 (patch)
tree6796b11781a681c647d6eb0f15b44f92530238ef /src/js
parentc906166374d0ce921b2c49d60b41288424414a47 (diff)
downloadchawan-5acbab703ba074e20dbc0ce729d9f57f467901e0.tar.gz
js: change jsstfunc syntax
Interface:function -> Interface.function

for consistency with regular JS syntax
Diffstat (limited to 'src/js')
-rw-r--r--src/js/javascript.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/javascript.nim b/src/js/javascript.nim
index 39330361..cdf6b127 100644
--- a/src/js/javascript.nim
+++ b/src/js/javascript.nim
@@ -850,7 +850,7 @@ func getFuncName(fun: NimNode; jsname, staticName: string): string =
   if jsname != "":
     return jsname
   if staticName != "":
-    let i = staticName.find(':')
+    let i = staticName.find('.')
     if i != -1:
       return staticName.substr(i + 1)
   let x = $fun[0]
@@ -934,7 +934,7 @@ proc initGenerator(fun: NimNode; t: BoundFunctionType; thisname = some("this");
   if staticName == "":
     gen.addThisName(thisname)
   else:
-    gen.thisType = staticName.until(':')
+    gen.thisType = staticName.until('.')
     gen.newName = ident($gen.t & "_" & gen.funcName)
   return gen