Skip to content

Commit

Permalink
allow "var" keyword in Enum extractors
Browse files Browse the repository at this point in the history
  • Loading branch information
m0rkeulv committed Aug 5, 2024
1 parent 7e0452d commit 872e051
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ private switchExtractorExpressionArgument ::= ( extractorMatchExpressionVariant

enumExtractorArgumentList ::= ( switchExtractorExpressionArgument) (',' (switchExtractorExpressionArgument))*
enumValueReference ::= simpleQualifiedReferenceExpression
enumArgumentExtractor ::= enumValueReference '(' enumExtractorArgumentList ')'
enumArgumentExtractor ::= enumValueReference '(' 'var'? enumExtractorArgumentList ')'
{extends="expression" mixin="com.intellij.plugins.haxe.lang.psi.impl.HaxeEnumArgumentExtractorMixinImpl" implements="com.intellij.plugins.haxe.model.HaxeModelTarget"}

variableCaptureExpression ::= callOrArrayAccess ('=>' switchCaseExpr)+ {pin=2 extends="expression"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class PatternMachingTest {
case TAny(a): a.indexOf("");
case TDoubleVal(a, b): a.charAt(b) ;
case TNone: null;
case TAny(var x) : trace(x);
case var value: trace(value);
}

Expand Down

0 comments on commit 872e051

Please sign in to comment.