diff options
author | Andreas Kling <kling@serenityos.org> | 2022-03-05 23:49:37 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-05 23:49:37 +0100 |
commit | 72689ce7bd8b4668ad5afd0777e96668c5044eb7 (patch) | |
tree | 08503c3811ae7019fcddd9f2b46830ea58320159 | |
parent | bc0fafade91ee1493ee46b86d4015bf3f9b1e58c (diff) | |
download | serenity-72689ce7bd8b4668ad5afd0777e96668c5044eb7.zip |
LibJS: Add fast_is<PrivateIdentifier>()
-rw-r--r-- | Userland/Libraries/LibJS/AST.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/AST.h b/Userland/Libraries/LibJS/AST.h index 6cdedaf2f0..ec79b117bf 100644 --- a/Userland/Libraries/LibJS/AST.h +++ b/Userland/Libraries/LibJS/AST.h @@ -66,6 +66,7 @@ public: virtual bool is_class_expression() const { return false; } virtual bool is_expression_statement() const { return false; } virtual bool is_identifier() const { return false; } + virtual bool is_private_identifier() const { return false; } virtual bool is_scope_node() const { return false; } virtual bool is_program() const { return false; } virtual bool is_class_declaration() const { return false; } @@ -2090,6 +2091,9 @@ template<> inline bool ASTNode::fast_is<Identifier>() const { return is_identifier(); } template<> +inline bool ASTNode::fast_is<PrivateIdentifier>() const { return is_private_identifier(); } + +template<> inline bool ASTNode::fast_is<ExpressionStatement>() const { return is_expression_statement(); } template<> |