mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Produce AST even when there are parser errors
This commit is contained in:
@@ -79,13 +79,15 @@ public:
|
||||
static void listAccept(std::vector<T> const& _list, ASTVisitor& _visitor)
|
||||
{
|
||||
for (T const& element: _list)
|
||||
element->accept(_visitor);
|
||||
if (element)
|
||||
element->accept(_visitor);
|
||||
}
|
||||
template <class T>
|
||||
static void listAccept(std::vector<T> const& _list, ASTConstVisitor& _visitor)
|
||||
{
|
||||
for (T const& element: _list)
|
||||
element->accept(_visitor);
|
||||
if (element)
|
||||
element->accept(_visitor);
|
||||
}
|
||||
|
||||
/// @returns a copy of the vector containing only the nodes which derive from T.
|
||||
|
||||
Reference in New Issue
Block a user