Scans an object property colon separator.
(&mut self)
| 177 | |
| 178 | /// Scans an object property colon separator. |
| 179 | pub fn scan_object_colon(&mut self) -> Result<(), ParseError> { |
| 180 | match self.scan()? { |
| 181 | Some(Token::Colon) => Ok(()), |
| 182 | _ => Err( |
| 183 | self |
| 184 | .scanner |
| 185 | .create_error_for_current_token(ParseErrorKind::ExpectedColonAfterObjectKey), |
| 186 | ), |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | /// After an array element, scans for the comma/close-bracket and |
| 191 | /// returns the next token. |
no test coverage detected