parseman 0.51.0 → 0.51.1
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 +7 -3
- package/dist/index.js.map +1 -1
- package/dist/plugin/index.js +7 -3
- package/dist/plugin/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/compiler/ir-serialize.ts +7 -3
- package/src/version.ts +1 -1
package/dist/version.d.ts
CHANGED
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* Kept in sync with `package.json` by `test/unit/version-sync.test.ts`, which fails
|
|
14
14
|
* the build if this constant drifts from the published version.
|
|
15
15
|
*/
|
|
16
|
-
export declare const PARSEMAN_VERSION = "0.51.
|
|
16
|
+
export declare const PARSEMAN_VERSION = "0.51.1";
|
|
17
17
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -101,7 +101,7 @@ const ruleNameOf = (c: Comb): string | undefined =>
|
|
|
101
101
|
* the serializer treats it as an atom: it is not descended for sharing/recursion
|
|
102
102
|
* analysis (the interior's `self` ref is internal and must not surface as a cycle).
|
|
103
103
|
*/
|
|
104
|
-
const balancedOf = (c: Comb): { open: string; close: string; ownSkip: Comb[] } | undefined =>
|
|
104
|
+
const balancedOf = (c: Comb): { open: string; close: string; ownSkip: Comb[]; strict?: boolean } | undefined =>
|
|
105
105
|
(c as BalancedAmbient)._balancedAmbient
|
|
106
106
|
|
|
107
107
|
/** Resolve a lazy's target, or null if it isn't defined yet (external ref). */
|
|
@@ -505,8 +505,12 @@ class Serializer {
|
|
|
505
505
|
// which is correct — they opt out of ambient resolution by definition.
|
|
506
506
|
const bal = balancedOf(c)
|
|
507
507
|
if (bal) {
|
|
508
|
-
const
|
|
509
|
-
|
|
508
|
+
const options = [
|
|
509
|
+
...(bal.ownSkip.length === 0 ? [] : [`skip: [${bal.ownSkip.map(kid).join(', ')}]`]),
|
|
510
|
+
...(bal.strict ? ['strict: true'] : []),
|
|
511
|
+
]
|
|
512
|
+
const optionsArg = options.length === 0 ? '' : `, { ${options.join(', ')} }`
|
|
513
|
+
return `balanced(${JSON.stringify(bal.open)}, ${JSON.stringify(bal.close)}${optionsArg})`
|
|
510
514
|
}
|
|
511
515
|
switch (def.tag) {
|
|
512
516
|
case 'lazy': {
|
package/src/version.ts
CHANGED