mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 18:17:23 +00:00
LibJS: Add ScopeNode accessors for declaration counts
This commit is contained in:
parent
7de2a84cd4
commit
c27f91142d
Notes:
sideshowbarker
2024-07-18 02:55:58 +09:00
Author: https://github.com/awesomekling
Commit: c27f91142d
1 changed files with 3 additions and 0 deletions
|
@ -190,6 +190,9 @@ public:
|
|||
[[nodiscard]] bool has_lexical_declarations() const { return !m_lexical_declarations.is_empty(); }
|
||||
[[nodiscard]] bool has_var_declarations() const { return !m_var_declarations.is_empty(); }
|
||||
|
||||
[[nodiscard]] size_t var_declaration_count() const { return m_var_declarations.size(); }
|
||||
[[nodiscard]] size_t lexical_declaration_count() const { return m_lexical_declarations.size(); }
|
||||
|
||||
void for_each_lexically_scoped_declaration(IteratorOrVoidFunction<Declaration const&>&& callback) const;
|
||||
void for_each_lexically_declared_name(IteratorOrVoidFunction<FlyString const&>&& callback) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue