File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
src/main/java/org/truffleruby/parser Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
fails:Pattern matching variable pattern supports using any name with _ at the beginning in a pattern several times
2
2
fails:Pattern matching variable pattern supports existing variables in a pattern specified with ^ operator
3
3
fails:Pattern matching variable pattern allows applying ^ operator to bound variables
4
- fails:Pattern matching variable pattern requires bound variable to be specified in a pattern before ^ operator when it relies on a bound variable
5
4
fails:Pattern matching alternative pattern matches if any of patterns matches
6
5
fails:Pattern matching alternative pattern does not support variable binding
7
6
fails:Pattern matching alternative pattern support underscore prefixed variables in alternation
Original file line number Diff line number Diff line change @@ -959,7 +959,9 @@ public RubyNode visitCapturePatternNode(Nodes.CapturePatternNode node) {
959
959
960
960
@ Override
961
961
public RubyNode visitCaseMatchNode (Nodes .CaseMatchNode node ) {
962
- return super .visitCaseMatchNode (node );
962
+ var context = RubyLanguage .getCurrentContext ();
963
+ throw new RaiseException (context , context .getCoreExceptions ()
964
+ .syntaxError ("`case/in` pattern matching not yet implemented" , currentNode , getSourceSection (node )));
963
965
}
964
966
965
967
@ Override
@@ -2564,7 +2566,9 @@ public RubyNode visitMatchPredicateNode(Nodes.MatchPredicateNode node) {
2564
2566
2565
2567
@ Override
2566
2568
public RubyNode visitMatchRequiredNode (Nodes .MatchRequiredNode node ) {
2567
- return defaultVisit (node );
2569
+ var context = RubyLanguage .getCurrentContext ();
2570
+ throw new RaiseException (context , context .getCoreExceptions ()
2571
+ .syntaxError ("`=>` pattern matching not yet implemented" , currentNode , getSourceSection (node )));
2568
2572
}
2569
2573
2570
2574
// See BodyTranslator#visitMatch2Node
You can’t perform that action at this time.
0 commit comments