mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove linking to unqualified library name
- SemanticTests accepts fully qualified library name and also unqualifed library name when the library is defined in the same file for convenience. - commandline tests are added! Signed-off-by: soroosh-sdi <soroosh.sardari@gmail.com>
This commit is contained in:
@@ -100,8 +100,26 @@ vector<solidity::frontend::test::FunctionCall> TestFileParser::parseFunctionCall
|
||||
if (accept(Token::Library, true))
|
||||
{
|
||||
expect(Token::Colon);
|
||||
call.signature = m_scanner.currentLiteral();
|
||||
expect(Token::Identifier);
|
||||
string libraryName;
|
||||
if (accept(Token::String))
|
||||
{
|
||||
libraryName = m_scanner.currentLiteral();
|
||||
expect(Token::String);
|
||||
expect(Token::Colon);
|
||||
libraryName += ':' + m_scanner.currentLiteral();
|
||||
expect(Token::Identifier);
|
||||
}
|
||||
else if (accept(Token::Colon, true))
|
||||
{
|
||||
libraryName = ':' + m_scanner.currentLiteral();
|
||||
expect(Token::Identifier);
|
||||
}
|
||||
else
|
||||
{
|
||||
libraryName = m_scanner.currentLiteral();
|
||||
expect(Token::Identifier);
|
||||
}
|
||||
call.signature = libraryName;
|
||||
call.kind = FunctionCall::Kind::Library;
|
||||
call.expectations.failure = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user