brack_sdk_rs/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
pub mod ast;

use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Hash)]
pub enum Type {
    TInline,
    TOption(Box<Type>),
    TBlock,
    TArray(Box<Type>),
    TInlineCmd(String),
    TBlockCmd(String),
    TAST,
}

#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct MetaData {
    pub command_name: String,
    pub call_name: String,
    pub argument_types: Vec<(String, Type)>,
    pub return_type: Type,
}

#[derive(Debug, Serialize, Deserialize, Clone)]
pub enum Value {
    Text(String),
    TextArray(Vec<String>),
    TextOption(Option<String>),
}