1use serde_json::Value;
4
5#[derive(Debug, Clone, PartialEq)]
7pub enum CclValue {
8 String(String),
10 Array(Vec<String>),
12 Object(Vec<(String, CclValue)>),
14}
15
16impl From<CclValue> for Value {
17 fn from(ccl: CclValue) -> Self {
18 match ccl {
19 CclValue::String(s) => Value::String(s),
20 CclValue::Array(arr) => Value::Array(arr.into_iter().map(Value::String).collect()),
21 CclValue::Object(pairs) => {
22 let mut map = serde_json::Map::new();
23 for (k, v) in pairs {
24 map.insert(k, v.into());
25 }
26 Value::Object(map)
27 }
28 }
29 }
30}
31
32pub fn parse_ccl(_content: &str) -> Result<CclValue, String> {
37 Err("Direct CCL parsing not yet implemented".to_string())
40}