GithubHelp home page GithubHelp logo

lezer-circom's Introduction

lezer-tasl

standard-readme compliant license NPM version TypeScript types

A Lezer grammar for the circom language.

⚠️ This is a low-level library for parsing a low-level circom AST - if you're looking for the CodeMirror language extension, you want the codemirror-lang-circom package instead.

⚠️ This grammar is very rough alpha-quality! There are almost certainly bugs.

Table of Contents

Install

npm i lezer-circom

Usage

import { parser } from "lezer-circom"

const tree = parser.parse(`

pragma circom 2.0.1;
// ...

`)

// do something with tree.cursor() or tree.topNode ...

You can find documentation for the LR parser interface on the Lezer website.

API

import type { LRParser } from "@lezer/lr"

export const parser: LRParser

Testing

Tests use AVA 4 (currently in alpha) and live in the test directory.

npm run test

Contributing

This library is just intended to export the compiled lezer grammar, so I don't expect to add any features or functionality beyond that. If you find issues with the grammar definition itself please open an issue to discuss them!

License

GPLv3 © 2021 Joel Gustafson

lezer-circom's People

Contributors

joeltg avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.