LibXML: Record source location for nodes

This commit is contained in:
Dan Klishch 2023-08-14 21:56:20 -04:00 committed by Ali Mohammad Pur
commit 6368e6ca12
Notes: sideshowbarker 2024-07-17 04:57:23 +09:00
3 changed files with 72 additions and 20 deletions

View file

@ -19,6 +19,12 @@ struct Attribute {
DeprecatedString value;
};
struct Offset {
size_t offset { 0 };
size_t line { 0 };
size_t column { 0 };
};
struct Node {
struct Text {
StringBuilder builder;
@ -34,6 +40,7 @@ struct Node {
bool operator==(Node const&) const;
Offset offset;
Variant<Text, Comment, Element> content;
Node* parent { nullptr };