1
0
Fork 0
forked from wry/wry

autocommit 2022-03-29 15:40:59 CEST

This commit is contained in:
Julian Orth 2022-03-29 15:40:59 +02:00
parent 6ebf731aea
commit 9842264fad
39 changed files with 121 additions and 92 deletions

View file

@ -362,9 +362,7 @@ impl<'a> Parser<'a> {
}
Ok(Type::String(len))
})();
let ty =
ty.with_context(|| format!("While parsing string starting in line {}", line))?;
ty
ty.with_context(|| format!("While parsing string starting in line {}", line))?
}
b"list" => {
let (line, body) = self.expect_tree(TreeDelim::Paren)?;
@ -381,9 +379,7 @@ impl<'a> Parser<'a> {
}
Ok(Type::List(Box::new(ty), len))
})();
let ty =
ty.with_context(|| format!("While parsing list starting in line {}", line))?;
ty
ty.with_context(|| format!("While parsing list starting in line {}", line))?
}
b"bitmask" => {
let (line, body) = self.expect_tree(TreeDelim::Paren)?;
@ -397,9 +393,7 @@ impl<'a> Parser<'a> {
}
Ok(Type::Bitmask(name.to_owned(), len))
})();
let ty =
ty.with_context(|| format!("While parsing bitmask starting in line {}", line))?;
ty
ty.with_context(|| format!("While parsing bitmask starting in line {}", line))?
}
b"enum" => {
let (line, body) = self.expect_tree(TreeDelim::Paren)?;
@ -413,9 +407,7 @@ impl<'a> Parser<'a> {
}
Ok(Type::Enum(Box::new(ty), len))
})();
let ty =
ty.with_context(|| format!("While parsing enum starting in line {}", line))?;
ty
ty.with_context(|| format!("While parsing enum starting in line {}", line))?
}
_ => Type::Named(ty.to_owned()),
};