@bablr/agast-helpers 0.3.1 → 0.3.2
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/lib/stream.js +3 -7
- package/package.json +1 -1
package/lib/stream.js
CHANGED
|
@@ -258,10 +258,6 @@ export const stringFromStream = (stream) => {
|
|
|
258
258
|
function* __generateCSTMLStrategy(terminals, options) {
|
|
259
259
|
let { emitEffects = false, inline: inlineOption = true } = options;
|
|
260
260
|
|
|
261
|
-
if (emitEffects) {
|
|
262
|
-
throw new Error('You must use generatePrettyCSTML with emitEffects');
|
|
263
|
-
}
|
|
264
|
-
|
|
265
261
|
if (!terminals) {
|
|
266
262
|
yield buildWriteEffect('<//>');
|
|
267
263
|
return;
|
|
@@ -306,6 +302,9 @@ function* __generateCSTMLStrategy(terminals, options) {
|
|
|
306
302
|
yield buildWriteEffect('\n');
|
|
307
303
|
}
|
|
308
304
|
|
|
305
|
+
export const generateCSTMLStrategy = (terminals, options = {}) =>
|
|
306
|
+
new StreamIterable(__generateCSTMLStrategy(terminals, options));
|
|
307
|
+
|
|
309
308
|
export const prettyGroupTokens = (terminals) => new StreamIterable(__prettyGroupTokens(terminals));
|
|
310
309
|
|
|
311
310
|
function* __prettyGroupTokens(terminals) {
|
|
@@ -376,9 +375,6 @@ function* __prettyGroupTokens(terminals) {
|
|
|
376
375
|
}
|
|
377
376
|
}
|
|
378
377
|
|
|
379
|
-
export const generateCSTMLStrategy = (terminals, options = {}) =>
|
|
380
|
-
new StreamIterable(__generateCSTMLStrategy(terminals, options));
|
|
381
|
-
|
|
382
378
|
function* __generatePrettyCSTMLStrategy(terminals, options) {
|
|
383
379
|
let { indent = ' ', emitEffects = false, inline: inlineOption = true } = options;
|
|
384
380
|
|