Does not work with UDVT operators (Solidity 0.8.19)
PaulRBerg opened this issue · 1 comments
PaulRBerg commented
Getting this error when running Solhint over a project that uses the recently introduced UDVT operators:
/Users/paulrberg/workspace/projects/prb-math/node_modules/solhint/lib/index.js:40
throw e
^
Error: The specified node does not exist
at FileLevelConstantContext.getChild (/Users/paulrberg/workspace/projects/prb-math/node_modules/@solidity-parser/parser/dist/index.cjs.js:9354:15)
at FileLevelConstantContext.getRuleContext (/Users/paulrberg/workspace/projects/prb-math/node_modules/@solidity-parser/parser/dist/index.cjs.js:9417:19)
at FileLevelConstantContext.identifier (/Users/paulrberg/workspace/projects/prb-math/node_modules/@solidity-parser/parser/dist/index.cjs.js:32476:17)
at ASTBuilder.visitFileLevelConstant (/Users/paulrberg/workspace/projects/prb-math/node_modules/@solidity-parser/parser/dist/index.cjs.js:36449:22)
at FileLevelConstantContext.accept (/Users/paulrberg/workspace/projects/prb-math/node_modules/@solidity-parser/parser/dist/index.cjs.js:32499:22)
at ASTBuilder.visit (/Users/paulrberg/workspace/projects/prb-math/node_modules/@solidity-parser/parser/dist/index.cjs.js:17669:19)
at /Users/paulrberg/workspace/projects/prb-math/node_modules/@solidity-parser/parser/dist/index.cjs.js:35582:59
at Array.map (<anonymous>)
at ASTBuilder.visitSourceUnit (/Users/paulrberg/workspace/projects/prb-math/node_modules/@solidity-parser/parser/dist/index.cjs.js:35582:39)
at SourceUnitContext.accept (/Users/paulrberg/workspace/projects/prb-math/node_modules/@solidity-parser/parser/dist/index.cjs.js:31978:22)
For more context:
- PaulRBerg/prb-math#168.
- AST Changes in this article
fvictorio commented
Upgrading the parser should be enough, it's very likely that no other changes will be needed.