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/esm/helpers.js
CHANGED
|
@@ -223,6 +223,7 @@ export async function renderScriptCustom(scriptData, outputPath, options, parseH
|
|
|
223
223
|
else if (typeof saveAnnotatedCopy === 'string') {
|
|
224
224
|
usePath = saveAnnotatedCopy;
|
|
225
225
|
}
|
|
226
|
+
console.log('Annotations saved to ' + usePath);
|
|
226
227
|
writeFileSync(usePath, refdesVisitor.getOutput());
|
|
227
228
|
}
|
|
228
229
|
if (dumpNets) {
|
|
@@ -343,8 +344,8 @@ export class ParseOutputHandler {
|
|
|
343
344
|
afterRender = false;
|
|
344
345
|
}
|
|
345
346
|
export class KiCadNetListOutputHandler extends ParseOutputHandler {
|
|
346
|
-
|
|
347
|
-
parse(visitor, outputPath, fileExtension
|
|
347
|
+
beforeRender = true;
|
|
348
|
+
parse(visitor, outputPath, fileExtension) {
|
|
348
349
|
if (outputPath !== null && fileExtension === "net") {
|
|
349
350
|
const { tree: kiCadNetList, missingFootprints } = generateKiCadNetList(visitor.getNetList());
|
|
350
351
|
missingFootprints.forEach(entry => {
|
package/dist/esm/visitor.js
CHANGED
|
@@ -990,6 +990,9 @@ export class ParserVisitor extends BaseVisitor {
|
|
|
990
990
|
const [currentComponent,] = this.getExecutor().getCurrentPoint();
|
|
991
991
|
this.componentCtxLinks.delete(ctxAtComponent);
|
|
992
992
|
this.componentCtxLinks.set(ctx, currentComponent);
|
|
993
|
+
ctx.annotation_comment_expr().forEach(ctx => {
|
|
994
|
+
this.visit(ctx);
|
|
995
|
+
});
|
|
993
996
|
};
|
|
994
997
|
visitAt_block = (ctx) => {
|
|
995
998
|
const executor = this.getExecutor();
|
|
@@ -437,7 +437,8 @@ export declare class At_block_expressionsContext extends antlr.ParserRuleContext
|
|
|
437
437
|
export declare class At_block_headerContext extends antlr.ParserRuleContext {
|
|
438
438
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
439
439
|
at_component_expr(): At_component_exprContext;
|
|
440
|
-
annotation_comment_expr(): Annotation_comment_exprContext
|
|
440
|
+
annotation_comment_expr(): Annotation_comment_exprContext[];
|
|
441
|
+
annotation_comment_expr(i: number): Annotation_comment_exprContext | null;
|
|
441
442
|
get ruleIndex(): number;
|
|
442
443
|
accept<Result>(visitor: CircuitScriptVisitor<Result>): Result | null;
|
|
443
444
|
}
|
package/dist/types/helpers.d.ts
CHANGED
|
@@ -48,8 +48,8 @@ export declare abstract class ParseOutputHandler {
|
|
|
48
48
|
abstract parse(visitor: ParserVisitor, outputPath: string | null, fileExtension: string | null, extra: any | null): boolean;
|
|
49
49
|
}
|
|
50
50
|
export declare class KiCadNetListOutputHandler extends ParseOutputHandler {
|
|
51
|
-
|
|
52
|
-
parse(visitor: ParserVisitor, outputPath: string | null, fileExtension: string | null
|
|
51
|
+
beforeRender: boolean;
|
|
52
|
+
parse(visitor: ParserVisitor, outputPath: string | null, fileExtension: string | null): boolean;
|
|
53
53
|
}
|
|
54
54
|
export declare function detectJSModuleType(): JSModuleType;
|
|
55
55
|
export declare class UnitDimension {
|