mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #12971 from shekhirin/fix-parser-error
fix(parser): error for unexpected token
This commit is contained in:
commit
c3a5c83d38
@ -142,7 +142,7 @@ ASTPointer<SourceUnit> Parser::parse(CharStream& _charStream)
|
||||
expectToken(Token::Semicolon);
|
||||
}
|
||||
else
|
||||
fatalParserError(7858_error, "Expected pragma, import directive or contract/interface/library/struct/enum/constant/function definition.");
|
||||
fatalParserError(7858_error, "Expected pragma, import directive or contract/interface/library/struct/enum/constant/function/error definition.");
|
||||
}
|
||||
}
|
||||
solAssert(m_recursionDepth == 0, "");
|
||||
|
@ -1,4 +1,4 @@
|
||||
Error: Expected pragma, import directive or contract/interface/library/struct/enum/constant/function definition.
|
||||
Error: Expected pragma, import directive or contract/interface/library/struct/enum/constant/function/error definition.
|
||||
--> recovery_ast_empty_contract/input.sol:3:1:
|
||||
|
|
||||
3 | c
|
||||
|
@ -1,3 +1,3 @@
|
||||
constructor() {}
|
||||
// ----
|
||||
// ParserError 7858: (0-11): Expected pragma, import directive or contract/interface/library/struct/enum/constant/function definition.
|
||||
// ParserError 7858: (0-11): Expected pragma, import directive or contract/interface/library/struct/enum/constant/function/error definition.
|
||||
|
@ -1,3 +1,3 @@
|
||||
fallback(){}
|
||||
// ----
|
||||
// ParserError 7858: (0-8): Expected pragma, import directive or contract/interface/library/struct/enum/constant/function definition.
|
||||
// ParserError 7858: (0-8): Expected pragma, import directive or contract/interface/library/struct/enum/constant/function/error definition.
|
||||
|
@ -1,3 +1,3 @@
|
||||
receive() {}
|
||||
// ----
|
||||
// ParserError 7858: (0-7): Expected pragma, import directive or contract/interface/library/struct/enum/constant/function definition.
|
||||
// ParserError 7858: (0-7): Expected pragma, import directive or contract/interface/library/struct/enum/constant/function/error definition.
|
||||
|
@ -1,3 +1,3 @@
|
||||
unexpected
|
||||
// ----
|
||||
// ParserError 7858: (0-10): Expected pragma, import directive or contract/interface/library/struct/enum/constant/function definition.
|
||||
// ParserError 7858: (0-10): Expected pragma, import directive or contract/interface/library/struct/enum/constant/function/error definition.
|
||||
|
Loading…
Reference in New Issue
Block a user