Repair nested-binder-patterns
This commit is contained in:
parent
44d7d16a82
commit
545282be32
|
@ -441,11 +441,6 @@ export class SyndicateParser {
|
||||||
|
|
||||||
valuePattern(level: number, ... extraStops: Pattern<any>[]): Pattern<ValuePattern> {
|
valuePattern(level: number, ... extraStops: Pattern<any>[]): Pattern<ValuePattern> {
|
||||||
return withoutSpace(alt<ValuePattern>(
|
return withoutSpace(alt<ValuePattern>(
|
||||||
scope<PCapture>(o => {
|
|
||||||
o.type = 'PCapture';
|
|
||||||
o.inner = { type: 'PDiscard' };
|
|
||||||
return bind(o, 'binder', this.pCaptureBinder);
|
|
||||||
}),
|
|
||||||
scope(o => map(this.pDiscard, _ => o.type = 'PDiscard')),
|
scope(o => map(this.pDiscard, _ => o.type = 'PDiscard')),
|
||||||
this.pArray(level),
|
this.pArray(level),
|
||||||
this.pDict(level),
|
this.pDict(level),
|
||||||
|
@ -475,6 +470,11 @@ export class SyndicateParser {
|
||||||
return succeed(o);
|
return succeed(o);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
scope<PCapture>(o => {
|
||||||
|
o.type = 'PCapture';
|
||||||
|
o.inner = { type: 'PDiscard' };
|
||||||
|
return bind(o, 'binder', this.pCaptureBinder);
|
||||||
|
}),
|
||||||
map(this.expr(... extraStops), e => ({ type: 'PConstant', value: e }))
|
map(this.expr(... extraStops), e => ({ type: 'PConstant', value: e }))
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue