php codegen: name mangling bugfix
This commit is contained in:
parent
983f6d53ca
commit
6d2fd0c9f1
1 changed files with 3 additions and 2 deletions
|
|
@ -192,8 +192,9 @@ proc mangleName(s: PSym; target: TTarget): Rope =
|
|||
x.add("HEX" & toHex(ord(c), 2))
|
||||
inc i
|
||||
result = rope(x)
|
||||
add(result, "_")
|
||||
add(result, rope(s.id))
|
||||
if s.name.s != "this":
|
||||
add(result, "_")
|
||||
add(result, rope(s.id))
|
||||
s.loc.r = result
|
||||
|
||||
proc escapeJSString(s: string): string =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue