46 lines
1.1 KiB
Rust
46 lines
1.1 KiB
Rust
use super::parsed_type_modifier::ParsedTypeModifier;
|
|
use crate::modifiers::{FieldModifier, TypeModifier};
|
|
use enumflags2::BitFlags;
|
|
|
|
pub enum ParsedStatement {
|
|
Invalid,
|
|
Script {
|
|
statements: Vec<ParsedStatement>,
|
|
},
|
|
Namespace {
|
|
identifier: String,
|
|
script: Box<ParsedStatement>,
|
|
},
|
|
Interface {
|
|
type_mod: BitFlags<TypeModifier>,
|
|
identifier: String,
|
|
inherits: Vec<String>,
|
|
statements: Vec<ParsedStatement>,
|
|
},
|
|
Scope {
|
|
is_global: bool,
|
|
scope: Vec<String>,
|
|
generic_types: Option<Vec<ParsedStatement>>,
|
|
},
|
|
VirtProp {
|
|
field_mod: BitFlags<FieldModifier>,
|
|
property_type: Box<ParsedStatement>,
|
|
identifier: String,
|
|
is_handle: bool,
|
|
|
|
has_get: bool,
|
|
is_get_const: bool,
|
|
get_statement: Option<Box<ParsedStatement>>,
|
|
|
|
has_set: bool,
|
|
is_set_const: bool,
|
|
set_statement: Option<Box<ParsedStatement>>,
|
|
},
|
|
Type {
|
|
is_const: bool,
|
|
scope: Option<Box<ParsedStatement>>,
|
|
identifier: String,
|
|
modifiers: Vec<ParsedTypeModifier>,
|
|
},
|
|
}
|