Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #788 from LefterisJP/rebased_solidity_interface
Browse files Browse the repository at this point in the history
solidity_names() recognizes interface
  • Loading branch information
joeykrug authored Aug 17, 2017
2 parents 40a4a55 + d1bdcc7 commit 44848f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ethereum/tools/_solidity.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ def solidity_names(code): # pylint: disable=too-many-branches
if result:
names.append(('contract', result.groups()[0]))

if char == 'i' and code[pos: pos + 9] == 'interface':
result = re.match('^interface[^_$a-zA-Z]+([_$a-zA-Z][_$a-zA-Z0-9]*)', code[pos:])

if result:
names.append(('contract', result.groups()[0]))


if char == 'l' and code[pos: pos + 7] == 'library':
result = re.match('^library[^_$a-zA-Z]+([_$a-zA-Z][_$a-zA-Z0-9]*)', code[pos:])

Expand Down

0 comments on commit 44848f5

Please sign in to comment.