greybel-interpreter 4.5.5 → 4.5.7
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/bytecode-generator.js +15 -0
- package/package.json +2 -2
|
@@ -20,6 +20,7 @@ const string_1 = require("./types/string");
|
|
|
20
20
|
const default_1 = require("./types/default");
|
|
21
21
|
const stack_1 = require("./utils/stack");
|
|
22
22
|
const keywords_1 = require("./byte-compiler/keywords");
|
|
23
|
+
const path_1 = require("path");
|
|
23
24
|
function generateCustomValueFromASTLiteral(node) {
|
|
24
25
|
switch (node.type) {
|
|
25
26
|
case miniscript_core_1.ASTType.BooleanLiteral:
|
|
@@ -344,6 +345,20 @@ class BytecodeGenerator {
|
|
|
344
345
|
case greybel_core_1.ASTType.FeatureEnvarExpression:
|
|
345
346
|
yield this.processEnvarExpression(node);
|
|
346
347
|
return;
|
|
348
|
+
case greybel_core_1.ASTType.FeatureLineExpression:
|
|
349
|
+
this.push({
|
|
350
|
+
op: instruction_1.OpCode.PUSH,
|
|
351
|
+
source: this.getSourceLocation(node),
|
|
352
|
+
value: new number_1.CustomNumber(node.start.line)
|
|
353
|
+
});
|
|
354
|
+
return;
|
|
355
|
+
case greybel_core_1.ASTType.FeatureFileExpression:
|
|
356
|
+
this.push({
|
|
357
|
+
op: instruction_1.OpCode.PUSH,
|
|
358
|
+
source: this.getSourceLocation(node),
|
|
359
|
+
value: new string_1.CustomString((0, path_1.basename)(this.target.peek()))
|
|
360
|
+
});
|
|
361
|
+
return;
|
|
347
362
|
case miniscript_core_1.ASTType.Comment:
|
|
348
363
|
return;
|
|
349
364
|
default: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "greybel-interpreter",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.7",
|
|
4
4
|
"description": "Interpreter",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "dist/index",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"lru-cache": "^10.0.1",
|
|
52
|
-
"greybel-core": "~1.5.
|
|
52
|
+
"greybel-core": "~1.5.8"
|
|
53
53
|
},
|
|
54
54
|
"keywords": [
|
|
55
55
|
"miniscript"
|