Correct typo: indexs to indexes (#492)

This commit is contained in:
Andrew Lamb 2022-05-22 15:03:48 -04:00 committed by GitHub
parent dd805e9a6b
commit 11046f66e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 10 deletions

View file

@ -1234,15 +1234,15 @@ impl<'a> Parser<'a> {
pub fn parse_array_index(&mut self, expr: Expr) -> Result<Expr, ParserError> {
let index = self.parse_expr()?;
self.expect_token(&Token::RBracket)?;
let mut indexs: Vec<Expr> = vec![index];
let mut indexes: Vec<Expr> = vec![index];
while self.consume_token(&Token::LBracket) {
let index = self.parse_expr()?;
self.expect_token(&Token::RBracket)?;
indexs.push(index);
indexes.push(index);
}
Ok(Expr::ArrayIndex {
obj: Box::new(expr),
indexs,
indexes,
})
}