clarity-pattern-parser
Advanced tools
Comparing version 10.3.4 to 10.3.5
@@ -31,3 +31,4 @@ import { Node } from "../ast/Node"; | ||
get children(): Pattern[]; | ||
get unaryPatterns(): readonly Pattern[]; | ||
get unaryPrefixPatterns(): readonly Pattern[]; | ||
get atomPatterns(): readonly Pattern[]; | ||
get binaryPatterns(): readonly Pattern[]; | ||
@@ -34,0 +35,0 @@ get recursivePatterns(): readonly Pattern[]; |
{ | ||
"name": "clarity-pattern-parser", | ||
"version": "10.3.4", | ||
"version": "10.3.5", | ||
"description": "Parsing Library for Typescript and Javascript.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -65,3 +65,7 @@ import { Node } from "../ast/Node"; | ||
get unaryPatterns(): readonly Pattern[] { | ||
get unaryPrefixPatterns(): readonly Pattern[] { | ||
return this._unaryPrefixPatterns; | ||
} | ||
get atomPatterns(): readonly Pattern[] { | ||
return this._atomPatterns; | ||
@@ -118,3 +122,3 @@ } | ||
const unaryPrefix = this._extractUnaryPrefixPattern(pattern).clone(); | ||
this._unaryPrefixPatterns.push(pattern); | ||
this._unaryPrefixPatterns.push(unaryPrefix); | ||
this._unaryPrefixNames.push(pattern.name); | ||
@@ -555,7 +559,7 @@ unaryPrefix.parent = this; | ||
getTokens(): string[] { | ||
return this.unaryPatterns.map(p => p.getTokens()).flat(); | ||
return this.atomPatterns.map(p => p.getTokens()).flat(); | ||
} | ||
getTokensAfter(childReference: Pattern): string[] { | ||
if (this.unaryPatterns.indexOf(childReference)) { | ||
if (this.atomPatterns.indexOf(childReference)) { | ||
const recursiveTokens = this._recursivePatterns.map(p => p.getTokens()).flat(); | ||
@@ -594,7 +598,7 @@ const binaryTokens = this._binaryPatterns.map(p => p.getTokens()).flat(); | ||
getPatterns(): Pattern[] { | ||
return this.unaryPatterns.map(p => p.getPatterns()).flat(); | ||
return this.atomPatterns.map(p => p.getPatterns()).flat(); | ||
} | ||
getPatternsAfter(childReference: Pattern): Pattern[] { | ||
if (this.unaryPatterns.indexOf(childReference)) { | ||
if (this.atomPatterns.indexOf(childReference)) { | ||
const recursivePatterns = this._recursivePatterns.map(p => p.getPatterns()).flat(); | ||
@@ -601,0 +605,0 @@ const binaryPatterns = this._binaryPatterns.map(p => p.getPatterns()).flat(); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1286064
21981