Closed lonelyenvoy closed 3 years ago
Yeah, I tried to improve this but it's still a mess. I want to at some point make things so that the project doesn't compile if the node types are not correct. Sadly I haven't been able to do it yet.
I think this is no longer relevant, since the project uses typescript now.
Thank you for implementing the parser - it's very useful.
I'd like to point out some typing problems in
dist/ast-types.d.ts
.The type of
BaseASTNode.loc
is wrongI guess the definition of
Location
is missing? TheLocation
here is an interface in the typescript standard library and has nothing to do with line of code.The type of
ASTNodeTypeString
is unsoundSome node types are missing in this declaration, e.g.
'TryStatement'
and'FileLevelConstant'
.Interfaces of some AST node types derived from
BaseASTNode
are not givenThe interface like this is very useful, but some are missing, e.g.
PragmaName
,PragmaValue
,StorageLocation
,StateMutability
, andIdentifierList
.