MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / Local

Class Local

modules/gdscript/gdscript_parser.h:1100–1170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1098 SuiteNode *parent_block = nullptr;
1099 Vector<Node *> statements;
1100 struct Local {
1101 enum Type {
1102 UNDEFINED,
1103 CONSTANT,
1104 VARIABLE,
1105 PARAMETER,
1106 FOR_VARIABLE,
1107 PATTERN_BIND,
1108 };
1109 Type type = UNDEFINED;
1110 union {
1111 ConstantNode *constant = nullptr;
1112 VariableNode *variable;
1113 ParameterNode *parameter;
1114 IdentifierNode *bind;
1115 };
1116 StringName name;
1117 FunctionNode *source_function = nullptr;
1118
1119 int start_line = 0, end_line = 0;
1120 int start_column = 0, end_column = 0;
1121
1122 DataType get_datatype() const;
1123 String get_name() const;
1124
1125 Local() {}
1126 Local(ConstantNode *p_constant, FunctionNode *p_source_function) {
1127 type = CONSTANT;
1128 constant = p_constant;
1129 name = p_constant->identifier->name;
1130 source_function = p_source_function;
1131
1132 start_line = p_constant->start_line;
1133 end_line = p_constant->end_line;
1134 start_column = p_constant->start_column;
1135 end_column = p_constant->end_column;
1136 }
1137 Local(VariableNode *p_variable, FunctionNode *p_source_function) {
1138 type = VARIABLE;
1139 variable = p_variable;
1140 name = p_variable->identifier->name;
1141 source_function = p_source_function;
1142
1143 start_line = p_variable->start_line;
1144 end_line = p_variable->end_line;
1145 start_column = p_variable->start_column;
1146 end_column = p_variable->end_column;
1147 }
1148 Local(ParameterNode *p_parameter, FunctionNode *p_source_function) {
1149 type = PARAMETER;
1150 parameter = p_parameter;
1151 name = p_parameter->identifier->name;
1152 source_function = p_source_function;
1153
1154 start_line = p_parameter->start_line;
1155 end_line = p_parameter->end_line;
1156 start_column = p_parameter->start_column;
1157 end_column = p_parameter->end_column;

Callers 2

parse_forMethod · 0.85
add_localMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected