40 lines
630 B
Rust
40 lines
630 B
Rust
// Standard Uses
|
|
|
|
// Local Uses
|
|
|
|
// External Uses
|
|
|
|
|
|
#[derive(PartialEq, Debug)]
|
|
pub enum Unit {
|
|
Quest {
|
|
name: String,
|
|
states: Vec<Unit>
|
|
},
|
|
State {
|
|
name: String,
|
|
whens: Vec<Unit>,
|
|
functions: Vec<Unit>
|
|
},
|
|
When {
|
|
condition: String,
|
|
with: String,
|
|
body: Box<Unit>
|
|
},
|
|
Function {
|
|
name: String,
|
|
arguments: String,
|
|
// arguments: Vec<Unit>,
|
|
body: Box<Unit>
|
|
},
|
|
LuaScope(String)
|
|
}
|
|
|
|
#[derive(PartialEq, Debug)]
|
|
pub enum UnitMeta {
|
|
Origin(String),
|
|
Node {
|
|
start_position: u32, length: u32
|
|
}
|
|
}
|