duaraghav8 / Ethlint

(Formerly Solium) Code quality & Security Linter for Solidity
https://ethlint.readthedocs.io/en/latest/
MIT License
927 stars 128 forks source link

using a Library 'for' causes SyntaxError #10

Closed elenadimitrova closed 8 years ago

elenadimitrova commented 8 years ago

Having a

using LibraryContract **for** someDataType;

As described here http://solidity.readthedocs.io/en/latest/contracts.html?#using-for

causes a SyntaxError:

Error: An error occured while parsing the source code:
SyntaxError: Expected "!=", "!==", "%", "%=", "&", "&&", "&=", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", "/", "/*", "//", "/=", ";", "<", "<<", "<<=", "<=", "=", "==", "===", ">", ">=", ">>", ">>=", ">>>", ">>>=", "?", "^", "^=", "in", "instanceof", "|", "|=", "||", comment, end of line or whitespace but "f" found. Line: 25, Column: 21
An error occured while running the linter on /MyContract.sol:
duaraghav8 commented 8 years ago

This occurs because solparse (the library being used internally for creating the code's AST) doesn't expect for at that position, the grammar is not in sync with latest Solidity version). I'll fix it and notify you once I make the new release.

Thanks for reporting this :)

duaraghav8 commented 8 years ago

Solved in v0.1.11