1fad3a1d3Sopenharmony_ciuse syn_codegen::{Definitions, Node}; 2fad3a1d3Sopenharmony_ci 3fad3a1d3Sopenharmony_cipub fn node<'a>(defs: &'a Definitions, name: &str) -> &'a Node { 4fad3a1d3Sopenharmony_ci for node in &defs.types { 5fad3a1d3Sopenharmony_ci if node.ident == name { 6fad3a1d3Sopenharmony_ci return node; 7fad3a1d3Sopenharmony_ci } 8fad3a1d3Sopenharmony_ci } 9fad3a1d3Sopenharmony_ci panic!("not found: {}", name) 10fad3a1d3Sopenharmony_ci} 11