pub fn get_ops(
lang: &LANG,
source: Vec<u8>,
path: &Path,
pr: Option<Arc<PreprocResults>>,
) -> Option<Ops>
Expand description
Returns all operators and operands of each space in a code.
ยงExamples
use std::path::PathBuf;
use rust_code_analysis::{get_ops, 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_ops(&language, source_as_vec, &path, None).unwrap();