MCPcopy Create free account
hub / github.com/Amanieu/regalloc3 / parse_attribute

Function parse_attribute

src/debug_utils/generic_function/parse.rs:254–265  ·  view source on GitHub ↗
(pair: Pair<'_, Rule>, is_pure: &mut bool)

Source from the content-addressed store, hash-verified

252}
253
254fn parse_attribute(pair: Pair<'_, Rule>, is_pure: &mut bool) -> Result<()> {
255 match pair.as_str() {
256 "pure" => {
257 if *is_pure {
258 Err(custom_error(pair.as_span(), "duplicate attribute"))?;
259 }
260 *is_pure = true;
261 }
262 _ => unreachable!(),
263 }
264 Ok(())
265}
266
267fn parse_operand(
268 pair: Pair<'_, Rule>,

Callers 1

parse_instructionFunction · 0.85

Calls 1

custom_errorFunction · 0.70

Tested by

no test coverage detected