There was an error while loading. Please reload this page.
2 parents 9d72a52 + 39e1f6d commit b3b5359Copy full SHA for b3b5359
crates/codegen/src/get_node_properties.rs
@@ -15,6 +15,9 @@ pub fn get_node_properties_mod(proto_file: &ProtoFile) -> proc_macro2::TokenStre
15
16
impl TokenProperty {
17
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
+ }
21
TokenProperty { value, kind }
22
}
23
0 commit comments