vyre 0.4.0

GPU compute intermediate representation with a standard operation library
Documentation
//! Scope binding metadata for the IR validator.
//!
//! During validation the compiler maintains a symbol table that maps
//! variable names to their declared types and mutability. `Binding` is
//! the per-variable record stored in that table.

/// Default validation limits re-exported for convenience.
///
/// These constants bound the size and depth of programs that the
/// validator will accept.
pub use super::depth::{DEFAULT_MAX_CALL_DEPTH, DEFAULT_MAX_NESTING_DEPTH, DEFAULT_MAX_NODE_COUNT};
use crate::ir::model::types::DataType;

/// Scope binding: type and mutability.
///
/// The validator uses `Binding` to track every live variable: its
/// `DataType` (for type-checking expressions) and whether it was
/// declared as mutable (for assignment validation).
#[derive(Debug, Clone)]
pub(crate) struct Binding {
    /// Declared type of the variable.
    pub(crate) ty: DataType,
    /// Whether the variable can be reassigned.
    pub(crate) mutable: bool,
}