mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03: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: https://github.com/SerenityOS/serenity/commit/c27f91142de
@ -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…
Reference in New Issue
Block a user