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

Method get_functions

editor/script/script_text_editor.cpp:134–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132////////////////////////////////////////////////////////////////////////////////
133
134Vector<String> ScriptTextEditor::get_functions() {
135 CodeEdit *te = code_editor->get_text_editor();
136 String text = te->get_text();
137 List<String> fnc;
138
139 if (script->get_language()->validate(text, script->get_path(), &fnc)) {
140 //if valid rewrite functions to latest
141 functions.clear();
142 for (const String &E : fnc) {
143 functions.push_back(E);
144 }
145 }
146
147 return functions;
148}
149
150void ScriptTextEditor::apply_code() {
151 if (script.is_null()) {

Callers

nothing calls this directly

Calls 7

get_text_editorMethod · 0.80
get_textMethod · 0.45
validateMethod · 0.45
get_languageMethod · 0.45
get_pathMethod · 0.45
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected