aboutsummaryrefslogtreecommitdiff
path: root/src/parseTools.js
diff options
context:
space:
mode:
authorAlon Zakai <azakai@mozilla.com>2010-11-16 23:04:47 -0800
committerAlon Zakai <azakai@mozilla.com>2010-11-16 23:04:47 -0800
commit6ce73a0bd1f8a1c6b2edf4b2f3d5eca64bcf3544 (patch)
tree0af531fd964b15e0bbab1646f33680fca1784bfb /src/parseTools.js
parent776fde26f5f6fc68082513c22d392038379773a8 (diff)
differentiate llvm variables from functions in niceIdents
Diffstat (limited to 'src/parseTools.js')
-rw-r--r--src/parseTools.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index 1901b3fc..d2e3655f 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -56,7 +56,7 @@ function toNiceIdent(ident) {
assert(ident);
if (parseFloat(ident) == ident) return ident;
if (ident == 'null') return '0'; // see parseNumerical
- return ident.replace(/["\\ \.@%:<>,\*\[\]-]/g, '_');
+ return ident.replace('%', '$').replace(/["\\ \.@:<>,\*\[\]-]/g, '_');
}
function isStructPointerType(type) {
@@ -255,7 +255,7 @@ function parseParamTokens(params) {
intertype: 'value',
type: segment[0].text,
value: null,
- ident: '_' + absIndex,
+ ident: toNiceIdent('%') + absIndex,
});
}
} else if (segment[1].text in PARSABLE_LLVM_FUNCTIONS) {