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

Method get_const_value

src/ast/kind.rs:1028–1035  ·  view source on GitHub ↗
(&self, node: &Node)

Source from the content-addressed store, hash-verified

1026 }
1027
1028 pub fn get_const_value(&self, node: &Node) -> Option<i32> {
1029 if let Some(child) = node.inner.first() {
1030 if let Clang::ConstantExpr(ce) = &child.kind {
1031 return Some(ce.parse_int());
1032 }
1033 }
1034 None
1035 }
1036}
1037
1038#[derive(Deserialize, Debug, Clone)]

Callers 3

get_definitionMethod · 0.80

Calls 1

parse_intMethod · 0.80

Tested by

no test coverage detected