Make codegen for 1 and similar valid
This commit is contained in:
parent
bdb2d21f27
commit
a568c6102f
3 changed files with 25 additions and 55 deletions
|
|
@ -136,18 +136,6 @@ proc mapType(typ: PType): TJSTypeKind =
|
|||
of tyProc: result = etyProc
|
||||
of tyCString: result = etyString
|
||||
|
||||
proc mangle(name: string): string =
|
||||
result = ""
|
||||
for i in countup(0, len(name) - 1):
|
||||
case name[i]
|
||||
of 'A'..'Z':
|
||||
add(result, chr(ord(name[i]) - ord('A') + ord('a')))
|
||||
of '_':
|
||||
discard
|
||||
of 'a'..'z', '0'..'9':
|
||||
add(result, name[i])
|
||||
else: add(result, 'X' & toHex(ord(name[i]), 2))
|
||||
|
||||
proc mangleName(s: PSym): PRope =
|
||||
result = s.loc.r
|
||||
if result == nil:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue