Skip to content
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

[Feature] Document impact of Solidity item visibility #254

Open
Tracked by #74
DaniPopes opened this issue Aug 30, 2023 · 0 comments
Open
Tracked by #74

[Feature] Document impact of Solidity item visibility #254

DaniPopes opened this issue Aug 30, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request invalid This doesn't seem right

Comments

@DaniPopes
Copy link
Member

Component

sol! macro

Describe the feature you would like

Currently this is ignored, except for state variables:

fn visit_items(items: &mut Vec<Item>) {
// add a getter function for each public variable
let mut functions = Vec::new();
for (i, item) in items.iter().enumerate() {
match item {
Item::Variable(var) => {
if matches!(
var.attributes.visibility(),
Some(ast::Visibility::Public(_) | ast::Visibility::External(_))
) {
functions.push((i + 1, ItemFunction::from_variable_definition(var)));
}
}
_ => {}
}
}

Additional context

  • Should we ignore it always?
  • Should we also take it into account for functions and other items?
    cc @prestwich
@DaniPopes DaniPopes added documentation Improvements or additions to documentation enhancement New feature or request invalid This doesn't seem right labels Aug 30, 2023
@DaniPopes DaniPopes mentioned this issue Sep 19, 2023
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant