You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
GDScript: Do phrase level recovery when parsing faulty dictionaries
This commit is contained in:
@@ -1453,6 +1453,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
|
||||
|
||||
Reference in New Issue
Block a user