Implement XMLParser.get_current_line()

This commit is contained in:
kobewi
2022-07-05 01:23:04 +02:00
parent 100d223736
commit 415c7dda37
3 changed files with 31 additions and 26 deletions

View File

@ -68,6 +68,7 @@ private:
char *data = nullptr;
char *P = nullptr;
uint64_t length = 0;
uint64_t current_line = 0;
String node_name;
bool node_empty = false;
NodeType node_type = NODE_NONE;
@ -88,6 +89,13 @@ private:
void _parse_opening_xml_element();
void _parse_current_node();
_FORCE_INLINE_ void next_char() {
if (*P == '\n') {
current_line++;
}
P++;
}
static void _bind_methods();
public:
@ -113,7 +121,6 @@ public:
void close();
XMLParser();
~XMLParser();
};