mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #102218 from HolonProduction/dictionary-recovery
GDScript: Do phrase level recovery when parsing faulty dictionaries
This commit is contained in:
commit
bef5d1e4f8
30 changed files with 177 additions and 4 deletions
|
@ -1451,6 +1451,18 @@ private:
|
|||
|
||||
return node;
|
||||
}
|
||||
|
||||
// Allocates a node for patching up the parse tree when an error occurred.
|
||||
// Such nodes don't track their extents as they don't relate to actual tokens.
|
||||
template <typename T>
|
||||
T *alloc_recovery_node() {
|
||||
T *node = memnew(T);
|
||||
node->next = list;
|
||||
list = node;
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
void clear();
|
||||
void push_error(const String &p_message, const Node *p_origin = nullptr);
|
||||
#ifdef DEBUG_ENABLED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue