mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
liblangutil: SourceLocation: adds (shared) pointer to underlying CharStream source, eliminating sourceName
Also, adapted affecting code to those changes.
This commit is contained in:
@@ -42,7 +42,7 @@ class Parser::ASTNodeFactory
|
||||
{
|
||||
public:
|
||||
explicit ASTNodeFactory(Parser const& _parser):
|
||||
m_parser(_parser), m_location(_parser.position(), -1, _parser.sourceName()) {}
|
||||
m_parser(_parser), m_location(_parser.position(), -1, _parser.source()) {}
|
||||
ASTNodeFactory(Parser const& _parser, ASTPointer<ASTNode> const& _childNode):
|
||||
m_parser(_parser), m_location(_childNode->location()) {}
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
template <class NodeType, typename... Args>
|
||||
ASTPointer<NodeType> createNode(Args&& ... _args)
|
||||
{
|
||||
solAssert(m_location.sourceName, "");
|
||||
solAssert(m_location.source, "");
|
||||
if (m_location.end < 0)
|
||||
markEndPosition();
|
||||
return make_shared<NodeType>(m_location, std::forward<Args>(_args)...);
|
||||
|
||||
Reference in New Issue
Block a user