remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
remix-project/remix-astwalker
aniket-engg 971058579b modules version incremented 5 years ago
..
src Add more position conversion functions 5 years ago
tests Add more position conversion functions 5 years ago
.gitignore Add remix-astwalker commits to a new branch 6 years ago
README.md Add remix-astwalker commits to a new branch 6 years ago
package-lock.json updated package-lock.json 5 years ago
package.json modules version incremented 5 years ago
tsconfig.json Add more position conversion functions 5 years ago

README.md

Remix ASTwalker

remix-astwalker module walks through solidity AST and spits out AST nodes.

Example

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);
  }
});

For more examples see tests.