ConsenSysMesh / solidity-parser

Solidity Parser in Javascript
137 stars 53 forks source link

Misc improvements to parser #23

Closed federicobond closed 7 years ago

federicobond commented 7 years ago

Each commit message explains the change.

These have all been tested against a sizeable spec, so they shouldn't introduce any regressions.

raineorshine commented 7 years ago

Fails to parse an AssignmentExpression in SourceElement:

pragma solidity ^0.4.4;

contract MyContract {
  bool locked = false;
}
federicobond commented 7 years ago

Hi Raine, thanks for testing and reporting. I fixed the problem in the last commit.

tcoulter commented 7 years ago

@federicobond This looks good. Do these improvements add features to what can be parsed, or is it a general grammar reorganization / cleanup? If features are added (such as "we can now parse x", where x is some new expression or construct) then please add that construct to https://github.com/ConsenSys/solidity-parser/blob/master/test/doc_examples.sol so the tests will catch it.

tcoulter commented 7 years ago

Otherwise @federicobond, great work and glad to have you working on this.

federicobond commented 7 years ago

Updated tests and rebuilt parser.