Skip to content

Parse Errors (E1xxx)

Back to Error Reference

These errors occur during Stage 1 (Frontend) when the solang-parser processes Solidity source code. Parse errors block all subsequent compilation stages.

CodeNameDescriptionCommon Cause
E1001UnexpectedTokenUnexpected token in inputTypo, missing operator, wrong syntax
E1002UnexpectedEofUnexpected end of fileUnclosed brace, missing semicolon at EOF
E1003InvalidSyntaxInvalid syntaxUnsupported Solidity syntax construct
E1004MissingSemicolonMissing semicolonStatement not terminated
E1005MissingBraceMissing braceUnclosed { or extra }
E1006InvalidNumberInvalid number literalMalformed hex, overflow in literal
E1007InvalidStringInvalid string literalUnclosed string, invalid escape sequence
E1008InvalidIdentifierInvalid identifierReserved word used as identifier

TIP

Parse errors must be fixed first. The compiler cannot proceed to semantic analysis or code generation until all parse errors are resolved.

Example: E1005 MissingBrace

error[E1005]: missing closing brace
  --> MyContract.sol:42:1
   |
42 | function transfer(address to, uint256 amount) public {
   |                                                       ^ expected matching '}'

Fix: Ensure every { has a corresponding }. Check for accidentally deleted lines or copy-paste errors.

MIT Licensed