My working unpac space for OCaml projects in development
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Allow keywords as property names in destructuring patterns

Keywords can be used as property names in object destructuring
patterns like { await } or { yield }.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+6
+6
lib/quickjs/parser/parser.ml
··· 237 237 let loc = current_loc parser in 238 238 advance parser; 239 239 Ast.mk_expr ~loc (Ast.Literal (Ast.Lit_string name)) 240 + | Token.Keyword kw -> 241 + (* Keywords can be property names in destructuring *) 242 + let name = Token.keyword_to_string kw in 243 + let loc = current_loc parser in 244 + advance parser; 245 + Ast.mk_expr ~loc (Ast.Literal (Ast.Lit_string name)) 240 246 | Token.Number (n, _) -> 241 247 let loc = current_loc parser in 242 248 advance parser;