fn lookup_variable(&mut self, name: &str) -> Result<Option<VariablePlace>, ErrorKind> {
      // Work from the inside out: check innermost local scopes first.
      if let Some(place) = self.locals.lookup(name)? {
         return Ok(Some(place));
      }
      // Lastly check globals.
      Ok(self.env.get_global(name).map(VariablePlace::Global))
   }
/// Performs a variable lookup. Returns the stack slot of the variable if it exists.
/// Otherwise returns `None`.
Performs a variable lookup. Returns the stack slot of the variable if it exists.
Otherwise returns `None`.
Performs a variable lookup . Returns the stack slot of the variable if it exists . Otherwise returns ` None ` .
fn lookup_variable(&mut self, name: &str) -> Result<Option<VariablePlace>, ErrorKind> {
      // Work from the inside out: check innermost local scopes first.
      if let Some(place) = self.locals.lookup(name)? {
         return Ok(Some(place));
      }
      // Lastly check globals.
      Ok(self.env.get_global(name).map(VariablePlace::Global))
   }
fn lookup_variable ( & mut self , name : & str ) -> Result < Option < VariablePlace > , ErrorKind > { // Work from the inside out: check innermost local scopes first. if let Some ( place ) = self . locals . lookup ( name ) ? { return Ok ( Some ( place ) ) ; } // Lastly check globals. Ok ( self . env . get_global ( name ) . map ( VariablePlace :: Global ) ) }
Performs a variable lookup.
Performs a variable lookup .
&mut self
name
&str