regexp-to-ast
Advanced tools
Comparing version 0.2.0 to 0.2.2
export as namespace regexpToAst | ||
export const VERSION: number | ||
export class RegExpParser { | ||
@@ -4,0 +6,0 @@ pattern: (input: string) => RegExpAst |
@@ -0,1 +1,10 @@ | ||
## 0.2.2 (2018-4-10) | ||
- VERSION constant exported. | ||
## 0.2.1 (2018-4-10) | ||
- Fixed class atoms to allow syntax characters (?, +, *, ...). | ||
- Fixed regular atoms to allow closing curly and square brackets. | ||
## 0.2.0 (2018-4-7) | ||
@@ -2,0 +11,0 @@ |
@@ -378,3 +378,3 @@ ;(function(root, factory) { | ||
RegExpParser.prototype.patternCharacterAtom = function() { | ||
RegExpParser.prototype.classPatternCharacterAtom = function() { | ||
switch (this.peekChar()) { | ||
@@ -390,29 +390,5 @@ // istanbul ignore next | ||
// istanbul ignore next | ||
case "^": | ||
// istanbul ignore next | ||
case "$": | ||
// istanbul ignore next | ||
case "\\": | ||
// istanbul ignore next | ||
case ".": | ||
// istanbul ignore next | ||
case "*": | ||
// istanbul ignore next | ||
case "+": | ||
// istanbul ignore next | ||
case "?": | ||
// istanbul ignore next | ||
case "(": | ||
// istanbul ignore next | ||
case ")": | ||
// istanbul ignore next | ||
case "[": | ||
// istanbul ignore next | ||
case "]": | ||
// istanbul ignore next | ||
case "{": | ||
// istanbul ignore next | ||
case "}": | ||
// istanbul ignore next | ||
case "|": | ||
throw Error("TBD") | ||
@@ -485,3 +461,3 @@ default: | ||
default: | ||
return this.patternCharacterAtom() | ||
return this.classPatternCharacterAtom() | ||
} | ||
@@ -597,9 +573,7 @@ } | ||
case "[": | ||
// TODO: can be literal atom | ||
// istanbul ignore next | ||
case "]": | ||
// istanbul ignore next | ||
case "{": | ||
// TODO: can be literal atom | ||
// istanbul ignore next | ||
case "}": | ||
// istanbul ignore next | ||
case "|": | ||
@@ -720,5 +694,5 @@ // istanbul ignore next | ||
case "[": | ||
case "]": | ||
// TODO: can be interperted literally | ||
case "{": | ||
case "}": | ||
// TODO: can be interperted literally | ||
case "|": | ||
@@ -879,5 +853,6 @@ case "/": | ||
return { | ||
RegExpParser: RegExpParser | ||
RegExpParser: RegExpParser, | ||
VERSION: "0.2.2" | ||
} | ||
} | ||
) |
{ | ||
"name": "regexp-to-ast", | ||
"version": "0.2.0", | ||
"version": "0.2.2", | ||
"main": "lib/parser.js", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/bd82/regexp-to-ast.git", |
@@ -0,1 +1,2 @@ | ||
[![npm version](https://badge.fury.io/js/regexp-to-ast.svg)](https://badge.fury.io/js/regexp-to-ast) | ||
[![CircleCI](https://circleci.com/gh/bd82/regexp-to-ast.svg?style=svg)](https://circleci.com/gh/bd82/regexp-to-ast) | ||
@@ -43,2 +44,4 @@ [![Coverage Status](https://coveralls.io/repos/github/bd82/regexp-to-ast/badge.svg?branch=master)](https://coveralls.io/github/bd82/regexp-to-ast?branch=master) | ||
* Use polyFill for [string.prototype.at](https://github.com/mathiasbynens/String.prototype.at) | ||
to support unicode characters outside BMP. | ||
* Descriptive error messages. | ||
@@ -45,0 +48,0 @@ * Position information in error messages. |
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
51
32936
830