Skip to content

Commit e856d89

Browse files
Update src/parser/mod.rs
Co-authored-by: Ifeanyi Ubah <[email protected]>
1 parent 886ac09 commit e856d89

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/parser/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10245,9 +10245,10 @@ impl<'a> Parser<'a> {
1024510245
// Check if there's a comma, indicating multiple strings (e.g., AS 'obj_file', 'link_symbol')
1024610246
// This is used for C language functions: AS 'MODULE_PATHNAME', 'link_symbol'
1024710247
if self.consume_token(&Token::Comma) {
10248-
let mut exprs = vec![first_expr];
10249-
exprs.extend(self.parse_comma_separated(parse_string_expr)?);
10250-
Ok(Expr::Tuple(exprs))
10248+
Ok(Expr::Tuple(vec![
10249+
first_expr,
10250+
self.parse_comma_separated(parse_string_expr)?
10251+
]))
1025110252
} else {
1025210253
Ok(first_expr)
1025310254
}

0 commit comments

Comments
 (0)