mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Use type information to enable GDScript introspection
This makes the Script API provide accurate information when requesting property or method info.
This commit is contained in:
parent
4b18c4e448
commit
e3d72d14ff
6 changed files with 129 additions and 98 deletions
|
@ -41,6 +41,7 @@ class GDScriptCompiler {
|
|||
Map<StringName, Ref<GDScript> > class_map;
|
||||
Set<StringName> parsed_classes;
|
||||
Set<StringName> parsing_classes;
|
||||
GDScript *main_script;
|
||||
struct CodeGen {
|
||||
|
||||
GDScript *script;
|
||||
|
@ -142,6 +143,8 @@ class GDScriptCompiler {
|
|||
bool _create_unary_operator(CodeGen &codegen, const GDScriptParser::OperatorNode *on, Variant::Operator op, int p_stack_level);
|
||||
bool _create_binary_operator(CodeGen &codegen, const GDScriptParser::OperatorNode *on, Variant::Operator op, int p_stack_level, bool p_initializer = false);
|
||||
|
||||
GDScriptDataType _gdtype_from_datatype(const GDScriptParser::DataType &p_datatype) const;
|
||||
|
||||
int _parse_assign_right_expression(CodeGen &codegen, const GDScriptParser::OperatorNode *p_expression, int p_stack_level);
|
||||
int _parse_expression(CodeGen &codegen, const GDScriptParser::Node *p_expression, int p_stack_level, bool p_root = false, bool p_initializer = false);
|
||||
Error _parse_block(CodeGen &codegen, const GDScriptParser::BlockNode *p_block, int p_stack_level = 0, int p_break_addr = -1, int p_continue_addr = -1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue