summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorhlaaftana <10591326+hlaaftana@users.noreply.github.com>2020-04-24 10:19:54 +0300
committerGitHub <noreply@github.com>2020-04-24 09:19:54 +0200
commitdff007f66df8b8cf9f04d03a56dd071a1abbf015 (patch)
tree94e4bbb23b7be2f35b95bd9cae023317203cd33e /compiler
parent123f9fb77a188202b16eab023987458f4bc3809a (diff)
downloadNim-dff007f66df8b8cf9f04d03a56dd071a1abbf015.tar.gz
Make JS not mangle to snake_case (#14086)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/jsgen.nim6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index eabc8306d..2461443cd 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -238,11 +238,7 @@ proc mangleName(m: BModule, s: PSym): Rope =
       while i < s.name.s.len:
         let c = s.name.s[i]
         case c
-        of 'A'..'Z':
-          if i > 0 and s.name.s[i-1] in {'a'..'z'}:
-            x.add '_'
-          x.add(chr(c.ord - 'A'.ord + 'a'.ord))
-        of 'a'..'z', '_', '0'..'9':
+        of 'A'..'Z', 'a'..'z', '_', '0'..'9':
           x.add c
         else:
           x.add("HEX" & toHex(ord(c), 2))