-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge: PR #6 from 4-ast-extractor-vyper into dev
feat: final version ast extractor
- Loading branch information
Showing
11 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import json | ||
import subprocess | ||
|
||
def filepath_vyper_to_ast(file_path): | ||
try: | ||
result = subprocess.run( | ||
['vyper', '-f', 'ast', file_path], | ||
capture_output=True, | ||
text=True, | ||
check=True | ||
) | ||
ast = json.loads(result.stdout) | ||
return ast | ||
except subprocess.CalledProcessError as e: | ||
print(f"Error compiling Vyper code: {e.stderr}") | ||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[tool.poetry] | ||
name = "ast-extractor" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["0xtekgrinder <[email protected]>"] | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
|
||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
Empty file.
Empty file.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[tool.poetry] | ||
name = "servers" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["0xtekgrinder <[email protected]>"] | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
ast-extractor = {path = "../../libs/ast-extractor"} | ||
|
||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
Empty file.
Empty file.
Empty file.