GDScript: Fix "Mismatched external parser" for autoloads #94131
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
./
#94098.MRP: autoload-path-mrp.zip
GDScript makes the assumption that some core APIs (like
Resource.get_path()
,ScriptServer
,AutoloadInfo
) return already simplified paths. I checked the usage and I think this is the most appropriate place to fix the bug.This PR also resolves the inconsistency between
parse()
andparse_binary()
introduced in #871241:godot/modules/gdscript/gdscript_parser.cpp
Lines 358 to 362 in 82cedc8
godot/modules/gdscript/gdscript_parser.cpp
Lines 415 to 417 in 82cedc8
Footnotes
Formally, the bug was introduced in GDScript: Reintroduce binary tokenization on export #87634, since it was merged 1 day later. In any case, I think this is an accidental mistake due to parallel development. ↩