Projektmodule und vollständiges TBC-Kompilat umsetzen und Change archivieren

This commit is contained in:
2026-09-05 23:06:56 +02:00
parent 58b1f620ea
commit 815825dde7
40 changed files with 4177 additions and 555 deletions

View File

@@ -124,10 +124,22 @@ pub struct DataItem {
pub line: u32,
}
/// Aufgelöste COMMON-Deklaration für die projektweite Slotverknüpfung.
#[derive(Debug, Clone)]
pub struct HCommon {
pub slot: u16,
pub block: Option<String>,
pub key: String,
pub ty: HTy,
pub dims: Option<Vec<(Option<i32>, Option<i32>)>>,
pub pos: crate::SourcePos,
}
#[derive(Debug)]
pub struct HirModule {
pub name: String,
pub globals: Vec<HVar>,
pub commons: Vec<HCommon>,
pub udts: Vec<HUdt>,
/// Prozeduren; Index 0 ist das Hauptprogramm.
pub procs: Vec<HProc>,
@@ -382,6 +394,8 @@ pub enum Builtin {
pub enum HExpr {
Int(i16),
Lng(i32),
/// TYPE-Tabellenreferenz für ISAM; beim Projektlinken zu versetzen.
UdtId(u16),
Sng(f32),
Dbl(f64),
Cur(i64),
@@ -513,6 +527,7 @@ pub enum HResume {
#[derive(Debug)]
pub struct HStmt {
pub pos: crate::SourcePos,
pub line: u32,
pub kind: HStmtKind,
}
@@ -596,12 +611,14 @@ pub enum HStmtKind {
},
/// DO/LOOP, WHILE/WEND (nur `pre`) — Bedingungen: (ist_until, Ausdruck).
Loop {
end_pos: crate::SourcePos,
pre: Option<(bool, HExpr)>,
post: Option<(bool, HExpr)>,
body: Vec<HStmt>,
exit_label: LabelId,
},
For {
end_pos: crate::SourcePos,
var: HPlace,
ty: NumTy,
from: HExpr,