solang-parser 0.2.1

Solang Solidity Parser
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
contract C {
    function g(bool x) public pure {
        assert(x);
    }
    function f(bool x) public returns (uint) {
        // Set the gas to make this work on pre-byzantium VMs
        try this.g{gas: 8000}(x) {
            return 1;
        } catch {
            return 2;
        }
    }
}
// ====
// compileViaYul: also
// ----
// f(bool): true -> 1
// f(bool): false -> 2