Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

Implement Vyper AST#291

Closed
iFrostizz wants to merge 13 commits intofoundry-rs:mainfrom
iFrostizz:vyper_ast
Closed

Implement Vyper AST#291
iFrostizz wants to merge 13 commits intofoundry-rs:mainfrom
iFrostizz:vyper_ast

Conversation

@iFrostizz
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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 thread crates/artifacts/vyper/src/ast/visitor.rs Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@zerosnacks zerosnacks closed this Apr 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants