Comparing version 0.1.5 to 0.1.6
@@ -72,3 +72,3 @@ var util = require('./util') | ||
if (/\d/.test(c)) { | ||
last.push({ type: types.REFERENCE, value: parseInt(c) }); | ||
last.push({ type: types.REFERENCE, value: parseInt(c, 10) }); | ||
@@ -97,7 +97,8 @@ // escaped character | ||
// check if this class is 'anti' i.e. [^abc] | ||
var not; | ||
if (str[i] === '^') { | ||
var not = true; | ||
not = true; | ||
i++; | ||
} else { | ||
var not = false; | ||
not = false; | ||
} | ||
@@ -207,4 +208,4 @@ | ||
if (rs !== null) { | ||
min = parseInt(rs[1]) | ||
max = rs[2] ? rs[3] ? parseInt(rs[3]) : Infinity : min | ||
min = parseInt(rs[1], 10); | ||
max = rs[2] ? rs[3] ? parseInt(rs[3], 10) : Infinity : min; | ||
i += rs[0].length; | ||
@@ -211,0 +212,0 @@ |
@@ -1,2 +0,2 @@ | ||
var types = require('./types') | ||
var types = require('./types'); | ||
@@ -3,0 +3,0 @@ exports.wordBoundary = function() { |
@@ -46,3 +46,3 @@ var types = require('./types'); | ||
exports.words = function() { | ||
return { type: types.SET, set: WORDS() }; | ||
return { type: types.SET, set: WORDS(), not: false }; | ||
}; | ||
@@ -55,3 +55,3 @@ | ||
exports.ints = function() { | ||
return { type: types.SET, set: INTS() }; | ||
return { type: types.SET, set: INTS(), not: false }; | ||
}; | ||
@@ -64,3 +64,3 @@ | ||
exports.whitespace = function() { | ||
return { type: types.SET, set: WHITESPACE() }; | ||
return { type: types.SET, set: WHITESPACE(), not: false }; | ||
}; | ||
@@ -67,0 +67,0 @@ |
@@ -20,4 +20,4 @@ var types = require('./types') | ||
strToChars: function(str) { | ||
var chars_regex = /(\[\\b\])|\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]\^?])|([0tnvfr]))/g | ||
, str = str.replace(chars_regex, function(s, b, a16, b16, c8, dctrl, eslsh) { | ||
var chars_regex = /(\[\\b\])|\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]\^?])|([0tnvfr]))/g; | ||
str = str.replace(chars_regex, function(s, b, a16, b16, c8, dctrl, eslsh) { | ||
var code = b ? 8 : | ||
@@ -83,3 +83,3 @@ a16 ? parseInt(a16, 16) : | ||
, value: c.charCodeAt(0) | ||
}) | ||
}); | ||
@@ -86,0 +86,0 @@ } else { |
@@ -5,3 +5,3 @@ { | ||
"keywords": ["regex", "regexp", "regular expression", "parser", "tokenizer"], | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"repository": { | ||
@@ -19,5 +19,2 @@ "type": "git", | ||
}, | ||
"engines": { | ||
"node": "*" | ||
}, | ||
"devDependencies": { | ||
@@ -24,0 +21,0 @@ "vows": "0.5.x" |
Sorry, the diff of this file is not supported yet
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
16472
376