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

Query names #37

Open
d-winsor opened this issue Jun 12, 2020 · 0 comments
Open

Query names #37

d-winsor opened this issue Jun 12, 2020 · 0 comments

Comments

@d-winsor
Copy link
Contributor

Given that names are internalized there is no easy way for users to use some of the efficient lookup methods that depend on them.

For example if the user has a namespace scope and wants to check if it has a function name "foo" they would need to iterate through the entire scope comparing the strings of each Overload's ipr::Name.

Something like the ability to query these internalize names so they can be used would be helpful:

class Lexicon {
  …
  Optional<String> query_string(std::string_view) const;
  Optional<Identifier> query_identifier(std::string_view) const;
  Optional<Operator> query_opterator(std::string_view) const;
}
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

No branches or pull requests

1 participant