MCPcopy Create free account
hub / github.com/PerroEngine/Perro / index_script_source

Function index_script_source

perro_source/devtools/perro_cli/src/doctor.rs:803–834  ·  view source on GitHub ↗
(text: &str, index: &mut ScriptDoctorIndex)

Source from the content-addressed store, hash-verified

801 doc: &SceneDoc,
802 index: &ScriptDoctorIndex,
803 report: &mut ValidationReport,
804) {
805 let node_types = doc
806 .scene
807 .nodes
808 .iter()
809 .map(|node| {
810 (
811 doc.scene.key_name_or_id(node.key).to_string(),
812 node.data.node_type,
813 )
814 })
815 .collect::<HashMap<_, _>>();
816 for node in doc.scene.nodes.iter() {
817 let node_name = doc.scene.key_name_or_id(node.key).to_string();
818 let script_defs = node
819 .script
820 .as_deref()
821 .and_then(|raw| resolve_script_virtual_ref_path(project_dir, file, raw))
822 .and_then(|path| index.script_state_field_defs.get(&path));
823 let mut ctx = NodeRefValidationCtx {
824 project_dir,
825 file,
826 node_types: &node_types,
827 report,
828 };
829 validate_builtin_node_ref_fields(&mut ctx, &node_name, &node.data);
830 validate_script_var_node_ref_fields(
831 &mut ctx,
832 &node_name,
833 node.script.as_deref(),
834 node.script_vars.as_ref(),
835 script_defs,
836 index,
837 );

Calls 9

parse_struct_namesFunction · 0.85
parse_enum_namesFunction · 0.85
parse_enum_fieldsFunction · 0.85
parse_state_struct_namesFunction · 0.85
cloneMethod · 0.80
parse_struct_fieldsFunction · 0.70
is_emptyMethod · 0.45
insertMethod · 0.45