Skip to content

Implementation of match expression#724

Open
mkornaukhov wants to merge 7 commits intoVKCOM:masterfrom
mkornaukhov:mkornaukhov03-match
Open

Implementation of match expression#724
mkornaukhov wants to merge 7 commits intoVKCOM:masterfrom
mkornaukhov:mkornaukhov03-match

Conversation

@mkornaukhov
Copy link
Contributor

@mkornaukhov mkornaukhov commented Jan 11, 2023

Issue: #290
RFC: https://wiki.php.net/rfc/match_expression_v2
Idea:
Convert match into switch but using eq3 instead of eq2.

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

@mkornaukhov mkornaukhov force-pushed the mkornaukhov03-match branch 2 times, most recently from 29d816c to 6f10f13 Compare January 16, 2023 15:34
@tolk-vm tolk-vm added the PHP8 PHP8 feature label Jan 24, 2023
@mkornaukhov mkornaukhov requested review from drdzyk and quasilyte and removed request for quasilyte February 8, 2023 16:11
@mkornaukhov mkornaukhov force-pushed the mkornaukhov03-match branch from 163a2ab to 80e3b14 Compare May 31, 2023 08:52
@mkornaukhov mkornaukhov changed the title [php8] Implementation of match expression Implementation of match expression Jun 1, 2023
@Tsygankov-Slava Tsygankov-Slava mentioned this pull request Jul 3, 2023
44 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PHP8 PHP8 feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants