Comparing version 0.1.4 to 0.1.5
@@ -47,3 +47,3 @@ var types = require('./types') | ||
var tokens = [] | ||
, regexp = /\\(?:(w)|(d)|(s)|(W)|(D)|(S)|(.))|(.-[^\]])|(\])|(.)/g | ||
, regexp = /\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?(.)/g | ||
, rs, c | ||
@@ -72,4 +72,11 @@ ; | ||
} else if (c = rs[7] || rs[10]) { | ||
} else if (rs[7]) { | ||
tokens.push({ | ||
type: types.RANGE | ||
, from: (rs[8] || rs[9]).charCodeAt(0) | ||
, to: rs[10].charCodeAt(0) | ||
}); | ||
} else if (c = rs[12]) { | ||
tokens.push({ | ||
type: types.CHAR | ||
@@ -79,9 +86,2 @@ , value: c.charCodeAt(0) | ||
} else if (c = rs[8]) { | ||
tokens.push({ | ||
type: types.RANGE | ||
, from: c.charCodeAt(0) | ||
, to: c.charCodeAt(2) | ||
}); | ||
} else { | ||
@@ -88,0 +88,0 @@ return [tokens, regexp.lastIndex]; |
@@ -5,3 +5,3 @@ { | ||
"keywords": ["regex", "regexp", "regular expression", "parser", "tokenizer"], | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
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
16450
10
375