More bytecode ops

This commit is contained in:
vegowotenks 2024-09-06 21:11:03 +02:00
parent 9243c0b291
commit 5bc0d813e5
7 changed files with 395 additions and 120 deletions

View file

@ -786,6 +786,14 @@ impl Into<String> for &AbstractTypeDescription {
}
impl AbstractTypeDescription {
pub fn parse_full(s: &str) -> Result<Self, Error> {
let (c, parsed) = Self::parse_first(s)?;
assert!(c == s.len());
Ok(parsed)
}
pub fn parse_first(s: &str) -> Result<(usize, Self), Error> {
let mut offset: usize = 0;
let arrays_parsed = s.trim_start_matches("[");