remix-astwalker
v0.0.25
Published
Remix sub-module for walking through AST
Downloads
14
Readme
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
.