
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@distributedlab/circom-parser
Advanced tools
A TypeScript package for parsing Circom code using ANTLR (ANother Tool for Language Recognition) grammar.
It includes built-in visitors and utilities that allow you to parse, traverse, and manipulate Circom circuits.
npm install @distributedlab/circom-parser
To create your own visitor, simply extend the CircomVisitor class and override the visit methods you need.
import { CircomVisitor, AnyRuleContext } from '@distributed-lab/circom-parser';
export default class MyCircomVisitor extends CircomVisitor {
visitAnyRule = (ctx: AnyRuleContext) => {
// override the visit logic here
}
}
After creating your custom visitor, you can use it with the CircomParser to traverse and manipulate the parse tree.
import { getCircomParser, ParserError } from '@distributed-lab/circom-parser';
import { MyCircomVisitor } from './MyCircomVisitor';
const { parser, errorListener } = getCircomParser(source);
const templateVisitor = new MyCircomVisitor();
templateVisitor.visit(parser.circuit());
if (errorListener.hasErrors()) {
throw new ParserError(errorListener.getErrors());
}
FAQs
Circom circuit parser built with ANTLR4
We found that @distributedlab/circom-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.