Special node for match expression (as its RHS is not an expression)
This commit is contained in:
@@ -98,6 +98,7 @@ public interface JetNodeTypes {
|
|||||||
JetNodeType THIS_EXPRESSION = new JetNodeType("THIS_EXPRESSION", JetThisExpression.class);
|
JetNodeType THIS_EXPRESSION = new JetNodeType("THIS_EXPRESSION", JetThisExpression.class);
|
||||||
JetNodeType BINARY_EXPRESSION = new JetNodeType("BINARY_EXPRESSION", JetBinaryExpression.class);
|
JetNodeType BINARY_EXPRESSION = new JetNodeType("BINARY_EXPRESSION", JetBinaryExpression.class);
|
||||||
JetNodeType BINARY_WITH_TYPE = new JetNodeType("BINARY_WITH_TYPE", JetBinaryExpressionWithTypeRHS.class);
|
JetNodeType BINARY_WITH_TYPE = new JetNodeType("BINARY_WITH_TYPE", JetBinaryExpressionWithTypeRHS.class);
|
||||||
|
JetNodeType MATCH_EXPRESSION = new JetNodeType("MATCH_EXPRESSION", JetMatchExpression.class);
|
||||||
JetNodeType PREFIX_EXPRESSION = new JetNodeType("PREFIX_EXPRESSION", JetPrefixExpression.class);
|
JetNodeType PREFIX_EXPRESSION = new JetNodeType("PREFIX_EXPRESSION", JetPrefixExpression.class);
|
||||||
JetNodeType POSTFIX_EXPRESSION = new JetNodeType("POSTFIX_EXPRESSION", JetPostfixExpression.class);
|
JetNodeType POSTFIX_EXPRESSION = new JetNodeType("POSTFIX_EXPRESSION", JetPostfixExpression.class);
|
||||||
JetNodeType CALL_EXPRESSION = new JetNodeType("CALL_EXPRESSION", JetCallExpression.class);
|
JetNodeType CALL_EXPRESSION = new JetNodeType("CALL_EXPRESSION", JetCallExpression.class);
|
||||||
@@ -106,6 +107,7 @@ public interface JetNodeTypes {
|
|||||||
JetNodeType DOT_QIALIFIED_EXPRESSION = new JetNodeType("DOT_QIALIFIED_EXPRESSION", JetDotQualifiedExpression.class);
|
JetNodeType DOT_QIALIFIED_EXPRESSION = new JetNodeType("DOT_QIALIFIED_EXPRESSION", JetDotQualifiedExpression.class);
|
||||||
JetNodeType HASH_QIALIFIED_EXPRESSION = new JetNodeType("HASH_QIALIFIED_EXPRESSION", JetHashQualifiedExpression.class);
|
JetNodeType HASH_QIALIFIED_EXPRESSION = new JetNodeType("HASH_QIALIFIED_EXPRESSION", JetHashQualifiedExpression.class);
|
||||||
JetNodeType SAFE_ACCESS_EXPRESSION = new JetNodeType("SAFE_ACCESS_EXPRESSION", JetSafeQualifiedExpression.class);
|
JetNodeType SAFE_ACCESS_EXPRESSION = new JetNodeType("SAFE_ACCESS_EXPRESSION", JetSafeQualifiedExpression.class);
|
||||||
|
JetNodeType MATCH_BLOCK = new JetNodeType("MATCH_BLOCK", JetMatchBlock.class);
|
||||||
JetNodeType MATCH_ENTRY = new JetNodeType("MATCH_ENTRY");
|
JetNodeType MATCH_ENTRY = new JetNodeType("MATCH_ENTRY");
|
||||||
JetNodeType PATTERN = new JetNodeType("PATTERN");
|
JetNodeType PATTERN = new JetNodeType("PATTERN");
|
||||||
JetNodeType TUPLE_PATTERN = new JetNodeType("TUPLE_PATTERN");
|
JetNodeType TUPLE_PATTERN = new JetNodeType("TUPLE_PATTERN");
|
||||||
|
|||||||
@@ -82,6 +82,11 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
|||||||
public void parseRightHandSide(JetExpressionParsing parsing) {
|
public void parseRightHandSide(JetExpressionParsing parsing) {
|
||||||
parsing.parseMatchBlock();
|
parsing.parseMatchBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JetNodeType getProductType() {
|
||||||
|
return MATCH_EXPRESSION;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// TODO: don't build a binary tree, build a tuple
|
// TODO: don't build a binary tree, build a tuple
|
||||||
ARROW(JetTokens.ARROW),
|
ARROW(JetTokens.ARROW),
|
||||||
@@ -403,6 +408,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
|||||||
* "{" matchEntry+ "}"
|
* "{" matchEntry+ "}"
|
||||||
*/
|
*/
|
||||||
private void parseMatchBlock() {
|
private void parseMatchBlock() {
|
||||||
|
PsiBuilder.Marker mark = mark();
|
||||||
expect(LBRACE, "Expecting '{' to open a match block");
|
expect(LBRACE, "Expecting '{' to open a match block");
|
||||||
while (!eof() && !at(RBRACE)) {
|
while (!eof() && !at(RBRACE)) {
|
||||||
if (at(CASE_KEYWORD) || at(LBRACKET)) {
|
if (at(CASE_KEYWORD) || at(LBRACKET)) {
|
||||||
@@ -412,6 +418,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
expect(RBRACE, "Expecting '}'");
|
expect(RBRACE, "Expecting '}'");
|
||||||
|
mark.done(MATCH_BLOCK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package org.jetbrains.jet.lang.psi;
|
||||||
|
|
||||||
|
import com.intellij.lang.ASTNode;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author max
|
||||||
|
*/
|
||||||
|
public class JetMatchBlock extends JetElement {
|
||||||
|
public JetMatchBlock(@NotNull ASTNode node) {
|
||||||
|
super(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void accept(JetVisitor visitor) {
|
||||||
|
visitor.visitMatchBlock(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package org.jetbrains.jet.lang.psi;
|
||||||
|
|
||||||
|
import com.intellij.lang.ASTNode;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
import org.jetbrains.jet.JetNodeTypes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author max
|
||||||
|
*/
|
||||||
|
public class JetMatchExpression extends JetExpression {
|
||||||
|
public JetMatchExpression(@NotNull ASTNode node) {
|
||||||
|
super(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void accept(JetVisitor visitor) {
|
||||||
|
visitor.visitMatchExpression(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public JetExpression getTestedExpression() {
|
||||||
|
JetExpression left = findChildByClass(JetExpression.class);
|
||||||
|
assert left != null;
|
||||||
|
return left;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
public JetMatchBlock getMatchBlock() {
|
||||||
|
return (JetMatchBlock) findChildByType(JetNodeTypes.MATCH_BLOCK);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -317,4 +317,12 @@ public class JetVisitor extends PsiElementVisitor {
|
|||||||
public void visitBinaryWithTypeRHSExpression(JetBinaryExpressionWithTypeRHS expression) {
|
public void visitBinaryWithTypeRHSExpression(JetBinaryExpressionWithTypeRHS expression) {
|
||||||
visitExpression(expression);
|
visitExpression(expression);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void visitMatchExpression(JetMatchExpression expression) {
|
||||||
|
visitExpression(expression);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void visitMatchBlock(JetMatchBlock block) {
|
||||||
|
visitJetElement(block);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+282
-275
@@ -34,27 +34,28 @@ JetFile: Match.jet
|
|||||||
FUNCTION_LITERAL
|
FUNCTION_LITERAL
|
||||||
PsiElement(LBRACE)('{')
|
PsiElement(LBRACE)('{')
|
||||||
BODY
|
BODY
|
||||||
BINARY_EXPRESSION
|
MATCH_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('a')
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(match)('match')
|
PsiElement(match)('match')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
MATCH_BLOCK
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(LBRACE)('{')
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PATTERN
|
MATCH_ENTRY
|
||||||
USER_TYPE
|
PsiElement(case)('case')
|
||||||
PsiElement(IDENTIFIER)('a')
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
USER_TYPE
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('b')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(RBRACE)('}')
|
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiWhiteSpace('\n\n ')
|
||||||
PsiComment(EOL_COMMENT)('// foo')
|
PsiComment(EOL_COMMENT)('// foo')
|
||||||
@@ -88,302 +89,308 @@ JetFile: Match.jet
|
|||||||
BLOCK
|
BLOCK
|
||||||
PsiElement(LBRACE)('{')
|
PsiElement(LBRACE)('{')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
BINARY_EXPRESSION
|
MATCH_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('e')
|
PsiElement(IDENTIFIER)('e')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(match)('match')
|
PsiElement(match)('match')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
MATCH_BLOCK
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiElement(LBRACE)('{')
|
||||||
PsiElement(RBRACE)('}')
|
PsiWhiteSpace('\n\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
BINARY_EXPRESSION
|
MATCH_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('e')
|
PsiElement(IDENTIFIER)('e')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(match)('match')
|
PsiElement(match)('match')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
MATCH_BLOCK
|
||||||
PsiWhiteSpace('\n ')
|
PsiElement(LBRACE)('{')
|
||||||
MATCH_ENTRY
|
PsiWhiteSpace('\n ')
|
||||||
PsiElement(case)('case')
|
MATCH_ENTRY
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(case)('case')
|
||||||
PATTERN
|
|
||||||
USER_TYPE
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
PsiElement(RBRACE)('}')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
BINARY_EXPRESSION
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('e')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(match)('match')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
USER_TYPE
|
|
||||||
PsiElement(IDENTIFIER)('Tree')
|
|
||||||
TUPLE_PATTERN
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PATTERN
|
|
||||||
USER_TYPE
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiElement(COMMA)(',')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
USER_TYPE
|
|
||||||
PsiElement(IDENTIFIER)('b')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
USER_TYPE
|
|
||||||
PsiElement(IDENTIFIER)('Tree')
|
|
||||||
TUPLE_PATTERN
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PATTERN
|
|
||||||
USER_TYPE
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiElement(COMMA)(',')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
USER_TYPE
|
|
||||||
PsiElement(IDENTIFIER)('b')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(if)('if')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
CONDITION
|
|
||||||
BINARY_EXPRESSION
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(GT)('>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
INTEGER_CONSTANT
|
|
||||||
PsiElement(INTEGER_LITERAL)('5')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
NULL
|
|
||||||
PsiElement(null)('null')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
INTEGER_CONSTANT
|
|
||||||
PsiElement(INTEGER_LITERAL)('1')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
USER_TYPE
|
|
||||||
PsiElement(IDENTIFIER)('A')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
USER_TYPE
|
|
||||||
PsiElement(IDENTIFIER)('b')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
LONG_CONSTANT
|
|
||||||
PsiElement(LONG_LITERAL)('1l')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
FLOAT_CONSTANT
|
|
||||||
PsiElement(FLOAT_CONSTANT)('1.0')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
CHARACTER_CONSTANT
|
|
||||||
PsiElement(CHARACTER_LITERAL)(''c'')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
STRING_CONSTANT
|
|
||||||
PsiElement(STRING_LITERAL)('"sadfsa"')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
STRING_CONSTANT
|
|
||||||
PsiElement(RAW_STRING_LITERAL)('"""ddd"""')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
PsiElement(QUEST)('?')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
PsiElement(QUEST)('?')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(COLON)(':')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PATTERN
|
PATTERN
|
||||||
USER_TYPE
|
USER_TYPE
|
||||||
PsiElement(IDENTIFIER)('Foo')
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
PsiElement(QUEST)('?')
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(COLON)(':')
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('e')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(match)('match')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
MATCH_BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PATTERN
|
PATTERN
|
||||||
USER_TYPE
|
USER_TYPE
|
||||||
PsiElement(IDENTIFIER)('Foo')
|
PsiElement(IDENTIFIER)('Tree')
|
||||||
PsiWhiteSpace(' ')
|
TUPLE_PATTERN
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
PsiElement(LPAR)('(')
|
||||||
PsiWhiteSpace(' ')
|
PATTERN
|
||||||
REFERENCE_EXPRESSION
|
USER_TYPE
|
||||||
PsiElement(IDENTIFIER)('foo')
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiWhiteSpace('\n ')
|
PsiElement(COMMA)(',')
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
TUPLE_PATTERN
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PATTERN
|
|
||||||
PsiElement(QUEST)('?')
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(COLON)(':')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PATTERN
|
PATTERN
|
||||||
USER_TYPE
|
USER_TYPE
|
||||||
PsiElement(IDENTIFIER)('Foo')
|
PsiElement(IDENTIFIER)('b')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
USER_TYPE
|
||||||
|
PsiElement(IDENTIFIER)('Tree')
|
||||||
|
TUPLE_PATTERN
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PATTERN
|
||||||
|
USER_TYPE
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
USER_TYPE
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(if)('if')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
CONDITION
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('5')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
NULL
|
||||||
|
PsiElement(null)('null')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('1')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
USER_TYPE
|
||||||
|
PsiElement(IDENTIFIER)('A')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
USER_TYPE
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
LONG_CONSTANT
|
||||||
|
PsiElement(LONG_LITERAL)('1l')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
FLOAT_CONSTANT
|
||||||
|
PsiElement(FLOAT_CONSTANT)('1.0')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
CHARACTER_CONSTANT
|
||||||
|
PsiElement(CHARACTER_LITERAL)(''c'')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
STRING_CONSTANT
|
||||||
|
PsiElement(STRING_LITERAL)('"sadfsa"')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
STRING_CONSTANT
|
||||||
|
PsiElement(RAW_STRING_LITERAL)('"""ddd"""')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
PsiElement(QUEST)('?')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
PsiElement(QUEST)('?')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(COLON)(':')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PATTERN
|
PATTERN
|
||||||
USER_TYPE
|
USER_TYPE
|
||||||
PsiElement(IDENTIFIER)('b')
|
PsiElement(IDENTIFIER)('Foo')
|
||||||
PsiElement(RPAR)(')')
|
PsiWhiteSpace(' ')
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
PsiWhiteSpace(' ')
|
||||||
PsiWhiteSpace(' ')
|
REFERENCE_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
PsiWhiteSpace('\n ')
|
||||||
PsiWhiteSpace('\n ')
|
MATCH_ENTRY
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
PsiElement(QUEST)('?')
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(COLON)(':')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
USER_TYPE
|
||||||
|
PsiElement(IDENTIFIER)('Foo')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
TUPLE_PATTERN
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PATTERN
|
||||||
|
PsiElement(QUEST)('?')
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(COLON)(':')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
USER_TYPE
|
||||||
|
PsiElement(IDENTIFIER)('Foo')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
USER_TYPE
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
BINARY_EXPRESSION
|
MATCH_EXPRESSION
|
||||||
BINARY_EXPRESSION
|
MATCH_EXPRESSION
|
||||||
BINARY_EXPRESSION
|
MATCH_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('e')
|
PsiElement(IDENTIFIER)('e')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(match)('match')
|
PsiElement(match)('match')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
MATCH_BLOCK
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiElement(LBRACE)('{')
|
||||||
PsiElement(RBRACE)('}')
|
PsiWhiteSpace('\n\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(match)('match')
|
PsiElement(match)('match')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
MATCH_BLOCK
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiElement(LBRACE)('{')
|
||||||
PsiElement(RBRACE)('}')
|
PsiWhiteSpace('\n\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(match)('match')
|
PsiElement(match)('match')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
MATCH_BLOCK
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiElement(LBRACE)('{')
|
||||||
PsiElement(RBRACE)('}')
|
PsiWhiteSpace('\n\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
+124
-117
@@ -13,146 +13,81 @@ JetFile: Match_ERR.jet
|
|||||||
BLOCK
|
BLOCK
|
||||||
PsiElement(LBRACE)('{')
|
PsiElement(LBRACE)('{')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
BINARY_EXPRESSION
|
MATCH_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('e')
|
PsiElement(IDENTIFIER)('e')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(match)('match')
|
PsiElement(match)('match')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
MATCH_BLOCK
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiElement(LBRACE)('{')
|
||||||
PsiElement(RBRACE)('}')
|
PsiWhiteSpace('\n\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
BINARY_EXPRESSION
|
MATCH_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('e')
|
PsiElement(IDENTIFIER)('e')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(match)('match')
|
PsiElement(match)('match')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
MATCH_BLOCK
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
PsiErrorElement:Pattern expected
|
|
||||||
<empty list>
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
PsiElement(RBRACE)('}')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
BINARY_EXPRESSION
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('e')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(match)('match')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
PsiErrorElement:Pattern expected
|
|
||||||
<empty list>
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiErrorElement:Expecting an expression
|
|
||||||
PsiElement(SEMICOLON)(';')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
PsiElement(RBRACE)('}')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
BINARY_EXPRESSION
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('e')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(match)('match')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
PsiErrorElement:Expecting 'case' to start pattern matching
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
MATCH_ENTRY
|
|
||||||
PsiElement(case)('case')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
USER_TYPE
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
PsiElement(RBRACE)('}')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
BINARY_EXPRESSION
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('e')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(match)('match')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
PsiErrorElement:Expecting 'case' to start pattern matching
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
PsiElement(RBRACE)('}')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
BINARY_EXPRESSION
|
|
||||||
BINARY_EXPRESSION
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('e')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(match)('match')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(LBRACE)('{')
|
PsiElement(LBRACE)('{')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
MATCH_ENTRY
|
MATCH_ENTRY
|
||||||
PsiElement(case)('case')
|
PsiElement(case)('case')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PATTERN
|
PATTERN
|
||||||
PsiErrorElement:Pattern expected
|
PsiErrorElement:Pattern expected
|
||||||
PsiElement(MINUS)('-')
|
<empty list>
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('foo')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('e')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(match)('match')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
MATCH_BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
PsiErrorElement:Pattern expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiErrorElement:Expecting an expression
|
||||||
|
PsiElement(SEMICOLON)(';')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('e')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(match)('match')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
MATCH_BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
PsiErrorElement:Expecting 'case' to start pattern matching
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
MATCH_ENTRY
|
MATCH_ENTRY
|
||||||
PsiElement(case)('case')
|
PsiElement(case)('case')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PATTERN
|
PATTERN
|
||||||
TUPLE_PATTERN
|
USER_TYPE
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiErrorElement:Expecting a pattern
|
|
||||||
PsiElement(COMMA)(',')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiErrorElement:Expecting a pattern
|
|
||||||
PsiElement(COMMA)(',')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
INTEGER_CONSTANT
|
|
||||||
PsiElement(INTEGER_LITERAL)('1')
|
|
||||||
PsiElement(COMMA)(',')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiErrorElement:Expecting a pattern
|
|
||||||
PsiElement(COMMA)(',')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PATTERN
|
|
||||||
PsiErrorElement:Pattern expected
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiErrorElement:Expecting ')'
|
|
||||||
<empty list>
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
@@ -160,11 +95,83 @@ JetFile: Match_ERR.jet
|
|||||||
PsiElement(IDENTIFIER)('foo')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('e')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(match)('match')
|
PsiElement(match)('match')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
MATCH_BLOCK
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiElement(LBRACE)('{')
|
||||||
PsiElement(RBRACE)('}')
|
PsiWhiteSpace('\n ')
|
||||||
|
PsiErrorElement:Expecting 'case' to start pattern matching
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_EXPRESSION
|
||||||
|
MATCH_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('e')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(match)('match')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
MATCH_BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
PsiErrorElement:Pattern expected
|
||||||
|
PsiElement(MINUS)('-')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
MATCH_ENTRY
|
||||||
|
PsiElement(case)('case')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
TUPLE_PATTERN
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiErrorElement:Expecting a pattern
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiErrorElement:Expecting a pattern
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('1')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiErrorElement:Expecting a pattern
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PATTERN
|
||||||
|
PsiErrorElement:Pattern expected
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiErrorElement:Expecting ')'
|
||||||
|
<empty list>
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(match)('match')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
MATCH_BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
@@ -212,31 +212,32 @@ JetFile: NewlinesInParentheses.jet
|
|||||||
PsiElement(IDENTIFIER)('d')
|
PsiElement(IDENTIFIER)('d')
|
||||||
PsiElement(RBRACKET)(']')
|
PsiElement(RBRACKET)(']')
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiWhiteSpace('\n\n ')
|
||||||
BINARY_EXPRESSION
|
MATCH_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('e')
|
PsiElement(IDENTIFIER)('e')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(match)('match')
|
PsiElement(match)('match')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
MATCH_BLOCK
|
||||||
PsiWhiteSpace('\n ')
|
PsiElement(LBRACE)('{')
|
||||||
MATCH_ENTRY
|
PsiWhiteSpace('\n ')
|
||||||
PsiElement(case)('case')
|
MATCH_ENTRY
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(case)('case')
|
||||||
PATTERN
|
PsiWhiteSpace(' ')
|
||||||
USER_TYPE
|
PATTERN
|
||||||
PsiElement(IDENTIFIER)('A')
|
USER_TYPE
|
||||||
PsiWhiteSpace('\n ')
|
PsiElement(IDENTIFIER)('A')
|
||||||
TUPLE_PATTERN
|
PsiWhiteSpace('\n ')
|
||||||
PsiElement(LPAR)('(')
|
TUPLE_PATTERN
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(LPAR)('(')
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(RPAR)(')')
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
PsiWhiteSpace(' ')
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
REFERENCE_EXPRESSION
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(SEMICOLON)(';')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
PsiWhiteSpace('\n ')
|
PsiElement(SEMICOLON)(';')
|
||||||
PsiElement(RBRACE)('}')
|
PsiWhiteSpace('\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
@@ -605,8 +605,8 @@ JetFile: Precedence.jet
|
|||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(EQ)('=')
|
PsiElement(EQ)('=')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
BINARY_EXPRESSION
|
MATCH_EXPRESSION
|
||||||
BINARY_EXPRESSION
|
MATCH_EXPRESSION
|
||||||
BINARY_EXPRESSION
|
BINARY_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('b')
|
PsiElement(IDENTIFIER)('b')
|
||||||
@@ -618,13 +618,15 @@ JetFile: Precedence.jet
|
|||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(match)('match')
|
PsiElement(match)('match')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
MATCH_BLOCK
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(match)('match')
|
PsiElement(match)('match')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
MATCH_BLOCK
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
BINARY_EXPRESSION
|
BINARY_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
@@ -632,7 +634,7 @@ JetFile: Precedence.jet
|
|||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(EQ)('=')
|
PsiElement(EQ)('=')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
BINARY_EXPRESSION
|
MATCH_EXPRESSION
|
||||||
BINARY_EXPRESSION
|
BINARY_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('b')
|
PsiElement(IDENTIFIER)('b')
|
||||||
@@ -644,8 +646,9 @@ JetFile: Precedence.jet
|
|||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(match)('match')
|
PsiElement(match)('match')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
MATCH_BLOCK
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
BINARY_EXPRESSION
|
BINARY_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
@@ -660,14 +663,15 @@ JetFile: Precedence.jet
|
|||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(ARROW)('->')
|
PsiElement(ARROW)('->')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
BINARY_EXPRESSION
|
MATCH_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('c')
|
PsiElement(IDENTIFIER)('c')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(match)('match')
|
PsiElement(match)('match')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
MATCH_BLOCK
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(ARROW)('->')
|
PsiElement(ARROW)('->')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
|
|||||||
@@ -72,44 +72,45 @@ JetFile: RootNamespace.jet
|
|||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
BINARY_EXPRESSION
|
MATCH_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('e')
|
PsiElement(IDENTIFIER)('e')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(match)('match')
|
PsiElement(match)('match')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
MATCH_BLOCK
|
||||||
PsiWhiteSpace('\n ')
|
PsiElement(LBRACE)('{')
|
||||||
MATCH_ENTRY
|
PsiWhiteSpace('\n ')
|
||||||
PsiElement(case)('case')
|
MATCH_ENTRY
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(case)('case')
|
||||||
PATTERN
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(namespace)('namespace')
|
PATTERN
|
||||||
PsiElement(DOT)('.')
|
PsiElement(namespace)('namespace')
|
||||||
USER_TYPE
|
PsiElement(DOT)('.')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
USER_TYPE
|
||||||
PsiElement(DOT)('.')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
USER_TYPE
|
PsiElement(DOT)('.')
|
||||||
PsiElement(IDENTIFIER)('bar')
|
USER_TYPE
|
||||||
PsiElement(DOT)('.')
|
PsiElement(IDENTIFIER)('bar')
|
||||||
USER_TYPE
|
PsiElement(DOT)('.')
|
||||||
PsiElement(IDENTIFIER)('X')
|
USER_TYPE
|
||||||
TUPLE_PATTERN
|
PsiElement(IDENTIFIER)('X')
|
||||||
PsiElement(LPAR)('(')
|
TUPLE_PATTERN
|
||||||
PATTERN
|
PsiElement(LPAR)('(')
|
||||||
USER_TYPE
|
PATTERN
|
||||||
PsiElement(IDENTIFIER)('x')
|
USER_TYPE
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(IDENTIFIER)('x')
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(RPAR)(')')
|
||||||
PsiElement(DOUBLE_ARROW)('=>')
|
PsiWhiteSpace(' ')
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(DOUBLE_ARROW)('=>')
|
||||||
FUNCTION_LITERAL
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LBRACE)('{')
|
FUNCTION_LITERAL
|
||||||
BODY
|
PsiElement(LBRACE)('{')
|
||||||
<empty list>
|
BODY
|
||||||
PsiElement(RBRACE)('}')
|
<empty list>
|
||||||
PsiWhiteSpace('\n ')
|
PsiElement(RBRACE)('}')
|
||||||
PsiElement(RBRACE)('}')
|
PsiWhiteSpace('\n ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user