MCPcopy Create free account
hub / github.com/ControlCplusControlV/Scribe / from_annotation

Method from_annotation

crates/papyrus/src/types.rs:53–59  ·  view source on GitHub ↗

Converts a string representation of u32 or u256 to a YulType

(annotation: &str)

Source from the content-addressed store, hash-verified

51impl YulType {
52 //Converts a string representation of u32 or u256 to a YulType
53 pub fn from_annotation(annotation: &str) -> Self {
54 match annotation {
55 "u32" => Self::U32,
56 "u256" => Self::U256,
57 _ => panic!(),
58 }
59 }
60
61 //Returns the stack width that the uint occupies in the Miden VM
62 //Miden stack elements can occupy 32bits, a u32 number will occupy one element, where a u256 number will occupy 8 elements

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected