Update Selection.

This commit is contained in:
ykiko
2024-10-04 21:57:36 +08:00
parent 8e967debea
commit 9457eb9597
2 changed files with 143 additions and 17 deletions

View File

@@ -3,29 +3,21 @@
namespace clice {
// Code Action:
// add implementation in cpp file(important).
// extract implementation to cpp file(important).
// generate virtual function declaration(full qualified?).
// generate c++20 coroutine and awaiter interface.
// expand macro(one step by step).
// invert if.
class SelectionTree {
public:
enum Selection {
Unselected,
Partial,
Complete,
};
struct Node {
Node* parent;
llvm::SmallVector<const Node*> children;
clang::DynTypedNode ASTNode;
};
const Node* commonAncestor() const;
const Node& root() const;
SelectionTree(clang::ASTContext& context, const clang::syntax::TokenBuffer& tokens, unsigned start, unsigned end);
private:
std::deque<Node> m_Nodes;
const Node* m_Root;
};
} // namespace clice