summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCpp/Parser.h
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-03-12 15:28:30 +0200
committerAndreas Kling <kling@serenityos.org>2021-03-13 10:17:02 +0100
commit97f2cd596b6cde2a9781fe176b0f06db9c740900 (patch)
tree376c1186fe087df215b3e3d0296e37df87d6b97f /Userland/Libraries/LibCpp/Parser.h
parent26d9485562f90dd6ea750ba1206d0793395fb4d2 (diff)
downloadserenity-97f2cd596b6cde2a9781fe176b0f06db9c740900.zip
LibCpp: Remove node_span_size, add index_of_node_at
Diffstat (limited to 'Userland/Libraries/LibCpp/Parser.h')
-rw-r--r--Userland/Libraries/LibCpp/Parser.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Libraries/LibCpp/Parser.h b/Userland/Libraries/LibCpp/Parser.h
index 789f0618aa..c78a901320 100644
--- a/Userland/Libraries/LibCpp/Parser.h
+++ b/Userland/Libraries/LibCpp/Parser.h
@@ -45,6 +45,7 @@ public:
RefPtr<ASTNode> eof_node() const;
RefPtr<ASTNode> node_at(Position) const;
+ Optional<size_t> index_of_node_at(Position) const;
Optional<Token> token_at(Position) const;
RefPtr<const TranslationUnit> root_node() const { return m_root_node; }
StringView text_of_node(const ASTNode&) const;
@@ -135,8 +136,6 @@ private:
void error(StringView message = {});
- size_t node_span_size(const ASTNode& node) const;
-
template<class T, class... Args>
NonnullRefPtr<T>
create_ast_node(ASTNode& parent, const Position& start, Optional<Position> end, Args&&... args)