AST structure refined for different kinds of when entry conditions
This commit is contained in:
@@ -123,7 +123,10 @@ public interface JetNodeTypes {
|
||||
JetNodeType WILDCARD_PATTERN = new JetNodeType("WILDCARD_PATTERN");
|
||||
JetNodeType WHEN = new JetNodeType("WHEN", JetWhenExpression.class);
|
||||
JetNodeType WHEN_ENTRY = new JetNodeType("WHEN_ENTRY", JetWhenEntry.class);
|
||||
JetNodeType WHEN_CONDITION = new JetNodeType("WHEN_CONDITION");
|
||||
JetNodeType WHEN_CONDITION_IN_RANGE = new JetNodeType("WHEN_CONDITION_IN_RANGE");
|
||||
JetNodeType WHEN_CONDITION_IS_PATTERN = new JetNodeType("WHEN_CONDITION_IS_PATTERN");
|
||||
JetNodeType WHEN_CONDITION_CALL = new JetNodeType("WHEN_CONDITION_CALL");
|
||||
JetNodeType WHEN_CONDITION_EXPRESSION = new JetNodeType("WHEN_CONDITION_EXPRESSION");
|
||||
JetNodeType TUPLE_PATTERN_ENTRY = new JetNodeType("TUPLE_PATTERN_ENTRY");
|
||||
JetNodeType NULLABLE_TYPE = new JetNodeType("NULLABLE_TYPE", JetNullableType.class);
|
||||
JetNodeType TYPE_PROJECTION = new JetNodeType("TYPE_PROJECTION", JetTypeProjection.class);
|
||||
|
||||
@@ -705,9 +705,9 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
|
||||
/*
|
||||
* whenCondition
|
||||
* : element
|
||||
* : expression
|
||||
* : "." postfixExpression typeArguments? valueArguments?
|
||||
* : ("in" | "!in") element
|
||||
* : ("in" | "!in") expression
|
||||
* : ("is" | "!is") isRHS
|
||||
* ;
|
||||
*/
|
||||
@@ -722,6 +722,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
} else {
|
||||
parseExpression();
|
||||
}
|
||||
condition.done(WHEN_CONDITION_IN_RANGE);
|
||||
} else if (at(IS_KEYWORD) || at(NOT_IS)) {
|
||||
advance(); // IS_KEYWORD or NOT_IS
|
||||
|
||||
@@ -730,6 +731,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
} else {
|
||||
parsePattern();
|
||||
}
|
||||
condition.done(WHEN_CONDITION_IS_PATTERN);
|
||||
} else if (at(DOT)) {
|
||||
advance(); // DOT
|
||||
parsePostfixExpression();
|
||||
@@ -737,15 +739,16 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
if (at(LPAR)) {
|
||||
parseValueArgumentList();
|
||||
}
|
||||
condition.done(WHEN_CONDITION_CALL);
|
||||
} else {
|
||||
if (atSet(WHEN_CONDITION_RECOVERY_SET_WITH_DOUBLE_ARROW)) {
|
||||
error("Expecting an element, is-condition or in-condition");
|
||||
} else {
|
||||
parseExpression();
|
||||
}
|
||||
condition.done(WHEN_CONDITION_EXPRESSION);
|
||||
}
|
||||
myBuilder.restoreNewlinesState();
|
||||
condition.done(WHEN_CONDITION);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -24,7 +24,7 @@ JetFile: AttributesOnPatterns.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
BINDING_PATTERN
|
||||
@@ -47,7 +47,7 @@ JetFile: AttributesOnPatterns.jet
|
||||
PsiElement(IDENTIFIER)('d')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
BINDING_PATTERN
|
||||
@@ -78,7 +78,7 @@ JetFile: AttributesOnPatterns.jet
|
||||
PsiElement(IDENTIFIER)('d')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
WILDCARD_PATTERN
|
||||
@@ -99,7 +99,7 @@ JetFile: AttributesOnPatterns.jet
|
||||
PsiElement(IDENTIFIER)('d')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
EXPRESSION_PATTERN
|
||||
@@ -121,7 +121,7 @@ JetFile: AttributesOnPatterns.jet
|
||||
PsiElement(IDENTIFIER)('d')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PATTERN
|
||||
@@ -145,7 +145,7 @@ JetFile: AttributesOnPatterns.jet
|
||||
PsiElement(IDENTIFIER)('d')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
|
||||
@@ -24,7 +24,7 @@ JetFile: CallsInWhen.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_CALL
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
@@ -35,7 +35,7 @@ JetFile: CallsInWhen.jet
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_CALL
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -50,7 +50,7 @@ JetFile: CallsInWhen.jet
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_CALL
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -70,7 +70,7 @@ JetFile: CallsInWhen.jet
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_CALL
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -96,7 +96,7 @@ JetFile: CallsInWhen.jet
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_CALL
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -127,7 +127,7 @@ JetFile: CallsInWhen.jet
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_CALL
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
@@ -142,7 +142,7 @@ JetFile: CallsInWhen.jet
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_CALL
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
@@ -160,7 +160,7 @@ JetFile: CallsInWhen.jet
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_CALL
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_LITERAL
|
||||
PsiElement(LBRACE)('{')
|
||||
|
||||
@@ -234,7 +234,7 @@ JetFile: NewlinesInParentheses.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -253,7 +253,7 @@ JetFile: NewlinesInParentheses.jet
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IN_RANGE
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
CALL_EXPRESSION
|
||||
@@ -270,7 +270,7 @@ JetFile: NewlinesInParentheses.jet
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(NOT_IS)('!is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -289,7 +289,7 @@ JetFile: NewlinesInParentheses.jet
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IN_RANGE
|
||||
PsiElement(NOT_IN)('!in')
|
||||
PsiWhiteSpace(' ')
|
||||
CALL_EXPRESSION
|
||||
@@ -306,7 +306,7 @@ JetFile: NewlinesInParentheses.jet
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
|
||||
@@ -86,7 +86,7 @@ JetFile: RootNamespace.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
|
||||
+40
-40
@@ -44,7 +44,7 @@ JetFile: When.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PATTERN
|
||||
@@ -115,7 +115,7 @@ JetFile: When.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PATTERN
|
||||
@@ -142,7 +142,7 @@ JetFile: When.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -175,7 +175,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -222,7 +222,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
EXPRESSION_PATTERN
|
||||
@@ -235,7 +235,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
EXPRESSION_PATTERN
|
||||
@@ -248,7 +248,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PATTERN
|
||||
@@ -267,7 +267,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
EXPRESSION_PATTERN
|
||||
@@ -280,7 +280,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
EXPRESSION_PATTERN
|
||||
@@ -293,7 +293,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
EXPRESSION_PATTERN
|
||||
@@ -306,7 +306,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
EXPRESSION_PATTERN
|
||||
@@ -319,7 +319,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
WILDCARD_PATTERN
|
||||
@@ -331,7 +331,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
BINDING_PATTERN
|
||||
@@ -353,7 +353,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TUPLE_PATTERN
|
||||
@@ -449,7 +449,7 @@ JetFile: When.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PATTERN
|
||||
@@ -464,7 +464,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -494,7 +494,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -527,7 +527,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -560,7 +560,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -597,7 +597,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -642,7 +642,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -683,7 +683,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -723,7 +723,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -754,7 +754,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IN_RANGE
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
@@ -771,7 +771,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('dsf')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IN_RANGE
|
||||
PsiElement(NOT_IN)('!in')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
@@ -783,7 +783,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('sd')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(NOT_IS)('!is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PATTERN
|
||||
@@ -798,7 +798,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('d')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PATTERN
|
||||
@@ -828,7 +828,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('fgpp')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TUPLE_PATTERN
|
||||
@@ -881,7 +881,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('d')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TUPLE_PATTERN
|
||||
@@ -975,7 +975,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('d')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TUPLE_PATTERN
|
||||
@@ -1002,7 +1002,7 @@ JetFile: When.jet
|
||||
PsiElement(INTEGER_LITERAL)('2')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
BINDING_PATTERN
|
||||
@@ -1069,7 +1069,7 @@ JetFile: When.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PATTERN
|
||||
@@ -1079,7 +1079,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('Tree')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -1104,7 +1104,7 @@ JetFile: When.jet
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -1137,12 +1137,12 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
@@ -1151,12 +1151,12 @@ JetFile: When.jet
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('2')
|
||||
@@ -1168,7 +1168,7 @@ JetFile: When.jet
|
||||
PsiElement(INTEGER_LITERAL)('3')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -1201,7 +1201,7 @@ JetFile: When.jet
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
|
||||
@@ -36,7 +36,7 @@ JetFile: When_ERR.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiErrorElement:Expecting a type or a decomposer pattern
|
||||
<empty list>
|
||||
@@ -47,7 +47,7 @@ JetFile: When_ERR.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(NOT_IS)('!is')
|
||||
PsiErrorElement:Expecting a type or a decomposer pattern
|
||||
<empty list>
|
||||
@@ -58,7 +58,7 @@ JetFile: When_ERR.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IN_RANGE
|
||||
PsiElement(in)('in')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
@@ -69,7 +69,7 @@ JetFile: When_ERR.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IN_RANGE
|
||||
PsiElement(NOT_IN)('!in')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
@@ -80,7 +80,7 @@ JetFile: When_ERR.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
PsiErrorElement:Expecting an element, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(DOUBLE_ARROW)('=>')
|
||||
@@ -106,7 +106,7 @@ JetFile: When_ERR.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiErrorElement:Expecting a type or a decomposer pattern
|
||||
<empty list>
|
||||
@@ -116,7 +116,7 @@ JetFile: When_ERR.jet
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(NOT_IS)('!is')
|
||||
PsiErrorElement:Expecting a type or a decomposer pattern
|
||||
<empty list>
|
||||
@@ -126,7 +126,7 @@ JetFile: When_ERR.jet
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IN_RANGE
|
||||
PsiElement(in)('in')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
@@ -136,7 +136,7 @@ JetFile: When_ERR.jet
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IN_RANGE
|
||||
PsiElement(NOT_IN)('!in')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
@@ -146,7 +146,7 @@ JetFile: When_ERR.jet
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IN_RANGE
|
||||
PsiElement(NOT_IN)('!in')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
@@ -158,7 +158,7 @@ JetFile: When_ERR.jet
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
PsiErrorElement:Expecting an element, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(DOUBLE_ARROW)('=>')
|
||||
@@ -190,7 +190,7 @@ JetFile: When_ERR.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Pattern expected
|
||||
@@ -202,7 +202,7 @@ JetFile: When_ERR.jet
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TUPLE_PATTERN
|
||||
|
||||
@@ -435,7 +435,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('EQ')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -445,7 +445,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(true)('true')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('LS')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -471,7 +471,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('GT')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -713,7 +713,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('EQ')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -723,7 +723,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(false)('false')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('LS')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -751,7 +751,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('GT')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -891,7 +891,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('EQ')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -904,7 +904,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(false)('false')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('LS')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -990,7 +990,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('GT')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -1265,7 +1265,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('EQ')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -1275,7 +1275,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(IDENTIFIER)('node')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('LS')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -1296,7 +1296,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('GT')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -1358,7 +1358,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -1399,7 +1399,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -1442,7 +1442,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
@@ -1485,7 +1485,7 @@ JetFile: BinaryTree.jet
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PATTERN
|
||||
|
||||
Reference in New Issue
Block a user