@bablr/language_enhancer-debug-log 0.6.0 → 0.7.0
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/index.js +5 -3
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* global console */
|
|
2
2
|
|
|
3
|
-
import { printSource, getCooked } from '@bablr/agast-helpers/tree';
|
|
3
|
+
import { printSource, getCooked, getRoot } from '@bablr/agast-helpers/tree';
|
|
4
|
+
import * as sym from '@bablr/agast-helpers/symbols';
|
|
4
5
|
import { buildCall, buildNumber, buildObject, buildString } from '@bablr/agast-vm-helpers';
|
|
5
6
|
import { printType as printType_ } from '@bablr/agast-helpers/print';
|
|
6
7
|
|
|
@@ -57,11 +58,12 @@ const mapProduction = (production, type, indentation) => {
|
|
|
57
58
|
yield writeError(`>>> ` + indent`${printSource(instr)}`.slice(indentation.length));
|
|
58
59
|
|
|
59
60
|
const eats =
|
|
60
|
-
instr.type === 'Call' &&
|
|
61
|
+
getRoot(instr).type === 'Call' &&
|
|
62
|
+
['eat', 'eatMatch'].includes(getCooked(getRoot(instr).properties.verb));
|
|
61
63
|
|
|
62
64
|
const result = yield instr;
|
|
63
65
|
|
|
64
|
-
anyResult = anyResult || (eats && result);
|
|
66
|
+
anyResult = anyResult || (eats && result && result.type !== sym.null);
|
|
65
67
|
|
|
66
68
|
current = generator.next(result);
|
|
67
69
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bablr/language_enhancer-debug-log",
|
|
3
3
|
"description": "A BABLR language enhancer that logs production execution",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0",
|
|
5
5
|
"author": "Conrad Buck<conartist6@gmail.com>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@bablr/agast-helpers": "0.
|
|
16
|
-
"@bablr/agast-vm-helpers": "0.
|
|
15
|
+
"@bablr/agast-helpers": "^0.5.0",
|
|
16
|
+
"@bablr/agast-vm-helpers": "^0.5.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@bablr/eslint-config-base": "github:bablr-lang/eslint-config-base#49f5952efed27f94ee9b94340eb1563c440bf64e",
|