fn value(&mut self) {
        match self.current_token.ttype {
            TokenType::OPBR => { self.object() },
            TokenType::OPSQ => { self.array() },
            TokenType::TRUE => { self.eat(TokenType::TRUE) },
            TokenType::FALSE => { self.eat(TokenType::FALSE) },
            TokenType::NUMBER => { self.eat(TokenType::NUMBER) },
            TokenType::NULL => { self.eat(TokenType::NULL) },
            TokenType::STRING => { self.eat(TokenType::STRING) },
            _ => { panic!("Invalid Value") }
        }
    }
// Value function consumes the possible values for JSON, based on the current token
// Value is anything that can be found in a json pair (i.e. {"key": value})
// or as the member of an array (i.e. [value, value, ...])
// Possible values are : string, number, object, array, true, false, null
Value function consumes the possible values for JSON, based on the current token
Value is anything that can be found in a json pair
or as the member of an array
Possible values are : string, number, object, array, true, false, null
Value function consumes the possible values for JSON based on the current token Value is anything that can be found in a json pair or as the member of an array Possible values are : string number object array true false null
fn value(&mut self) {
        match self.current_token.ttype {
            TokenType::OPBR => { self.object() },
            TokenType::OPSQ => { self.array() },
            TokenType::TRUE => { self.eat(TokenType::TRUE) },
            TokenType::FALSE => { self.eat(TokenType::FALSE) },
            TokenType::NUMBER => { self.eat(TokenType::NUMBER) },
            TokenType::NULL => { self.eat(TokenType::NULL) },
            TokenType::STRING => { self.eat(TokenType::STRING) },
            _ => { panic!("Invalid Value") }
        }
    }
fn value ( & mut self ) { match self . current_token . ttype { TokenType :: OPBR => { self . object ( ) } , TokenType :: OPSQ => { self . array ( ) } , TokenType :: TRUE => { self . eat ( TokenType :: TRUE ) } , TokenType :: FALSE => { self . eat ( TokenType :: FALSE ) } , TokenType :: NUMBER => { self . eat ( TokenType :: NUMBER ) } , TokenType :: NULL => { self . eat ( TokenType :: NULL ) } , TokenType :: STRING => { self . eat ( TokenType :: STRING ) } , _ => { panic ! ( " " ) } } }
Value function consumes the possible values for JSON, based on the current token
Value is anything that can be found in a json pair (i.e.
Value function consumes the possible values for JSON based on the current token Value is anything that can be found in a json pair ( i . e .
&mut self
&mut self