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

Method has_class

modules/gdscript/gdscript_parser.cpp:839–847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

837}
838
839bool GDScriptParser::has_class(const GDScriptParser::ClassNode *p_class) const {
840 if (head->fqcn.is_empty() && p_class->fqcn.get_slice("::", 0).is_empty()) {
841 return p_class == head;
842 } else if (p_class->fqcn.begins_with(head->fqcn)) {
843 return find_class(p_class->fqcn.trim_prefix(head->fqcn)) == p_class;
844 }
845
846 return false;
847}
848
849GDScriptParser::ClassNode *GDScriptParser::parse_class(bool p_is_static) {
850 ClassNode *n_class = alloc_node<ClassNode>();

Callers

nothing calls this directly

Calls 4

get_sliceMethod · 0.80
begins_withMethod · 0.80
trim_prefixMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected