clarity-pattern-parser
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -1839,18 +1839,20 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
parse(cursor) { | ||
const pattern = this.getPattern(); | ||
if (this.pattern == null) { | ||
const pattern = this.getPattern(); | ||
if (pattern == null) { | ||
cursor.throwError( | ||
new _ParseError_js__WEBPACK_IMPORTED_MODULE_1__["default"]( | ||
`Couldn't find parent pattern to recursively parse, with the name ${this.name}.` | ||
), | ||
cursor.index, | ||
this | ||
); | ||
return null; | ||
if (pattern == null) { | ||
cursor.throwError( | ||
new _ParseError_js__WEBPACK_IMPORTED_MODULE_1__["default"]( | ||
`Couldn't find parent pattern to recursively parse, with the name ${this.name}.` | ||
), | ||
cursor.index, | ||
this | ||
); | ||
return null; | ||
} | ||
this.pattern = pattern.clone(); | ||
this.pattern.parent = this; | ||
} | ||
this.pattern = pattern.clone(); | ||
this.pattern.parent = this; | ||
return this.pattern.parse(cursor); | ||
@@ -1857,0 +1859,0 @@ } |
@@ -68,11 +68,14 @@ "use strict"; | ||
value: function parse(cursor) { | ||
var pattern = this.getPattern(); | ||
if (this.pattern == null) { | ||
var pattern = this.getPattern(); | ||
if (pattern == null) { | ||
cursor.throwError(new _ParseError.default("Couldn't find parent pattern to recursively parse, with the name ".concat(this.name, ".")), cursor.index, this); | ||
return null; | ||
if (pattern == null) { | ||
cursor.throwError(new _ParseError.default("Couldn't find parent pattern to recursively parse, with the name ".concat(this.name, ".")), cursor.index, this); | ||
return null; | ||
} | ||
this.pattern = pattern.clone(); | ||
this.pattern.parent = this; | ||
} | ||
this.pattern = pattern.clone(); | ||
this.pattern.parent = this; | ||
return this.pattern.parse(cursor); | ||
@@ -79,0 +82,0 @@ } |
{ | ||
"name": "clarity-pattern-parser", | ||
"type": "module", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "", | ||
@@ -6,0 +6,0 @@ "main": "./lib/index.js", |
@@ -27,18 +27,20 @@ import Pattern from "./Pattern.js"; | ||
parse(cursor) { | ||
const pattern = this.getPattern(); | ||
if (this.pattern == null) { | ||
const pattern = this.getPattern(); | ||
if (pattern == null) { | ||
cursor.throwError( | ||
new ParserError( | ||
`Couldn't find parent pattern to recursively parse, with the name ${this.name}.` | ||
), | ||
cursor.index, | ||
this | ||
); | ||
return null; | ||
if (pattern == null) { | ||
cursor.throwError( | ||
new ParserError( | ||
`Couldn't find parent pattern to recursively parse, with the name ${this.name}.` | ||
), | ||
cursor.index, | ||
this | ||
); | ||
return null; | ||
} | ||
this.pattern = pattern.clone(); | ||
this.pattern.parent = this; | ||
} | ||
this.pattern = pattern.clone(); | ||
this.pattern.parent = this; | ||
return this.pattern.parse(cursor); | ||
@@ -45,0 +47,0 @@ } |
Sorry, the diff of this file is not supported yet
426519
6842