1pub mod array;
7pub mod datetime;
8pub mod string;
9pub mod types;
10
11#[derive(Debug, Clone, PartialEq, Eq)]
13pub struct FunctionSignature {
14 pub name: String,
16 pub params: Vec<String>,
18 pub return_type: String,
20 pub category: FunctionCategory,
22}
23
24#[derive(Debug, Clone, Copy, PartialEq, Eq)]
26pub enum FunctionCategory {
27 String,
29 DateTime,
31 Array,
33 Type,
35}
36
37#[cfg(test)]
38mod tests {
39 use super::*;
40
41 #[test]
42 fn test_function_signature_creation() {
43 let sig = FunctionSignature {
44 name: "matches".to_string(),
45 params: vec!["&str".to_string(), "&str".to_string()],
46 return_type: "bool".to_string(),
47 category: FunctionCategory::String,
48 };
49 assert_eq!(sig.name, "matches");
50 assert_eq!(sig.params.len(), 2);
51 }
52}