diff options
author | alon@honor <none@none> | 2010-08-28 18:38:30 -0700 |
---|---|---|
committer | alon@honor <none@none> | 2010-08-28 18:38:30 -0700 |
commit | 2e650b627c85712be4fde75146e1356e19da990d (patch) | |
tree | 6a9247dbdb41bf23e83cc2152fb4a1768e32eccd /src/parser.js | |
parent | 73732309f32e7d98885fd2acf2031751d5b1c81a (diff) |
parseNumerical on consts in structs ; fasta passes
Diffstat (limited to 'src/parser.js')
-rw-r--r-- | src/parser.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser.js b/src/parser.js index 42613cb4..3551c281 100644 --- a/src/parser.js +++ b/src/parser.js @@ -275,7 +275,7 @@ function IEEEUnHex(stringy) { } function parseNumerical(value, type) { - if ((type == 'double' || type == 'float') && value.substr(0,2) == '0x') { + if ((!type || type == 'double' || type == 'float') && value.substr(0,2) == '0x') { // Hexadecimal double value, as the llvm docs say, // "The one non-intuitive notation for constants is the hexadecimal form of floating point constants." return IEEEUnHex(value); @@ -1820,7 +1820,7 @@ function JSify(data) { } else if (segment[1].type == '{') { return '[' + handleSegments(segment[1].tokens) + ']'; } else if (segment.length == 2) { - return toNiceIdent(segment[1].text); + return parseNumerical(toNiceIdent(segment[1].text)); } else { //print('// seggg: ' + JSON.stringify(segment) + '???!???\n') return '???!???'; |