liblangutil: extends CharStream to know about the respective (file-)name (and adapt codebase to it)

This commit is contained in:
Christian Parpart
2018-11-29 12:45:27 +01:00
parent 6060a3682c
commit 22eff22492
13 changed files with 83 additions and 80 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ namespace
ASTPointer<ContractDefinition> parseText(std::string const& _source, ErrorList& _errors)
{
ErrorReporter errorReporter(_errors);
ASTPointer<SourceUnit> sourceUnit = Parser(errorReporter).parse(std::make_shared<Scanner>(CharStream(_source)));
ASTPointer<SourceUnit> sourceUnit = Parser(errorReporter).parse(std::make_shared<Scanner>(CharStream(_source, "")));
if (!sourceUnit)
return ASTPointer<ContractDefinition>();
for (ASTPointer<ASTNode> const& node: sourceUnit->nodes())