ConsenSysMesh / ConsenSysMesh/solidity-parser

Modifier arguments should allow ExpressionStatements

Open
#27 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
136
Forks
50
PR merge metrics
No merged PRs in 30d

Description

This fails to parse:

```
pragma solidity ^0.4.4;

contract A {
function yes() public constant returns(bool) {
return true;
}
}

contract MyContract {
A a;
modifier only(bool b) { _; }
function foo() only(a.yes()) {
}
}
```

If `a.yes()` is replaced with `true` it parses fine.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the parser failure with the Solidity snippet in the issue, then trace how modifier arguments handle `a.yes()` compared with `true`. Done means the expression-statement argument parses successfully without regressing the existing `true` case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, solidity
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.