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/libs/remix-astwalker
aniket-engg 68d798277e build and test command done 5 years ago
..
src Moved files to libs/ 5 years ago
tests build and test command done 5 years ago
.gitignore Moved files to libs/ 5 years ago
.npmignore Moved files to libs/ 5 years ago
README.md Moved files to libs/ 5 years ago
package-lock.json Moved files to libs/ 5 years ago
package.json linting done for libs 5 years ago
tsconfig.json build command working for all ts libs 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.