pub struct Program {
pub files: Arena<SourceFile>,
pub settings: Option<Settings>,
pub global_variables: Arena<WorkshopVariable>,
pub player_variables: Arena<WorkshopVariable>,
pub subroutines: Arena<WorkshopSubroutine>,
pub rules: Arena<Rule>,
pub values: Arena<ValueNode>,
pub actions: Arena<Action>,
}Expand description
The Workshop IR program: tables and arenas produced by lowering.
Fields§
§files: Arena<SourceFile>The source-file registry, copied from the source HIR so spans remain resolvable for diagnostics.
settings: Option<Settings>The custom-game-settings carrier, copied inertly from the source HIR (emitted verbatim, never lowered, #86).
global_variables: Arena<WorkshopVariable>§player_variables: Arena<WorkshopVariable>§subroutines: Arena<WorkshopSubroutine>§rules: Arena<Rule>§values: Arena<ValueNode>§actions: Arena<Action>Implementations§
Source§impl Program
impl Program
Sourcepub fn validate(&self) -> Result<(), IrError>
pub fn validate(&self) -> Result<(), IrError>
Validate structural invariants: every ID resolves and every span is
valid. Returns the first violation as a structured IrError.
Sourcepub fn semantic_issues(&self, catalog: &Catalog) -> Vec<SemanticIssue>
pub fn semantic_issues(&self, catalog: &Catalog) -> Vec<SemanticIssue>
Report preserved or unknown constructs separately from structural validation so consumers cannot present analysis as definitive.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnsafeUnpin for Program
impl UnwindSafe for Program
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more