ConsenSysDiligence / ConsenSysDiligence/python-solidity-parser

Feature Request: Get object's raw source

オープン
#21 コメント 2 件 リアクション 2 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
145
フォーク
40
PR マージ指標
30日以内にマージされた PR はありません

説明

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!

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。