virtualx-engine/modules/gdscript
Kirill Diduk 52507443d3 Check duplicate keys in dictionary literals: enums and const variables
Check identifiers (const variables and unnamed enums) and named
enums when parsing dictionary literals whether the keys are not
duplicated.

In case of duplicate key is encountered, highlight the line with it
and print error message:
`Duplicate key "foo" found in Dictionary literal`

This commit is a logical continuation of the commit dab73c7 which
implemented such checks only for literal keys (which fixed #7034).

Apart from that, this commit also fixes the issue with the error
message itself, which was shown one line below the duplicated key
in case it was the last one in the dictionary literal and there
was no hanging comma.

Also, the format of the error message has been changed so that now
the error message also contains the value of the key which is duplicated.
Instead of `Duplicate key found in Dictionary literal`, it now prints
`Duplicate key "<value>" found in Dictionary literal`

Fixes #50971
2024-03-25 00:07:51 +01:00
..
doc_classes Fix image links to godot-docs repository 2023-11-05 16:53:53 +08:00
editor One Copyright Update to rule them all 2023-01-10 15:26:54 +01:00
icons Add support for creating editor icons per module 2019-06-28 23:42:26 +03:00
language_server [3.x] Add --lsp-port as a command line argument 2023-09-20 23:59:50 -05:00
config.py SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
gdscript.cpp [3.x] GDScript: Fix get_method_list for custom functions 2024-02-07 10:10:32 +03:00
gdscript.h One Copyright Update to rule them all 2023-01-10 15:26:54 +01:00
gdscript_compiler.cpp [3.x] GDScript: Fix get_method_list for custom functions 2024-02-07 10:10:32 +03:00
gdscript_compiler.h One Copyright Update to rule them all 2023-01-10 15:26:54 +01:00
gdscript_editor.cpp Suggest class_name in 3.x autocompletion. 2023-04-22 16:29:14 +02:00
gdscript_function.cpp One Copyright Update to rule them all 2023-01-10 15:26:54 +01:00
gdscript_function.h [3.x] GDScript: Fix get_method_list for custom functions 2024-02-07 10:10:32 +03:00
gdscript_functions.cpp One Copyright Update to rule them all 2023-01-10 15:26:54 +01:00
gdscript_functions.h One Copyright Update to rule them all 2023-01-10 15:26:54 +01:00
gdscript_parser.cpp Check duplicate keys in dictionary literals: enums and const variables 2024-03-25 00:07:51 +01:00
gdscript_parser.h Check duplicate keys in dictionary literals: enums and const variables 2024-03-25 00:07:51 +01:00
gdscript_tokenizer.cpp Use hash table for GDScript parsing 2023-03-12 14:55:31 +00:00
gdscript_tokenizer.h Use hash table for GDScript parsing 2023-03-12 14:55:31 +00:00
register_types.cpp One Copyright Update to rule them all 2023-01-10 15:26:54 +01:00
register_types.h One Copyright Update to rule them all 2023-01-10 15:26:54 +01:00
SCsub SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00