Skip to content

Commit f2103cd

Browse files
committed
fix: panic when more than one function name defined in CreateConversionStmt
1 parent 3a674ea commit f2103cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: crates/codegen/src/get_node_properties.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -789,8 +789,10 @@ fn custom_handlers(node: &Node) -> TokenStream {
789789
if n.to_encoding_name.len() > 0 {
790790
tokens.push(TokenProperty::from(Token::To));
791791
}
792-
if n.func_name.len() > 0 {
792+
if n.func_name.len() == 1 {
793793
tokens.push(TokenProperty::from(Token::From));
794+
} else if n.func_name.len() > 1 {
795+
panic!("Encountered multiple defined func_name elements in CreateConversionStmt");
794796
}
795797
},
796798
_ => quote! {},

0 commit comments

Comments
 (0)