pub fn core_keys(&mut self, chunk: &Chunk, i: usize) -> i32 {
        if self.stack.len() < 1 {
            print_error(chunk, i, "keys requires one argument");
            return 0;
        }

        let hash_rr = self.stack.pop().unwrap();
        let is_hash;
        {
            let hash_rrb = hash_rr.borrow();
            match &*hash_rrb {
                Value::Hash(_) => {
                    is_hash = true;
                }
                _ => {
                    print_error(chunk, i, "keys argument must be hash");
                    return 0;
                }
            }
        }
        if is_hash {
            self.stack
                .push(Rc::new(RefCell::new(Value::KeysGenerator(0, hash_rr))));
        }
        return 1;
    }
/// Takes a hash value and returns a generator over the keys of
/// the hash.
Takes a hash value and returns a generator over the keys of
the hash.
Takes a hash value and returns a generator over the keys of the hash .
pub fn core_keys(&mut self, chunk: &Chunk, i: usize) -> i32 {
        if self.stack.len() < 1 {
            print_error(chunk, i, "keys requires one argument");
            return 0;
        }
        let hash_rr = self.stack.pop().unwrap();
        let is_hash;
        {
            let hash_rrb = hash_rr.borrow();
            match &*hash_rrb {
                Value::Hash(_) => {
                    is_hash = true;
                }
                _ => {
                    print_error(chunk, i, "keys argument must be hash");
                    return 0;
                }
            }
        }
        if is_hash {
            self.stack
                .push(Rc::new(RefCell::new(Value::KeysGenerator(0, hash_rr))));
        }
        return 1;
    }
pub fn core_keys ( & mut self , chunk : & Chunk , i : usize ) -> i32 { if self . stack . len ( ) < 1 { print_error ( chunk , i , " " ) ; return 0 ; } let hash_rr = self . stack . pop ( ) . unwrap ( ) ; let is_hash ; { let hash_rrb = hash_rr . borrow ( ) ; match & * hash_rrb { Value :: Hash ( _ ) => { is_hash = true ; } _ => { print_error ( chunk , i , " " ) ; return 0 ; } } } if is_hash { self . stack . push ( Rc :: new ( RefCell :: new ( Value :: KeysGenerator ( 0 , hash_rr ) ) ) ) ; } return 1 ; }
Takes a hash value and returns a generator over the keys of
the hash.
Takes a hash value and returns a generator over the keys of the hash .
&mut self
chunk
&Chunk
i
usize