Comparing version 0.10.0 to 0.11.0
@@ -327,3 +327,3 @@ ;(function (clarinet) { | ||
error(parser, "Unexpected end"); | ||
closeValue(parser); | ||
@@ -379,5 +379,5 @@ parser.c = ""; | ||
emit(parser, 'onopenobject'); | ||
this.depth++; | ||
this.depth++; | ||
emit(parser, 'oncloseobject'); | ||
this.depth--; | ||
this.depth--; | ||
parser.state = parser.stack.pop() || S.VALUE; | ||
@@ -403,4 +403,4 @@ continue; | ||
} else if (c==='}') { | ||
emitNode(parser, 'oncloseobject'); | ||
this.depth--; | ||
emitNode(parser, 'oncloseobject'); | ||
this.depth--; | ||
parser.state = parser.stack.pop() || S.VALUE; | ||
@@ -424,3 +424,3 @@ } else if(c===',') { | ||
emit(parser, 'onclosearray'); | ||
this.depth--; | ||
this.depth--; | ||
parser.state = parser.stack.pop() || S.VALUE; | ||
@@ -456,3 +456,3 @@ continue; | ||
emitNode(parser, 'onclosearray'); | ||
this.depth--; | ||
this.depth--; | ||
parser.state = parser.stack.pop() || S.VALUE; | ||
@@ -478,2 +478,3 @@ } else if (c === '\r' || c === '\n' || c === ' ' || c === '\t') | ||
c = chunk.charAt(i++); | ||
parser.position++; | ||
if (unicodeI === 4) { | ||
@@ -493,2 +494,3 @@ // TODO this might be slow? well, probably not used too often anyway | ||
parser.textNode += chunk.substring(starti, i-1); | ||
parser.position += i - 1 - starti; | ||
if(!parser.textNode) { | ||
@@ -502,3 +504,5 @@ emit(parser, "onvalue", ""); | ||
parser.textNode += chunk.substring(starti, i-1); | ||
parser.position += i - 1 - starti; | ||
c = chunk.charAt(i++); | ||
parser.position++; | ||
if (!c) break; | ||
@@ -521,2 +525,3 @@ } | ||
c = chunk.charAt(i++); | ||
parser.position++; | ||
starti = i-1; | ||
@@ -532,2 +537,3 @@ if (!c) break; | ||
parser.textNode += chunk.substring(starti, i-1); | ||
parser.position += i - 1 - starti; | ||
break; | ||
@@ -539,2 +545,3 @@ } | ||
parser.textNode += chunk.substring(starti, i-1); | ||
parser.position += i - 1 - starti; | ||
break; | ||
@@ -541,0 +548,0 @@ } |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"main": "./clarinet.js", | ||
@@ -41,3 +41,3 @@ "homepage": "https://github.com/dscape/clarinet", | ||
"scripts": { | ||
"test": "./node_modules/mocha/bin/mocha -r should -t 10000 -s 2000 test/clarinet.js test/npm.js test/utf8-chunks.js" | ||
"test": "./node_modules/mocha/bin/mocha -r should -t 10000 -s 2000 test/clarinet.js test/npm.js test/utf8-chunks.js test/position.js" | ||
}, | ||
@@ -44,0 +44,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39450185
51
7865
17