MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / get_var_decl_name

Method get_var_decl_name

src/ast/kind.rs:98–109  ·  view source on GitHub ↗

get the var declaration of this var, e.g., const char* name.

(&self)

Source from the content-addressed store, hash-verified

96
97 /// get the var declaration of this var, e.g., const char* name.
98 pub fn get_var_decl_name(&self) -> String {
99 let mut ty = self.get_type().get_type_name();
100 let name = self.get_name_as_string();
101 if let Some(pos) = ty.find('[') {
102 ty.insert(pos, ' ');
103 ty.insert_str(pos + 1, &name);
104 return ty;
105 }
106 ty.push(' ');
107 ty.push_str(&name);
108 ty
109 }
110}
111
112#[derive(Deserialize, Debug, Clone)]

Callers

nothing calls this directly

Calls 4

get_type_nameMethod · 0.80
get_typeMethod · 0.80
get_name_as_stringMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected