From 64da9be3af4f7dbeb276df0168b70bdb52af7c4f Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Thu, 28 Sep 2023 12:19:50 -0400 Subject: Fill in other missing pattern matching expression types --- prism_compile.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/prism_compile.c b/prism_compile.c index 18c070d9de..d26130bd71 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -621,6 +621,30 @@ pm_compile_pattern(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const re NODE dummy_line_node = generate_dummy_line_node(lineno, lineno); switch (PM_NODE_TYPE(node)) { + case PM_ARRAY_PATTERN_NODE: + rb_bug("Array pattern matching not yet supported."); + break; + case PM_FIND_PATTERN_NODE: + rb_bug("Find pattern matching not yet supported."); + break; + case PM_HASH_PATTERN_NODE: + rb_bug("Hash pattern matching not yet supported."); + break; + case PM_LOCAL_VARIABLE_TARGET_NODE: + rb_bug("Local variable target node matching not yet supported."); + break; + case PM_IF_NODE: + rb_bug("If guards on pattern matching not yet supported."); + break; + case PM_UNLESS_NODE: + rb_bug("Unless guards on pattern matching not yet supported."); + break; + case PM_ALTERNATION_PATTERN_NODE: + rb_bug("Alternation pattern matching not yet supported."); + break; + case PM_CAPTURE_PATTERN_NODE: + rb_bug("Capture pattern matching not yet supported."); + break; case PM_ARRAY_NODE: case PM_CLASS_VARIABLE_READ_NODE: case PM_CONSTANT_PATH_NODE: -- cgit v1.2.3