Phase 4: Formularmodell und Objektsprache
This commit is contained in:
@@ -41,6 +41,8 @@ pub enum HTy {
|
||||
FixedStr(u32),
|
||||
/// Benutzerdefinierter Typ (Index in `HirModule::udts`).
|
||||
Udt(u16),
|
||||
Form,
|
||||
Control,
|
||||
}
|
||||
|
||||
impl HTy {
|
||||
@@ -131,6 +133,17 @@ pub struct HirModule {
|
||||
pub procs: Vec<HProc>,
|
||||
pub data: Vec<DataItem>,
|
||||
pub option_base: u8,
|
||||
/// Zur Übersetzungszeit bekannte Forms-Objekte in Indexreihenfolge.
|
||||
pub objects: Vec<crate::forms::FormObject>,
|
||||
/// Ereignisprozeduren: Objektindex, Ereignisname, Prozedurindex.
|
||||
pub event_procs: Vec<HEventProc>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct HEventProc {
|
||||
pub object: u16,
|
||||
pub event: String,
|
||||
pub proc: u16,
|
||||
}
|
||||
|
||||
// ---- Ausdrücke -------------------------------------------------------------
|
||||
@@ -367,6 +380,25 @@ pub enum HExpr {
|
||||
Cur(i64),
|
||||
Str(String),
|
||||
Load(Box<HPlace>),
|
||||
ObjectProperty {
|
||||
object: u16,
|
||||
index: Option<Box<HExpr>>,
|
||||
property: u16,
|
||||
ty: HTy,
|
||||
},
|
||||
DynamicObjectProperty {
|
||||
object: Box<HExpr>,
|
||||
property: String,
|
||||
},
|
||||
ObjectRef {
|
||||
object: u16,
|
||||
index: Option<Box<HExpr>>,
|
||||
class: crate::forms::ObjectClass,
|
||||
},
|
||||
TypeOf {
|
||||
value: Box<HExpr>,
|
||||
class: crate::forms::ObjectClass,
|
||||
},
|
||||
/// Numerische Konvertierung nach Matrix (Rundung/Überlauf).
|
||||
Conv {
|
||||
from: NumTy,
|
||||
@@ -473,6 +505,27 @@ pub enum HStmtKind {
|
||||
place: HPlace,
|
||||
value: HExpr,
|
||||
},
|
||||
SetObjectProperty {
|
||||
object: u16,
|
||||
index: Option<HExpr>,
|
||||
property: u16,
|
||||
value: HExpr,
|
||||
},
|
||||
SetDynamicObjectProperty {
|
||||
object: HExpr,
|
||||
property: String,
|
||||
value: HExpr,
|
||||
},
|
||||
ObjectMethod {
|
||||
object: u16,
|
||||
method: u16,
|
||||
args: Vec<HExpr>,
|
||||
},
|
||||
ObjectLoad {
|
||||
object: u16,
|
||||
index: Option<HExpr>,
|
||||
unload: bool,
|
||||
},
|
||||
Print {
|
||||
items: Vec<HPrintItem>,
|
||||
/// Endet die Anweisung mit `;`/`,` (kein Zeilenumbruch)?
|
||||
|
||||
Reference in New Issue
Block a user