clarity-pattern-parser 11.0.8 → 11.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3669,9 +3669,9 @@ class Grammar {
3669
3669
  _saveConfigurableAnonymous(node) {
3670
3670
  const nameNode = node.find(n => n.name === "name");
3671
3671
  const name = nameNode.value;
3672
- const anonymousNode = node.find(n => n.name === "complex-anonymous-pattern");
3672
+ const anonymousNode = node.find(n => n.name === "configurable-anonymous-pattern");
3673
3673
  const isOptional = node.children[1] != null;
3674
- const anonymous = isOptional ? new Optional(name, this._buildPattern(anonymousNode)) : this._buildPattern(anonymousNode);
3674
+ const anonymous = isOptional ? new Optional(name, this._buildPattern(anonymousNode.children[0])) : this._buildPattern(anonymousNode.children[0]);
3675
3675
  this._parseContext.patternsByName.set(name, anonymous);
3676
3676
  }
3677
3677
  _buildComplexAnonymousPattern(node) {