agency-lang 0.0.42 → 0.0.44
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/scripts/agency.js +3 -1
- package/package.json +1 -1
package/dist/scripts/agency.js
CHANGED
|
@@ -77,8 +77,9 @@ function getImports(program) {
|
|
|
77
77
|
.filter((node) => node.type === "importNodeStatement" ||
|
|
78
78
|
node.type === "importToolStatement")
|
|
79
79
|
.map((node) => node.agencyFile.trim());
|
|
80
|
+
// this makes compile() try to parse non-agency files
|
|
80
81
|
const importStatements = program.nodes
|
|
81
|
-
.filter((node) => node.type === "importStatement")
|
|
82
|
+
.filter((node) => node.type === "importStatement" && node.modulePath.endsWith(".agency"))
|
|
82
83
|
.map((node) => node.modulePath.trim());
|
|
83
84
|
return [...toolAndNodeImports, ...importStatements];
|
|
84
85
|
}
|
|
@@ -119,6 +120,7 @@ function compile(inputFile, _outputFile, verbose = false) {
|
|
|
119
120
|
}
|
|
120
121
|
compiledFiles.add(absoluteInputFile);
|
|
121
122
|
const contents = readFile(inputFile);
|
|
123
|
+
console.log(`Compiling ${inputFile}...`);
|
|
122
124
|
const parsedProgram = parse(contents, verbose);
|
|
123
125
|
const imports = getImports(parsedProgram);
|
|
124
126
|
const inputDir = path.dirname(absoluteInputFile);
|