kphp icon indicating copy to clipboard operation
kphp copied to clipboard

Implementation of `match` expression

Open mkornaukhov03 opened this issue 2 years ago • 0 comments

Issue: https://github.com/VKCOM/kphp/issues/290 RFC: https://wiki.php.net/rfc/match_expression_v2 Idea: Convert match into switch but using eq3 instead of eq2.

  • [x] New keyword
  • [x] New AST nodes(op_match_proxy, op_match_default, op_match_case)
  • [x] Change op_switch
  • [x] Lexing\parsing
  • [x] Informative error messages
  • [x] Creating switch-node from match-node
  • [x] eq3 instead of eq2 for switch-nodes those are transformed from match
  • [x] Write regression tests

mkornaukhov03 avatar Jan 11 '23 04:01 mkornaukhov03