ConsenSysDiligence / ConsenSysDiligence/python-solidity-parser

Feature Request: Get object's raw source

Đang mở
#21 2 bình luận 2 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
145
Fork
40
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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!

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.