Skip to content

Commit b3b5359

Browse files
authored
Merge pull request #53 from supabase/chore/polish
chore/polish
2 parents 9d72a52 + 39e1f6d commit b3b5359

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/codegen/src/get_node_properties.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ pub fn get_node_properties_mod(proto_file: &ProtoFile) -> proc_macro2::TokenStre
1515

1616
impl TokenProperty {
1717
pub fn new(value: Option<String>, kind: Option<SyntaxKind>) -> TokenProperty {
18+
if value.is_none() && kind.is_none() {
19+
panic!("TokenProperty must have either value or kind");
20+
}
1821
TokenProperty { value, kind }
1922
}
2023
}

0 commit comments

Comments
 (0)