Skip to content

Commit f4f30c2

Browse files
committedMay 29, 2019
prepare 0.0.5
expose visibility and stateMutability for FunctionObjects
1 parent 2ec3a2a commit f4f30c2

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed
 

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ sourceUnitObject.imports # []
6767
sourceUnitObject.pragmas # []
6868
sourceUnitObject.contracts.keys() # get all contract names
6969
sourceUnitObject.contracts["contractName"].functions.keys() # get all functions in contract: "contractName"
70+
sourceUnitObject.contracts["contractName"].functions["myFunction"].visibility # get "myFunction"s visibility (or stateMutability)
7071
```
7172

7273

‎setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def read(fname):
1818
return open(os.path.join(os.path.dirname(__file__), fname)).read()
1919

2020

21-
version = "0.0.4"
21+
version = "0.0.5"
2222
name = "solidity-parser"
2323

2424
setup(

‎solidity_parser/__main__.py

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
if not len(sys.argv)>2 or sys.argv[1] not in ("parse","outline"):
1010
print("\n- missing subcommand or path to solidity file.\n")
1111
print("#> python -m solidity_parser <subcommand> <solidity file>")
12+
print("")
13+
print("\t subcommands:")
14+
print("\t\t parse ... print the parsetree for the sourceUnit")
15+
print("\t\t outline ... print a high level outline of the sourceUnit")
1216
sys.exit(1)
1317

1418
node = parser.parse_file(sys.argv[2])

0 commit comments

Comments
 (0)
Failed to load comments.