ConsenSysDiligence / ConsenSysDiligence/python-solidity-parser

Feature Request: Get object's raw source

Aperta
#21 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
145
Fork
40
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi,

How are you? Thanks of all, thanks for doing the port of the tool, I was thinking of doing it myself and I found someone else did it :smile:

I was wondering if there was a way to get the raw source of an objects, let's say a contract or function.

I was thinking in something like:

```
sourceUnitObject = parser.objectify(sourceUnit)
raw_text = sourceUnitObject.contracts['MyContract'].raw
print(raw_text)
>>'contract MyContract { ..'
```

Thanks!

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.