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.
@@ -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
- afterRender = true;
347
- parse(visitor, outputPath, fileExtension, extra = null) {
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 => {
@@ -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 | null;
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
  }
@@ -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
- afterRender: boolean;
52
- parse(visitor: ParserVisitor, outputPath: string | null, fileExtension: string | null, extra?: any): boolean;
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "circuitscript",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "Interpreter for the circuitscript language",
5
5
  "homepage": "https://circuitscript.net",
6
6
  "engines": {