Skip to content

Commit 72689ce

Browse files
committed
LibJS: Add fast_is<PrivateIdentifier>()
1 parent bc0fafa commit 72689ce

File tree

1 file changed

+4
-0
lines changed
  • Userland/Libraries/LibJS

1 file changed

+4
-0
lines changed

Userland/Libraries/LibJS/AST.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class ASTNode : public RefCounted<ASTNode> {
6666
virtual bool is_class_expression() const { return false; }
6767
virtual bool is_expression_statement() const { return false; }
6868
virtual bool is_identifier() const { return false; }
69+
virtual bool is_private_identifier() const { return false; }
6970
virtual bool is_scope_node() const { return false; }
7071
virtual bool is_program() const { return false; }
7172
virtual bool is_class_declaration() const { return false; }
@@ -2089,6 +2090,9 @@ inline bool ASTNode::fast_is<ClassExpression>() const { return is_class_expressi
20892090
template<>
20902091
inline bool ASTNode::fast_is<Identifier>() const { return is_identifier(); }
20912092

2093+
template<>
2094+
inline bool ASTNode::fast_is<PrivateIdentifier>() const { return is_private_identifier(); }
2095+
20922096
template<>
20932097
inline bool ASTNode::fast_is<ExpressionStatement>() const { return is_expression_statement(); }
20942098

0 commit comments

Comments
 (0)