formacao
This commit is contained in:
+9
-10
@@ -192,15 +192,14 @@ class AST {
|
||||
}
|
||||
// reconstructs the pattern
|
||||
toString() {
|
||||
if (this.#toString !== undefined)
|
||||
return this.#toString;
|
||||
if (!this.type) {
|
||||
return (this.#toString = this.#parts.map(p => String(p)).join(''));
|
||||
}
|
||||
else {
|
||||
return (this.#toString =
|
||||
this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
|
||||
}
|
||||
return (this.#toString !== undefined ? this.#toString
|
||||
: !this.type ?
|
||||
(this.#toString = this.#parts.map(p => String(p)).join(''))
|
||||
: (this.#toString =
|
||||
this.type +
|
||||
'(' +
|
||||
this.#parts.map(p => String(p)).join('|') +
|
||||
')'));
|
||||
}
|
||||
#fillNegs() {
|
||||
/* c8 ignore start */
|
||||
@@ -480,7 +479,7 @@ class AST {
|
||||
}
|
||||
#canUsurpType(c) {
|
||||
const m = usurpMap.get(this.type);
|
||||
return !!(m?.has(c));
|
||||
return !!m?.has(c);
|
||||
}
|
||||
#canUsurp(child) {
|
||||
if (!child ||
|
||||
|
||||
Reference in New Issue
Block a user