Browse files

Merge pull request #4 from papandreou/master

Fixed parsing of number literals in exponential notation with a sign before the exponent
  • Loading branch information...
2 parents 12ee5ea + 62ee947 commit e2e6ca8dc2a74571655a28258e91b04da7b9d145 @creationix committed Aug 10, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 jsonparse.js
  2. +1 −1 samplejson/basic.json
View
2 jsonparse.js
@@ -235,7 +235,7 @@ proto.write = function (buffer) {
n = buffer[i];
if (n >= 0x30 && n < 0x40) { // 0-9
this.exponent = this.exponent * 10 + (n - 0x30);
- this.state = NUMBER8;
+ this.tState = NUMBER8;
}
else { this.charError(buffer, i); }
break;
View
2 samplejson/basic.json
@@ -3,7 +3,7 @@
},
{
"image": [
- {"shape": "rect", "fill": "#333", "stroke": "#999", "x": 0.5, "y": 0.5, "width": 47, "height": 47}
+ {"shape": "rect", "fill": "#333", "stroke": "#999", "x": 0.5e+1, "y": 0.5, "z": 0.8e-0, "w": 0.5e5, "u": 2E10, "foo": 2E+1, "bar": 2E-0, "width": 47, "height": 47}
],
"jumpable": 3,
"solid": {

0 comments on commit e2e6ca8

Please sign in to comment.