fix(trixy-parser): Remove the `void` type

This commit is contained in:
Benedikt Peetz 2024-02-18 13:27:31 +01:00
parent dc8a7ecb33
commit a077ef1466
Signed by: bpeetz
GPG Key ID: A5E94010C3A642AD
2 changed files with 2 additions and 9 deletions

View File

@ -318,13 +318,7 @@ impl Parser {
for generic_arg in r#type.generic_args {
generic_args.push(self.process_type(generic_arg)?);
}
let identifier = if &identifier.name == "void" {
Identifier {
name: "()".to_owned(),
}
} else {
identifier
};
Ok(Type {
identifier,
generic_args,

View File

@ -33,8 +33,7 @@ macro_rules! header {
/// These are the "primitive" types used in Trixy, you can use any of them to create new structures
/// The str is the name, the index represents the expected generic arguments
pub const BASE_TYPES: [(&'static std::primitive::str, usize); 6] = [
("void", 0),
pub const BASE_TYPES: [(&'static std::primitive::str, usize); 5] = [
("str", 0),
("String", 0),
("Result", 2),