pandemonium_engine/modules/gdscript
Kirill Diduk 1a231787b0 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-04-14 16:37:55 +02:00
..
doc_classes Re-extracted class docs. 2024-02-25 10:26:26 +01:00
editor File copyright header updates pt7. 2023-12-18 00:02:58 +01:00
icons Added godot with all my currently used engine modules. 2022-03-15 13:29:32 +01:00
language_server File copyright header updates pt7. 2023-12-18 00:02:58 +01:00
config.py Added godot with all my currently used engine modules. 2022-03-15 13:29:32 +01:00
gdscript_compiler.cpp GDScript: Fix get_method_list for custom functions 2024-02-08 14:50:56 +01:00
gdscript_compiler.h File copyright header updates pt7. 2023-12-18 00:02:58 +01:00
gdscript_editor.cpp File copyright header updates pt7. 2023-12-18 00:02:58 +01:00
gdscript_function.cpp File copyright header updates pt7. 2023-12-18 00:02:58 +01:00
gdscript_function.h GDScript: Fix get_method_list for custom functions 2024-02-08 14:50:56 +01:00
gdscript_functions.cpp File copyright header updates pt7. 2023-12-18 00:02:58 +01:00
gdscript_functions.h File copyright header updates pt7. 2023-12-18 00:02:58 +01:00
gdscript_parser.cpp Check duplicate keys in dictionary literals: enums and const variables 2024-04-14 16:37:55 +02:00
gdscript_parser.h Check duplicate keys in dictionary literals: enums and const variables 2024-04-14 16:37:55 +02:00
gdscript_tokenizer.cpp File copyright header updates pt7. 2023-12-18 00:02:58 +01:00
gdscript_tokenizer.h File copyright header updates pt7. 2023-12-18 00:02:58 +01:00
gdscript.cpp GDScript: Fix get_method_list for custom functions 2024-02-08 14:50:56 +01:00
gdscript.h Added get_global_class_name method to Script. Now GDScriptParser uses this first to determine global class names, instead of parsing the script file again. 2024-02-13 20:09:46 +01:00
register_types.cpp File copyright header updates pt7. 2023-12-18 00:02:58 +01:00
register_types.h File copyright header updates pt7. 2023-12-18 00:02:58 +01:00
SCsub Fix build when the jsonrpc module is disabled. 2023-12-24 00:02:22 +01:00