Browse Source

feat: allow structs as types

structs
Garrit Franke 3 years ago
parent
commit
e125a44c35
  1. 2
      src/parser/node_type.rs

2
src/parser/node_type.rs

@ -82,7 +82,7 @@ impl TryFrom<String> for Type {
"string" => Ok(Self::Str),
"any" => Ok(Self::Any),
"bool" => Ok(Self::Bool),
_ => Err("Unknown Type".into()),
name => Ok(Self::Struct(name.to_string())),
}
}
}

Loading…
Cancel
Save