Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of match expression #724

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

mkornaukhov03
Copy link
Contributor

@mkornaukhov03 mkornaukhov03 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

@mkornaukhov03 mkornaukhov03 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
@mkornaukhov03 mkornaukhov03 requested review from quasilyte and drdzyk and removed request for quasilyte February 8, 2023 16:11
compiler/code-gen/vertex-compiler.cpp Outdated Show resolved Hide resolved
compiler/code-gen/vertex-compiler.cpp Outdated Show resolved Hide resolved
compiler/code-gen/vertex-compiler.cpp Outdated Show resolved Hide resolved
compiler/code-gen/vertex-compiler.cpp Outdated Show resolved Hide resolved
compiler/code-gen/vertex-compiler.cpp Outdated Show resolved Hide resolved
compiler/gentree.cpp Show resolved Hide resolved
compiler/pipes/collect-main-edges.cpp Outdated Show resolved Hide resolved
compiler/pipes/collect-main-edges.cpp Outdated Show resolved Hide resolved
compiler/pipes/gen-tree-postprocess.cpp Outdated Show resolved Hide resolved
compiler/pipes/gen-tree-postprocess.cpp Outdated Show resolved Hide resolved
@mkornaukhov03 mkornaukhov03 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