@remix-project/remix-astwalker
TypeScript icon, indicating that this package has built-in type declarations

0.0.78 • Public • Published

Remix Astwalker

npm version npm npm GitHub contributions welcome

@remix-project/remix-astwalker is a tool to parse AST (Abstract Syntax Tree) generated by Solidity compiler to perform certain operations. It is used in remix-analyzer, remix-debug and in contextualListener plugin of Remix IDE.

Installation

@remix-project/remix-astwalker is an NPM package and can be installed using NPM as:

yarn add @remix-project/remix-astwalker

How to use

@remix-project/remix-astwalker can be used as:

import { AstWalker } from "remix-astwalker";

const astWalker = new AstWalker();
astWalker.on("node", node => {
  if (node.nodeType === "ContractDefinition") {
    checkContract(st, node);
  }

  if (node.nodeType === "PragmaDirective") {
    checkProgramDirective(st, node);
  }
});

Contribute

Please feel free to open an issue or a pull request.

In case you want to add some code, do have a look at our contribution guidelines here. Reach us on Gitter in case of any queries.

License

MIT © 2018-21 Remix Team

Readme

Keywords

Package Sidebar

Install

npm i @remix-project/remix-astwalker

Weekly Downloads

89

Version

0.0.78

License

MIT

Unpacked Size

36.6 kB

Total Files

15

Last publish

Collaborators

  • ryestew
  • yann300
  • aniket-engg
  • ioedeveloper