diff options
author | Danil Alexeev <danil@alexeev.xyz> | 2023-07-29 19:24:48 +0300 |
---|---|---|
committer | Danil Alexeev <danil@alexeev.xyz> | 2023-07-29 19:24:48 +0300 |
commit | ae42c23e09965d73c8eb22efbb51e8de5afc5ada (patch) | |
tree | 791e322b9f7fc90096c9cd436b702da2e7bd23cb /modules/gdscript/editor/gdscript_translation_parser_plugin.h | |
parent | 031aa99d313ceec7cdb8263957d22cae10de0b95 (diff) | |
download | redot-engine-ae42c23e09965d73c8eb22efbb51e8de5afc5ada.tar.gz |
GDScript: Add constant string support for POT generator
Diffstat (limited to 'modules/gdscript/editor/gdscript_translation_parser_plugin.h')
-rw-r--r-- | modules/gdscript/editor/gdscript_translation_parser_plugin.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/gdscript/editor/gdscript_translation_parser_plugin.h b/modules/gdscript/editor/gdscript_translation_parser_plugin.h index 421030e49a..580c2a80cd 100644 --- a/modules/gdscript/editor/gdscript_translation_parser_plugin.h +++ b/modules/gdscript/editor/gdscript_translation_parser_plugin.h @@ -53,15 +53,17 @@ class GDScriptEditorTranslationParserPlugin : public EditorTranslationParserPlug StringName fd_set_filter = "set_filters"; StringName fd_filters = "filters"; + static bool _is_constant_string(const GDScriptParser::ExpressionNode *p_expression); + void _traverse_class(const GDScriptParser::ClassNode *p_class); void _traverse_function(const GDScriptParser::FunctionNode *p_func); void _traverse_block(const GDScriptParser::SuiteNode *p_suite); void _read_variable(const GDScriptParser::VariableNode *p_var); - void _assess_expression(GDScriptParser::ExpressionNode *p_expression); - void _assess_assignment(GDScriptParser::AssignmentNode *p_assignment); - void _extract_from_call(GDScriptParser::CallNode *p_call); - void _extract_fd_literals(GDScriptParser::ExpressionNode *p_expression); + void _assess_expression(const GDScriptParser::ExpressionNode *p_expression); + void _assess_assignment(const GDScriptParser::AssignmentNode *p_assignment); + void _extract_from_call(const GDScriptParser::CallNode *p_call); + void _extract_fd_constant_strings(const GDScriptParser::ExpressionNode *p_expression); public: virtual Error parse_file(const String &p_path, Vector<String> *r_ids, Vector<Vector<String>> *r_ids_ctx_plural) override; |