Comparing version 0.1.0 to 0.1.1
@@ -47,3 +47,3 @@ var types = require('./types') | ||
var tokens = [] | ||
, regexp = /\\(?:(w)|(d)|(s)|(.))|(\.)|(.-.)|(\])|(.)/g | ||
, regexp = /\\(?:(w)|(d)|(s)|(.))|(.-[^\]])|(\])|(.)/g | ||
, rs, c | ||
@@ -63,3 +63,3 @@ ; | ||
} else if (c = rs[4] || rs[8]) { | ||
} else if (c = rs[4] || rs[7]) { | ||
tokens.push({ | ||
@@ -70,6 +70,3 @@ type: types.CHAR | ||
} else if (rs[5]) { | ||
tokens.push(classes.anyChar()); | ||
} else if (c = rs[6]) { | ||
} else if (c = rs[5]) { | ||
tokens.push({ | ||
@@ -76,0 +73,0 @@ type: types.RANGE |
@@ -5,3 +5,3 @@ { | ||
"keywords": ["regex", "regexp", "regular expression", "parser", "tokenizer"], | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -30,3 +30,3 @@ var vows = require('vows') | ||
topic: function() { | ||
return util.tokenizeClass('\\w\\d$\\s\\]\\B.] will ignore'); | ||
return util.tokenizeClass('\\w\\d$\\s\\]\\B.+-] will ignore'); | ||
}, | ||
@@ -56,5 +56,7 @@ | ||
'Get an any character class token': function(t) { | ||
'Get correct char tokens at end of class': function(t) { | ||
assert.isArray(t[0]); | ||
assert.deepEqual(t[0][6], classes.anyChar()); | ||
assert.deepEqual(t[0][6], { type: types.CHAR, value: 46 }); | ||
assert.deepEqual(t[0][7], { type: types.CHAR, value: 43 }); | ||
assert.deepEqual(t[0][8], { type: types.CHAR, value: 45 }); | ||
}, | ||
@@ -64,3 +66,3 @@ | ||
assert.isNumber(t[1]); | ||
assert.equal(t[1], 13); | ||
assert.equal(t[1], 15); | ||
} | ||
@@ -67,0 +69,0 @@ }, |
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
34443