Skip to content

Implement Vyper AST #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Implement Vyper AST #291

wants to merge 13 commits into from

Conversation

iFrostizz
Copy link

TODO

@iFrostizz iFrostizz changed the title Implement Vyper ast Implement Vyper AST Jul 19, 2025
@iFrostizz iFrostizz marked this pull request as draft July 19, 2025 05:44
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool,

how complete is that?

@iFrostizz iFrostizz marked this pull request as ready for review July 25, 2025 16:01
@iFrostizz
Copy link
Author

iFrostizz commented Jul 25, 2025

@mattsse almost ready, just missing the Dict node.
edit: ready!

@iFrostizz iFrostizz requested a review from mattsse July 26, 2025 03:16
Comment on lines +12 to +19
source_sha256sum: Option<String>,
name: Option<String>,
path: Option<String>,
resolved_path: Option<String>,
source_id: Option<i32>,
is_interface: Option<bool>,
doc_string: Option<DocStr>,
settings: Option<Settings>,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have all of these Option in latest Vyper versions, this is from old ones which didn't had much information in the module AST node.

RShift,
);

basic_vyper_nodes!(Add, Sub, Mult, Div, FloorDiv, Mod, Pow, BitAnd, BitOr, BitXor, LShift, RShift);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is less verbose than writing

vyper_node!(struct Add {});

vyper_nodes!(strutc Sub {});

vyper_nodes!(struct Mult);

// ...

@iFrostizz
Copy link
Author

It's gonna need some more work because old versions are missing a bunch of fields, it looks okay for >=0.4.0 though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants