[−][src]Function rust_code_analysis::get_function_spaces
pub fn get_function_spaces(
lang: &LANG,
source: Vec<u8>,
path: &PathBuf,
pr: Option<Arc<PreprocResults>>
) -> Option<FuncSpace>
Returns all function spaces data of a code.
Examples
use std::path::PathBuf; use rust_code_analysis::{get_function_spaces, LANG}; let source_code = "int a = 42;"; let language = LANG::Cpp; // The path to a dummy file used to contain the source code let path = PathBuf::from("foo.c"); let source_as_vec = source_code.as_bytes().to_vec(); get_function_spaces(&language, source_as_vec, &path, None).unwrap();