@bablr/helpers 0.15.1 → 0.15.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/source.js +6 -6
- package/package.json +2 -2
package/lib/source.js
CHANGED
|
@@ -9,7 +9,7 @@ const escapables = {
|
|
|
9
9
|
0: '\0',
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
function*
|
|
12
|
+
function* __sourceFromReadStream(stream) {
|
|
13
13
|
let iter = stream[Symbol.asyncIterator]();
|
|
14
14
|
let step;
|
|
15
15
|
|
|
@@ -26,13 +26,12 @@ function* __readStreamAsStreamIterator(stream) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
const
|
|
30
|
-
new StreamIterable(__readStreamAsStreamIterator(stream));
|
|
29
|
+
export const sourceFromReadStream = (stream) => new StreamIterable(__sourceFromReadStream(stream));
|
|
31
30
|
|
|
32
31
|
const gapStr = '<//>';
|
|
33
32
|
|
|
34
|
-
function*
|
|
35
|
-
let iter = getStreamIterator(
|
|
33
|
+
function* __embeddedSourceFromReadStream(stream) {
|
|
34
|
+
let iter = getStreamIterator(sourceFromReadStream(stream));
|
|
36
35
|
let step;
|
|
37
36
|
let escape = false;
|
|
38
37
|
let gapMatchIdx = 0;
|
|
@@ -90,7 +89,8 @@ function* __sourceFromReadStream(stream) {
|
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
91
|
|
|
93
|
-
export const
|
|
92
|
+
export const embeddedSourceFromReadStream = (stream) =>
|
|
93
|
+
new StreamIterable(__embeddedSourceFromReadStream(stream));
|
|
94
94
|
|
|
95
95
|
function* __sourceFromTokenStream(terminals) {
|
|
96
96
|
let iter = getStreamIterator(terminals);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bablr/helpers",
|
|
3
3
|
"description": "Command helpers for use in writing BABLR grammars",
|
|
4
|
-
"version": "0.15.
|
|
4
|
+
"version": "0.15.2",
|
|
5
5
|
"author": "Conrad Buck<conartist6@gmail.com>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@babel/runtime": "^7.23.2",
|
|
43
43
|
"@bablr/boot": "0.2.1",
|
|
44
44
|
"@bablr/eslint-config-base": "github:bablr-lang/eslint-config-base#d834ccc52795d6c3b96ecc6c419960fceed221a6",
|
|
45
|
-
"@bablr/macrome": "0.1.
|
|
45
|
+
"@bablr/macrome": "0.1.1",
|
|
46
46
|
"@bablr/macrome-generator-bablr": "0.2.0",
|
|
47
47
|
"babel-plugin-macros": "3.1.0",
|
|
48
48
|
"enhanced-resolve": "^5.12.0",
|