Permalink
Browse files

fix break statements

  • Loading branch information...
1 parent 87b600c commit a67ef30e0ef416061a754081128cdb776e78e0c1 @chjj chjj committed Oct 17, 2011
Showing with 15 additions and 0 deletions.
  1. +15 −0 lib/json.js
View
@@ -154,6 +154,7 @@ Parser.prototype._parse = function(data) {
}
break;
}
+ break;
}
case 'number': {
switch (ch) {
@@ -207,6 +208,7 @@ Parser.prototype._parse = function(data) {
}
break;
}
+ break;
}
case 'string': {
switch (ch) {
@@ -222,6 +224,7 @@ Parser.prototype._parse = function(data) {
this.value += ch;
break;
}
+ break;
}
case 'escape': {
switch (ch) {
@@ -260,6 +263,7 @@ Parser.prototype._parse = function(data) {
} else {
this.state = 'string';
}
+ break;
}
case 'unicode': {
switch (ch) {
@@ -284,49 +288,60 @@ Parser.prototype._parse = function(data) {
default:
return this._expect(ch);
}
+ break;
}
case 'n': {
this._expect(ch, 'u');
this.state = 'nu';
+ break;
}
case 'nu': {
this._expect(ch, 'l');
this.state = 'nul';
+ break;
}
case 'nul': {
this._expect(ch, 'l');
this.emit('null', null);
this.state = 'value';
+ break;
}
case 'f': {
this._expect(ch, 'a');
this.state = 'fa';
+ break;
}
case 'fa': {
this._expect(ch, 'l');
this.state = 'fal';
+ break;
}
case 'fal': {
this._expect(ch, 's');
this.state = 'fals';
+ break;
}
case 'fals': {
this._expect(ch, 'e');
this.emit('boolean', false);
this.state = 'value';
+ break;
}
case 't': {
this._expect(ch, 'r');
this.state = 'tr';
+ break;
}
case 'tr': {
this._expect(ch, 'u');
this.state = 'tru';
+ break;
}
case 'tru': {
this._expect(ch, 'e');
this.emit('boolean', true);
this.state = 'value';
+ break;
}
}
}

0 comments on commit a67ef30

Please sign in to comment.