File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ sourceUnitObject.imports # []
6767sourceUnitObject.pragmas # []
6868sourceUnitObject.contracts.keys() # get all contract names
6969sourceUnitObject.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
Original file line number Diff line number Diff 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 "
2222name = "solidity-parser"
2323
2424setup (
Original file line number Diff line number Diff line change 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 ])
You can’t perform that action at this time.
0 commit comments