Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing of solidity 0.5 contract fails #39

Closed
MariusVanDerWijden opened this issue Jan 29, 2019 · 2 comments
Closed

Parsing of solidity 0.5 contract fails #39

MariusVanDerWijden opened this issue Jan 29, 2019 · 2 comments
Labels

Comments

@MariusVanDerWijden
Copy link

Thank you for this tool!
I'm currently testing some new contracts with them and get a SyntaxError after the calldata token
I think the parser just does not expect a calldata token between the type and the name.

The contract code (line 139):
bytes calldata _sigA, bytes calldata _sigB) external
The error:
Parse error { SyntaxError: Expected ")", ",", comment, end of line, or whitespace but "_" found. Line: 139, Column: 24 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:83:21) at /usr/local/lib/node_modules/solgraph/dist/bin.js:29:34 at <anonymous> message: 'Expected ")", ",", comment, end of line, or whitespace but "_" found. Line: 139, Column: 24', expected: [ { type: 'other', description: 'whitespace' }, { type: 'other', description: 'end of line' }, { type: 'other', description: 'comment' }, { type: 'literal', text: ',', ignoreCase: false }, { type: 'other', description: 'whitespace' }, { type: 'other', description: 'end of line' }, { type: 'other', description: 'comment' }, { type: 'literal', text: ')', ignoreCase: false }, { type: 'other', description: 'whitespace' }, { type: 'other', description: 'end of line' }, { type: 'other', description: 'comment' }, { type: 'literal', text: ',', ignoreCase: false }, { type: 'other', description: 'whitespace' }, { type: 'other', description: 'end of line' }, { type: 'other', description: 'comment' }, { type: 'literal', text: ')', ignoreCase: false }, { type: 'other', description: 'whitespace' }, { type: 'other', description: 'end of line' }, { type: 'other', description: 'comment' }, { type: 'literal', text: ',', ignoreCase: false }, { type: 'other', description: 'whitespace' }, { type: 'other', description: 'end of line' }, { type: 'other', description: 'comment' }, { type: 'literal', text: ')', ignoreCase: false }, { type: 'other', description: 'whitespace' }, { type: 'other', description: 'end of line' }, { type: 'other', description: 'comment' }, { type: 'literal', text: ',', ignoreCase: false }, { type: 'other', description: 'whitespace' }, { type: 'other', description: 'end of line' }, { type: 'other', description: 'comment' }, { type: 'literal', text: ')', ignoreCase: false } ], found: '_', location: { start: { offset: 5047, line: 139, column: 24 }, end: { offset: 5048, line: 139, column: 25 } }, name: 'SyntaxError' }

@raineorshine
Copy link
Owner

The parser needs to be updated from solidity-parser-sc to solidity-parser-antlr. I don't have the time unfortunately but I would be happy to support a PR from anyone who is interested in contributing.

@raineorshine
Copy link
Owner

Should be fixed in v1.0.0 thanks to @yellowBirdy.

If it still doesn't work, please post your solidity file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants