fn parse_raw_cycles(&mut self) {
        // we need a cache between iterations
        let mut cache_tokens: Vec<usize> = vec![];

        for i in self.position..self.tokens.len() {
            // this means we've reached the end of
            // the tokens, we can push all the tokens
            if i == self.tokens.len() - 1 {
                self.push_current_cycle(&mut cache_tokens);
                cache_tokens = vec![];
            } else {
                // is it a semicolon? a cycle ended, push everything
                // is it another char? push it to the cache, next please.
                match Some(&*self.tokens[i].tok_type) {
                    Some("Semicolon") => {
                        self.push_current_cycle(&mut cache_tokens);
                        cache_tokens = vec![];
                    }
                    _ => {
                        cache_tokens.push(i);
                    }
                }
            }
        }
        println_on_debug!("  Raw cycles {:#?}", &self.raw_cycles);
    }
// this splits all the operations into cycles,
// it is called "raw" because does not parse,
// just marks in a vector when a token finishes
// the cycle and when another cycle starts
this splits all the operations into cycles,
it is called "raw" because does not parse,
just marks in a vector when a token finishes
the cycle and when another cycle starts
this splits all the operations into cycles it is called " raw " because does not parse just marks in a vector when a token finishes the cycle and when another cycle starts
fn parse_raw_cycles(&mut self) {
        // we need a cache between iterations
        let mut cache_tokens: Vec<usize> = vec![];
        for i in self.position..self.tokens.len() {
            // this means we've reached the end of
            // the tokens, we can push all the tokens
            if i == self.tokens.len() - 1 {
                self.push_current_cycle(&mut cache_tokens);
                cache_tokens = vec![];
            } else {
                // is it a semicolon? a cycle ended, push everything
                // is it another char? push it to the cache, next please.
                match Some(&*self.tokens[i].tok_type) {
                    Some("Semicolon") => {
                        self.push_current_cycle(&mut cache_tokens);
                        cache_tokens = vec![];
                    }
                    _ => {
                        cache_tokens.push(i);
                    }
                }
            }
        }
        println_on_debug!("  Raw cycles {:#?}", &self.raw_cycles);
    }
fn parse_raw_cycles ( & mut self ) { // we need a cache between iterations let mut cache_tokens : Vec < usize > = vec ! [ ] ; for i in self . position .. self . tokens . len ( ) { // this means we've reached the end of // the tokens, we can push all the tokens if i == self . tokens . len ( ) - 1 { self . push_current_cycle ( & mut cache_tokens ) ; cache_tokens = vec ! [ ] ; } else { // is it a semicolon? a cycle ended, push everything // is it another char? push it to the cache, next please. match Some ( & * self . tokens [ i ] . tok_type ) { Some ( " " ) => { self . push_current_cycle ( & mut cache_tokens ) ; cache_tokens = vec ! [ ] ; } _ => { cache_tokens . push ( i ) ; } } } } println_on_debug ! ( " " self raw_cycles ) ; }
this splits all the operations into cycles,
it is called "raw" because does not parse,
just marks in a vector when a token finishes
the cycle and when another cycle starts
this splits all the operations into cycles it is called " raw " because does not parse just marks in a vector when a token finishes the cycle and when another cycle starts
&mut self
&mut self