pub struct VariablesDomainDeclaration { /* private fields */ }Expand description
Represents a single domain declaration for variables, defining their type and iteration scope
Implementations§
Source§impl VariablesDomainDeclaration
impl VariablesDomainDeclaration
Sourcepub fn new(
variables: Vec<Spanned<Variable>>,
as_type: PreVariableType,
iters: Vec<IterableSet>,
span: InputSpan,
) -> Self
pub fn new( variables: Vec<Spanned<Variable>>, as_type: PreVariableType, iters: Vec<IterableSet>, span: InputSpan, ) -> Self
Creates a new domain declaration
Sourcepub fn variables(&self) -> &Vec<Spanned<Variable>>
pub fn variables(&self) -> &Vec<Spanned<Variable>>
Returns reference to variables in this domain
Sourcepub fn get_type(&self) -> &PreVariableType
pub fn get_type(&self) -> &PreVariableType
Returns reference to the type of variables in this domain
Sourcepub fn static_variables(&self) -> Vec<Spanned<String>>
pub fn static_variables(&self) -> Vec<Spanned<String>>
Returns static (non-compound) variables from this domain
Sourcepub fn iteration(&self) -> &Vec<IterableSet>
pub fn iteration(&self) -> &Vec<IterableSet>
Returns reference to iteration sets
Sourcepub fn compute_domain(
&self,
context: &mut TransformerContext,
fn_context: &FunctionContext<'_>,
) -> Result<Vec<(String, Spanned<VariableType>)>, TransformError>
pub fn compute_domain( &self, context: &mut TransformerContext, fn_context: &FunctionContext<'_>, ) -> Result<Vec<(String, Spanned<VariableType>)>, TransformError>
Computes the complete domain by evaluating all iterations
Trait Implementations§
Source§impl Clone for VariablesDomainDeclaration
impl Clone for VariablesDomainDeclaration
Source§fn clone(&self) -> VariablesDomainDeclaration
fn clone(&self) -> VariablesDomainDeclaration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VariablesDomainDeclaration
impl Debug for VariablesDomainDeclaration
Source§impl Display for VariablesDomainDeclaration
impl Display for VariablesDomainDeclaration
Source§impl TypeCheckable for VariablesDomainDeclaration
impl TypeCheckable for VariablesDomainDeclaration
Source§fn type_check(
&self,
context: &mut TypeCheckerContext,
fn_context: &FunctionContext<'_>,
) -> Result<(), TransformError>
fn type_check( &self, context: &mut TypeCheckerContext, fn_context: &FunctionContext<'_>, ) -> Result<(), TransformError>
Performs type checking on the implementing type. Read more
Source§fn populate_token_type_map(
&self,
context: &mut TypeCheckerContext,
fn_context: &FunctionContext<'_>,
)
fn populate_token_type_map( &self, context: &mut TypeCheckerContext, fn_context: &FunctionContext<'_>, )
Populates the token type map with type information. Read more
Auto Trait Implementations§
impl Freeze for VariablesDomainDeclaration
impl RefUnwindSafe for VariablesDomainDeclaration
impl Send for VariablesDomainDeclaration
impl Sync for VariablesDomainDeclaration
impl Unpin for VariablesDomainDeclaration
impl UnsafeUnpin for VariablesDomainDeclaration
impl UnwindSafe for VariablesDomainDeclaration
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more