fn check_pre_on_variable(&mut self, var: &Variable) -> bool {
    if var.past == 0 {
      true
    }
    else {
      let uid = var.last_uid();
      match self.context.var_by_uid(uid).kind {
        Kind::Product => self.err_forbid_pre_on(var, "module"),
        Kind::Host => self.err_forbid_pre_on(var, "host"),
        Kind::Spacetime(Spacetime::SingleTime) => self.err_forbid_pre_on(var, "single_time"),
        _ => {
          // Forbid to write `pre x <- 1`.
          if self.perm_context == Write {
            self.err_forbid_write_on_pre(var);
          }
          else {
            return true;
          }
        }
      }
      false
    }
  }
// Returns false if an error occurred.
Returns false if an error occurred.
Returns false if an error occurred .
fn check_pre_on_variable(&mut self, var: &Variable) -> bool {
    if var.past == 0 {
      true
    }
    else {
      let uid = var.last_uid();
      match self.context.var_by_uid(uid).kind {
        Kind::Product => self.err_forbid_pre_on(var, "module"),
        Kind::Host => self.err_forbid_pre_on(var, "host"),
        Kind::Spacetime(Spacetime::SingleTime) => self.err_forbid_pre_on(var, "single_time"),
        _ => {
          // Forbid to write `pre x <- 1`.
          if self.perm_context == Write {
            self.err_forbid_write_on_pre(var);
          }
          else {
            return true;
          }
        }
      }
      false
    }
  }
fn check_pre_on_variable ( & mut self , var : & Variable ) -> bool { if var . past == 0 { true } else { let uid = var . last_uid ( ) ; match self . context . var_by_uid ( uid ) . kind { Kind :: Product => self . err_forbid_pre_on ( var , " " ) , Kind :: Host => self . err_forbid_pre_on ( var , " " ) , Kind :: Spacetime ( Spacetime :: SingleTime ) => self . err_forbid_pre_on ( var , " " ) , _ => { // Forbid to write `pre x <- 1`. if self . perm_context == Write { self . err_forbid_write_on_pre ( var ) ; } else { return true ; } } } false } }
Returns false if an error occurred.
Returns false if an error occurred .
&mut self
var
&Variable
&mut self
var
&Variable