Document mangling

This commit is contained in:
flaviut 2014-05-26 10:44:14 -04:00
commit 85e6e2a240
2 changed files with 5 additions and 1 deletions

View file

@ -162,6 +162,9 @@ proc makeSingleLineCString*(s: string): string =
result.add('\"')
proc mangle*(name: string): string =
## Lowercases the given name and manges any non-alphanumeric characters
## so they are represented as `HEX____`. If the name starts with a number,
## `N` is prepended
result = ""
case name[0]
of Letters: