circuitscript 0.1.22 → 0.1.23
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/cjs/antlr/CircuitScriptParser.js +544 -535
- package/dist/cjs/helpers.js +3 -2
- package/dist/cjs/visitor.js +3 -0
- package/dist/esm/antlr/CircuitScriptParser.js +544 -535
- package/dist/esm/helpers.js +3 -2
- package/dist/esm/visitor.js +3 -0
- package/dist/types/antlr/CircuitScriptParser.d.ts +2 -1
- package/dist/types/helpers.d.ts +2 -2
- package/package.json +1 -1
package/dist/cjs/helpers.js
CHANGED
|
@@ -234,6 +234,7 @@ async function renderScriptCustom(scriptData, outputPath, options, parseHandlers
|
|
|
234
234
|
else if (typeof saveAnnotatedCopy === 'string') {
|
|
235
235
|
usePath = saveAnnotatedCopy;
|
|
236
236
|
}
|
|
237
|
+
console.log('Annotations saved to ' + usePath);
|
|
237
238
|
(0, fs_1.writeFileSync)(usePath, refdesVisitor.getOutput());
|
|
238
239
|
}
|
|
239
240
|
if (dumpNets) {
|
|
@@ -360,9 +361,9 @@ exports.ParseOutputHandler = ParseOutputHandler;
|
|
|
360
361
|
class KiCadNetListOutputHandler extends ParseOutputHandler {
|
|
361
362
|
constructor() {
|
|
362
363
|
super(...arguments);
|
|
363
|
-
this.
|
|
364
|
+
this.beforeRender = true;
|
|
364
365
|
}
|
|
365
|
-
parse(visitor, outputPath, fileExtension
|
|
366
|
+
parse(visitor, outputPath, fileExtension) {
|
|
366
367
|
if (outputPath !== null && fileExtension === "net") {
|
|
367
368
|
const { tree: kiCadNetList, missingFootprints } = (0, export_js_1.generateKiCadNetList)(visitor.getNetList());
|
|
368
369
|
missingFootprints.forEach(entry => {
|
package/dist/cjs/visitor.js
CHANGED
|
@@ -945,6 +945,9 @@ class ParserVisitor extends BaseVisitor_js_1.BaseVisitor {
|
|
|
945
945
|
const [currentComponent,] = this.getExecutor().getCurrentPoint();
|
|
946
946
|
this.componentCtxLinks.delete(ctxAtComponent);
|
|
947
947
|
this.componentCtxLinks.set(ctx, currentComponent);
|
|
948
|
+
ctx.annotation_comment_expr().forEach(ctx => {
|
|
949
|
+
this.visit(ctx);
|
|
950
|
+
});
|
|
948
951
|
};
|
|
949
952
|
this.visitAt_block = (ctx) => {
|
|
950
953
|
const executor = this.getExecutor();
|