1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:37:35 +00:00

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
parent 3556c27d2d
commit 6368e6ca12
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 };