parseman 0.7.0 → 0.7.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/combinators/scanTo.d.ts.map +1 -1
- package/dist/index.cjs +6 -1
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +6 -1
- package/dist/index.js.map +2 -2
- package/dist/plugin/index.cjs +6 -1
- package/dist/plugin/index.cjs.map +2 -2
- package/dist/plugin/index.js +6 -1
- package/dist/plugin/index.js.map +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanTo.d.ts","sourceRoot":"","sources":["../../src/combinators/scanTo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAyC,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"scanTo.d.ts","sourceRoot":"","sources":["../../src/combinators/scanTo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAyC,MAAM,aAAa,CAAA;AAQpF,MAAM,MAAM,aAAa,GAAG;IAC1B,uGAAuG;IACvG,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAA;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CACpB,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,EAC7B,EAAE,IAAS,EAAE,KAAa,EAAE,GAAE,aAAkB,GAC/C,UAAU,CAAC,MAAM,CAAC,CA8DpB;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,aAAkB,GAC1B,UAAU,CAAC,MAAM,CAAC,CAqBpB"}
|
package/dist/index.cjs
CHANGED
|
@@ -2973,7 +2973,11 @@ function scanTo(sentinel, { skip: skip2 = [], orEOF = false } = {}) {
|
|
|
2973
2973
|
};
|
|
2974
2974
|
}
|
|
2975
2975
|
function balanced(open, close, options = {}) {
|
|
2976
|
-
const
|
|
2976
|
+
const self = ref();
|
|
2977
|
+
const inner = scanTo(literal(close), {
|
|
2978
|
+
...options,
|
|
2979
|
+
skip: [self, ...options.skip ?? []]
|
|
2980
|
+
});
|
|
2977
2981
|
const combi = transform(
|
|
2978
2982
|
sequence(literal(open), inner, literal(close)),
|
|
2979
2983
|
([o, content, c]) => o + content + c
|
|
@@ -2981,6 +2985,7 @@ function balanced(open, close, options = {}) {
|
|
|
2981
2985
|
if (combi._def.tag === "transform") {
|
|
2982
2986
|
combi._def.fnSrc = "([o, content, c]) => o + content + c";
|
|
2983
2987
|
}
|
|
2988
|
+
self.define(combi);
|
|
2984
2989
|
return combi;
|
|
2985
2990
|
}
|
|
2986
2991
|
|