You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parser needs to be updated from solidity-parser-sc to solidity-parser-antlr or another parser that supports abstract contract syntax. I'm not actively working on this project any more but I would be happy to accept a PR.
`
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
}
`
Parse error
{ SyntaxError: Expected "contract", "import", "interface", "library", "pragma", comment, end of input, end of line, or whitespace but "a" found. Line: 20, Column: 1
at peg$buildStructuredError (/usr/local/lib/node_modules/solgraph/node_modules/solidity-parser-sc/build/parser.js:1376:12)
at Object.peg$parse [as parse] (/usr/local/lib/node_modules/solgraph/node_modules/solidity-parser-sc/build/parser.js:15723:11)
at Object.parse (/usr/local/lib/node_modules/solgraph/node_modules/solidity-parser-sc/index.js:34:23)
at _default (/usr/local/lib/node_modules/solgraph/dist/index.js:91:21)
at /usr/local/lib/node_modules/solgraph/dist/bin.js:29:37
message:
'Expected "contract", "import", "interface", "library", "pragma", comment, end of input, end of line, or whitespace but "a" found. Line: 20, Column: 1',
expected:
[ { type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: 'pragma', ignoreCase: false },
{ type: 'literal', text: 'pragma', ignoreCase: false },
{ type: 'literal', text: 'pragma', ignoreCase: false },
{ type: 'literal', text: 'import', ignoreCase: false },
{ type: 'literal', text: 'import', ignoreCase: false },
{ type: 'literal', text: 'import', ignoreCase: false },
{ type: 'literal', text: 'contract', ignoreCase: false },
{ type: 'literal', text: 'interface', ignoreCase: false },
{ type: 'literal', text: 'library', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'end' } ],
found: 'a',
location:
{ start: { offset: 290, line: 20, column: 1 },
end: { offset: 291, line: 20, column: 2 } },
name: 'SyntaxError' }
The text was updated successfully, but these errors were encountered: