fix(trixy-parser): Remove the `void` type
This commit is contained in:
parent
dc8a7ecb33
commit
a077ef1466
|
@ -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,
|
||||
|
|
|
@ -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),
|
||||
|
|
Reference in New Issue