clarity-pattern-parser
Advanced tools
Comparing version 11.0.25 to 11.0.26
{ | ||
"name": "clarity-pattern-parser", | ||
"version": "11.0.25", | ||
"version": "11.0.26", | ||
"description": "Parsing Library for Typescript and Javascript.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -541,5 +541,13 @@ import { Node } from "../ast/Node"; | ||
const name = nameNode.value; | ||
const alias = this._getPattern(aliasName).clone(name); | ||
const aliasPattern = this._getPattern(aliasName); | ||
// This solves the problem for an alias pointing to a reference. | ||
if (aliasPattern.type === "reference"){ | ||
const sequence = new Sequence(name, [aliasPattern]); | ||
this._parseContext.patternsByName.set(name, sequence); | ||
} else { | ||
const alias = aliasPattern.clone(name); | ||
this._parseContext.patternsByName.set(name, alias); | ||
} | ||
this._parseContext.patternsByName.set(name, alias); | ||
} | ||
@@ -546,0 +554,0 @@ |
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
1348481
23475