Make JS not mangle to snake_case (#14086)
This commit is contained in:
parent
123f9fb77a
commit
dff007f66d
1 changed files with 1 additions and 5 deletions
|
|
@ -238,11 +238,7 @@ proc mangleName(m: BModule, s: PSym): Rope =
|
||||||
while i < s.name.s.len:
|
while i < s.name.s.len:
|
||||||
let c = s.name.s[i]
|
let c = s.name.s[i]
|
||||||
case c
|
case c
|
||||||
of 'A'..'Z':
|
of 'A'..'Z', 'a'..'z', '_', '0'..'9':
|
||||||
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':
|
|
||||||
x.add c
|
x.add c
|
||||||
else:
|
else:
|
||||||
x.add("HEX" & toHex(ord(c), 2))
|
x.add("HEX" & toHex(ord(c), 2))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue