Fixing function types
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[inline] fun with<T>(receiver : T, body : T.{() : Unit}) = receiver.body()
|
||||
[inline] fun with<T>(receiver : T, body : {T.() : Unit}) = receiver.body()
|
||||
|
||||
fun example() {
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ initializer
|
||||
;
|
||||
|
||||
block
|
||||
: "{" (expression SEMI)* "}"
|
||||
: "{" expressions "}"
|
||||
;
|
||||
|
||||
decomposer // TODO: consider other names
|
||||
|
||||
+18
-28
@@ -3,9 +3,6 @@ expression
|
||||
: literalConstant
|
||||
: functionLiteral
|
||||
: tupleLiteral
|
||||
: listLiteral
|
||||
: mapLiteral
|
||||
: range
|
||||
: "null"
|
||||
: "this" ("<" type ">")?
|
||||
: expressionWithPrecedences
|
||||
@@ -70,6 +67,7 @@ typingOperation
|
||||
: "as"
|
||||
: "is"
|
||||
: "isnot"
|
||||
: ":"
|
||||
;
|
||||
|
||||
binOpExpression
|
||||
@@ -77,19 +75,23 @@ binOpExpression
|
||||
;
|
||||
|
||||
binaryOperation // Decreasing precedence
|
||||
// .
|
||||
: "." : "?." : "#"
|
||||
// unary
|
||||
: "*" : "/" : "%"
|
||||
: "+" : "-"
|
||||
// No << >> >>>
|
||||
// named functions in infix form
|
||||
: "<" : ">" : ">=" : "<=" : "in" // is isnot as // TODO: Check the precedence for in carefully
|
||||
: ".."
|
||||
: SimpleName
|
||||
: "?:"
|
||||
: "in" : "is" : "!in" : "!is" : "as"
|
||||
: "<" : ">" : ">=" : "<="
|
||||
: "!=" : "==" : "===" : "!=="
|
||||
// No | & ^ ~
|
||||
: "&&"
|
||||
: "||"
|
||||
: "?:"
|
||||
// assignments
|
||||
: "->"
|
||||
: ":"
|
||||
: assignmentOperator
|
||||
;
|
||||
|
||||
assignmentOperator
|
||||
@@ -152,32 +154,20 @@ tupleLiteral // Ambiguity when after a SimpleName (infix call). In this case (e)
|
||||
;
|
||||
|
||||
functionLiteral // one can use "it" as a parameter name
|
||||
: "{" SimpleName "=>" expression "}"
|
||||
: "{" "(" SimpleName{","} ")" "=>" expression "}"
|
||||
: "{" "(" parameter{","} ")" (":" type)? "=>" expression "}"
|
||||
: "{" expressions "}"
|
||||
: "{" (type ".")? SimpleName "=>" expressions "}"
|
||||
: "{" (type ".")? "(" SimpleName{","} ")" "=>" expressions "}"
|
||||
: "{" (type ".")? "(" parameter{","} ")" (":" type)? "=>" expressions "}"
|
||||
;
|
||||
|
||||
expressions
|
||||
: expression{SEMI} SEMI?
|
||||
;
|
||||
|
||||
constructorInvocation
|
||||
: userType valueArguments?
|
||||
;
|
||||
|
||||
listLiteral
|
||||
: "[" expression{","}? "]"
|
||||
;
|
||||
|
||||
mapLiteral
|
||||
: "[" mapLiteralEntry{","} "]"
|
||||
: "[" ":" "]"
|
||||
;
|
||||
|
||||
mapLiteralEntry
|
||||
: expression ":" expression
|
||||
;
|
||||
|
||||
range
|
||||
: "[" expression ".." expression "]"
|
||||
;
|
||||
|
||||
memberAccess
|
||||
: functionCall
|
||||
: fieldOrPropertyAccess
|
||||
|
||||
@@ -10,11 +10,11 @@ Foo<Bar<X>, T, Object> // user type
|
||||
*/
|
||||
|
||||
type
|
||||
: attributes (userType | functionType | tupleType)
|
||||
: attributes (functionType | userType | tupleType)
|
||||
;
|
||||
|
||||
userType
|
||||
: /*(SimpleName ".")* */ simpleUserType{"."}
|
||||
: simpleUserType{"."}
|
||||
;
|
||||
|
||||
simpleUserType
|
||||
@@ -26,7 +26,7 @@ optionalProjection
|
||||
;
|
||||
|
||||
functionType
|
||||
: (type ".")? "{" functionTypeContents "}"
|
||||
: "{" (type ".")? functionTypeContents "}"
|
||||
;
|
||||
|
||||
functionTypeContents
|
||||
|
||||
@@ -87,6 +87,7 @@ public interface JetNodeTypes {
|
||||
JetNodeType LOOP_PARAMETER = new JetNodeType("LOOP_PARAMETER");
|
||||
JetNodeType LOOP_RANGE = new JetNodeType("LOOP_RANGE");
|
||||
JetNodeType BODY = new JetNodeType("BODY");
|
||||
JetNodeType RECEIVER_TYPE = new JetNodeType("RECEIVER_TYPE");
|
||||
|
||||
IElementType NAMESPACE_NAME = new JetNodeType("NAMESPACE_NAME");
|
||||
}
|
||||
|
||||
@@ -170,6 +170,13 @@ import static org.jetbrains.jet.lexer.JetTokens.*;
|
||||
int openBrackets = 0;
|
||||
IElementType previousToken = null;
|
||||
while (!eof()) {
|
||||
if (atSet(lookFor)
|
||||
&& openAngleBrackets == 0
|
||||
&& openBrackets == 0
|
||||
&& openBraces == 0
|
||||
&& openParentheses == 0) {
|
||||
lastOccurrence = myBuilder.getCurrentOffset();
|
||||
}
|
||||
if (atSet(stopAt)) {
|
||||
if (openAngleBrackets == 0
|
||||
&& openBrackets == 0
|
||||
@@ -202,13 +209,6 @@ import static org.jetbrains.jet.lexer.JetTokens.*;
|
||||
else if (at(RBRACKET)) {
|
||||
openBrackets--;
|
||||
}
|
||||
else if (atSet(lookFor)
|
||||
&& openAngleBrackets == 0
|
||||
&& openBrackets == 0
|
||||
&& openBraces == 0
|
||||
&& openParentheses == 0) {
|
||||
lastOccurrence = myBuilder.getCurrentOffset();
|
||||
}
|
||||
previousToken = tt();
|
||||
advance(); // skip token
|
||||
}
|
||||
|
||||
@@ -24,9 +24,6 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
* : literalConstant
|
||||
* : functionLiteral
|
||||
* : tupleLiteral
|
||||
* : listLiteral
|
||||
* : mapLiteral
|
||||
* : range
|
||||
* : "null"
|
||||
* : "this" ("<" type ">")?
|
||||
* : expressionWithPrecedences
|
||||
@@ -46,9 +43,6 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
if (at(LPAR)) {
|
||||
parseParenthesizedExpressionOrTuple();
|
||||
}
|
||||
else if (at(LBRACKET)) {
|
||||
parseMapListOrRange();
|
||||
}
|
||||
else if (at(THIS_KEYWORD)) {
|
||||
parseThisExpression();
|
||||
}
|
||||
@@ -88,22 +82,6 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
else if (at(DO_KEYWORD)) {
|
||||
parseDoWhile();
|
||||
}
|
||||
else if (atSet(TokenSet.create(
|
||||
CLASS_KEYWORD,
|
||||
EXTENSION_KEYWORD,
|
||||
FUN_KEYWORD,
|
||||
VAL_KEYWORD,
|
||||
VAR_KEYWORD,
|
||||
TYPE_KEYWORD))) {
|
||||
// TODO
|
||||
}
|
||||
else if (at(IDENTIFIER)) {
|
||||
advance(); // TODO
|
||||
}
|
||||
else if (at(LBRACE)) {
|
||||
// TODO
|
||||
myJetParsing.parseBlock();
|
||||
}
|
||||
else if (at(INTEGER_LITERAL)) {
|
||||
parseOneTokenExpression(INTEGER_CONSTANT);
|
||||
}
|
||||
@@ -128,6 +106,24 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
else if (at(NULL_KEYWORD)) {
|
||||
parseOneTokenExpression(NULL);
|
||||
}
|
||||
else if (atSet(TokenSet.create(
|
||||
CLASS_KEYWORD,
|
||||
EXTENSION_KEYWORD,
|
||||
FUN_KEYWORD,
|
||||
VAL_KEYWORD,
|
||||
VAR_KEYWORD,
|
||||
TYPE_KEYWORD))) {
|
||||
// modifiers
|
||||
// attributes
|
||||
// TODO
|
||||
}
|
||||
else if (at(IDENTIFIER)) {
|
||||
advance(); // TODO
|
||||
}
|
||||
else if (at(LBRACE)) {
|
||||
// TODO
|
||||
myJetParsing.parseBlock();
|
||||
}
|
||||
else {
|
||||
errorAndAdvance("Expecting an expression");
|
||||
}
|
||||
@@ -390,90 +386,6 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
typeof.done(TYPEOF);
|
||||
}
|
||||
|
||||
/*
|
||||
* listLiteral
|
||||
* : "[" expression{","}? "]"
|
||||
* ;
|
||||
*
|
||||
* mapLiteral
|
||||
* : "[" mapEntryLiteral{","} "]"
|
||||
* : "[" ":" "]"
|
||||
* ;
|
||||
*
|
||||
* mapEntryLiteral
|
||||
* : expression ":" expression
|
||||
* ;
|
||||
*
|
||||
* range
|
||||
* : "[" expression ".." expression "]"
|
||||
* ;
|
||||
*/
|
||||
private void parseMapListOrRange() {
|
||||
assert at(LBRACKET);
|
||||
|
||||
PsiBuilder.Marker literal = mark();
|
||||
|
||||
advance(); // LBRACKET
|
||||
|
||||
// If this is an empty map "[:]"
|
||||
if (at(COLON)) {
|
||||
advance(); // COLON
|
||||
expect(RBRACKET, "Expecting ']' to close an empty map literal '[:]'");
|
||||
literal.done(MAP_LITERAL);
|
||||
return;
|
||||
}
|
||||
|
||||
// If this is an empty list "[]"
|
||||
if (at(RBRACKET)) {
|
||||
advance(); // RBRACKET
|
||||
literal.done(LIST_LITERAL);
|
||||
return;
|
||||
}
|
||||
|
||||
PsiBuilder.Marker item = mark();
|
||||
parseExpression();
|
||||
|
||||
// If it is a map "[e:e, e:e]"
|
||||
if (at(COLON)) {
|
||||
advance(); // COLON
|
||||
|
||||
parseExpression();
|
||||
item.done(MAP_LITERAL_ENTRY);
|
||||
|
||||
while (at(COMMA)) {
|
||||
advance(); // COMMA
|
||||
if (at(COMMA)) error("Expecting a map entry");
|
||||
parseMapLiteralEntry();
|
||||
}
|
||||
expect(RBRACKET, "Expecting ']' to close a map literal");
|
||||
literal.done(MAP_LITERAL);
|
||||
return;
|
||||
}
|
||||
|
||||
// If it is a range "[a..b]"
|
||||
if (at(RANGE)) {
|
||||
item.drop();
|
||||
advance(); // RANGE
|
||||
|
||||
parseExpression();
|
||||
|
||||
expect(RBRACKET, "Expecting ']' to close the range");
|
||||
literal.done(RANGE_LITERAL);
|
||||
return;
|
||||
}
|
||||
|
||||
// Else: it must be a list literal "[a, b, c]"
|
||||
item.drop();
|
||||
while (at(COMMA)) {
|
||||
advance(); // COMMA
|
||||
if (at(COMMA)) error("Expecting a list entry");
|
||||
parseExpression();
|
||||
}
|
||||
|
||||
expect(RBRACKET, "Expecting a ']' to close a list");
|
||||
literal.done(LIST_LITERAL);
|
||||
}
|
||||
|
||||
/*
|
||||
* mapLiteralEntry
|
||||
* : expression ":" expression
|
||||
|
||||
@@ -8,9 +8,7 @@ import com.intellij.psi.tree.IElementType;
|
||||
import com.intellij.psi.tree.TokenSet;
|
||||
import org.jetbrains.jet.JetNodeType;
|
||||
import org.jetbrains.jet.lexer.JetKeywordToken;
|
||||
import org.jetbrains.jet.lexer.JetToken;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1128,7 +1126,7 @@ public class JetParsing extends AbstractJetParsing {
|
||||
|
||||
/*
|
||||
* type
|
||||
* : attributes (userType | functionType | tupleType)
|
||||
* : attributes (functionType | userType | tupleType)
|
||||
* ;
|
||||
*/
|
||||
public void parseTypeRef() {
|
||||
@@ -1136,25 +1134,19 @@ public class JetParsing extends AbstractJetParsing {
|
||||
|
||||
parseAttributeList();
|
||||
|
||||
TokenSet simpleTypeFirst = TokenSet.create(IDENTIFIER, LBRACE, LPAR);
|
||||
while (true) {
|
||||
if (at(IDENTIFIER)) {
|
||||
parseSimpleUserType();
|
||||
}
|
||||
else if (at(LBRACE)) {
|
||||
parseSimpleFunctionType();
|
||||
} else if (at(LPAR)) {
|
||||
parseTupleType();
|
||||
} else {
|
||||
errorWithRecovery("Type expected",
|
||||
TokenSet.orSet(TOPLEVEL_OBJECT_FIRST,
|
||||
TokenSet.create(EQ, COMMA, GT, RBRACKET, DOT, RPAR, RBRACE, LBRACE, SEMICOLON)));
|
||||
break;
|
||||
}
|
||||
|
||||
if (!at(DOT)) break;
|
||||
if (!simpleTypeFirst.contains(lookahead(1))) break;
|
||||
advance(); // DOT
|
||||
if (at(IDENTIFIER)) {
|
||||
parseUserType();
|
||||
}
|
||||
else if (at(LBRACE)) {
|
||||
parseFunctionType();
|
||||
}
|
||||
else if (at(LPAR)) {
|
||||
parseTupleType();
|
||||
}
|
||||
else {
|
||||
errorWithRecovery("Type expected",
|
||||
TokenSet.orSet(TOPLEVEL_OBJECT_FIRST,
|
||||
TokenSet.create(EQ, COMMA, GT, RBRACKET, DOT, RPAR, RBRACE, LBRACE, SEMICOLON)));
|
||||
}
|
||||
type.done(TYPE_REFERENCE);
|
||||
}
|
||||
@@ -1165,15 +1157,11 @@ public class JetParsing extends AbstractJetParsing {
|
||||
* ;
|
||||
*/
|
||||
private void parseUserType() {
|
||||
PsiBuilder.Marker userType = mark();
|
||||
|
||||
while (true) {
|
||||
parseSimpleUserType();
|
||||
if (!at(DOT)) break;
|
||||
advance(); // DOT
|
||||
}
|
||||
|
||||
userType.done(TYPE_REFERENCE);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1256,16 +1244,25 @@ public class JetParsing extends AbstractJetParsing {
|
||||
}
|
||||
|
||||
/*
|
||||
* simpleFunctionType
|
||||
* : "{" functionTypeContents "}"
|
||||
* functionType
|
||||
* : "{" (type ".")? functionTypeContents "}"
|
||||
* ;
|
||||
*/
|
||||
private void parseSimpleFunctionType() {
|
||||
private void parseFunctionType() {
|
||||
assert at(LBRACE);
|
||||
|
||||
PsiBuilder.Marker functionType = mark();
|
||||
|
||||
advance(); // LBRACE
|
||||
|
||||
int lastLPar = findLastBefore(TokenSet.create(LPAR), TokenSet.create(RBRACE, COLON), false);
|
||||
if (lastLPar >= 0 && lastLPar > myBuilder.getCurrentOffset()) {
|
||||
PsiBuilder.Marker receiverType = mark();
|
||||
createTruncatedBuilder(lastLPar - 1).parseTypeRef();
|
||||
receiverType.done(RECEIVER_TYPE);
|
||||
advance(); // DOT
|
||||
}
|
||||
|
||||
parseFunctionTypeContents();
|
||||
|
||||
expect(RBRACE, "Expecting '}");
|
||||
|
||||
@@ -85,7 +85,6 @@ RAW_STRING_LITERAL = {THREE_QUO} {QUO_STRING_CHAR}* {THREE_QUO}?
|
||||
<YYINITIAL> "return" { return JetTokens.RETURN_KEYWORD ;}
|
||||
<YYINITIAL> "typeof" { return JetTokens.TYPEOF_KEYWORD ;}
|
||||
<YYINITIAL> "object" { return JetTokens.OBJECT_KEYWORD ;}
|
||||
<YYINITIAL> "isnot" { return JetTokens.ISNOT_KEYWORD ;}
|
||||
<YYINITIAL> "while" { return JetTokens.WHILE_KEYWORD ;}
|
||||
<YYINITIAL> "break" { return JetTokens.BREAK_KEYWORD ;}
|
||||
<YYINITIAL> "class" { return JetTokens.CLASS_KEYWORD ;}
|
||||
@@ -113,26 +112,14 @@ RAW_STRING_LITERAL = {THREE_QUO} {QUO_STRING_CHAR}* {THREE_QUO}?
|
||||
|
||||
<YYINITIAL> {IDENTIFIER} { return JetTokens.IDENTIFIER; }
|
||||
|
||||
<YYINITIAL> "[" { return JetTokens.LBRACKET ; }
|
||||
<YYINITIAL> "]" { return JetTokens.RBRACKET ; }
|
||||
<YYINITIAL> "{" { return JetTokens.LBRACE ; }
|
||||
<YYINITIAL> "}" { return JetTokens.RBRACE ; }
|
||||
<YYINITIAL> "(" { return JetTokens.LPAR ; }
|
||||
<YYINITIAL> ")" { return JetTokens.RPAR ; }
|
||||
<YYINITIAL> "." { return JetTokens.DOT ; }
|
||||
<YYINITIAL> "===" { return JetTokens.EQEQEQ ; }
|
||||
<YYINITIAL> "!==" { return JetTokens.EXCLEQEQEQ; }
|
||||
<YYINITIAL> "!in" { return JetTokens.NOT_IN; }
|
||||
<YYINITIAL> "!is" { return JetTokens.NOT_IS; }
|
||||
<YYINITIAL> "++" { return JetTokens.PLUSPLUS ; }
|
||||
<YYINITIAL> "--" { return JetTokens.MINUSMINUS; }
|
||||
<YYINITIAL> "*" { return JetTokens.MUL ; }
|
||||
<YYINITIAL> "+" { return JetTokens.PLUS ; }
|
||||
<YYINITIAL> "-" { return JetTokens.MINUS ; }
|
||||
<YYINITIAL> "!" { return JetTokens.EXCL ; }
|
||||
<YYINITIAL> "/" { return JetTokens.DIV ; }
|
||||
<YYINITIAL> "%" { return JetTokens.PERC ; }
|
||||
<YYINITIAL> "<" { return JetTokens.LT ; }
|
||||
<YYINITIAL> ">" { return JetTokens.GT ; }
|
||||
<YYINITIAL> "<=" { return JetTokens.LTEQ ; }
|
||||
<YYINITIAL> ">=" { return JetTokens.GTEQ ; }
|
||||
<YYINITIAL> "===" { return JetTokens.EQEQEQ ; }
|
||||
<YYINITIAL> "==" { return JetTokens.EQEQ ; }
|
||||
<YYINITIAL> "!=" { return JetTokens.EXCLEQ ; }
|
||||
<YYINITIAL> "&&" { return JetTokens.ANDAND ; }
|
||||
@@ -141,16 +128,32 @@ RAW_STRING_LITERAL = {THREE_QUO} {QUO_STRING_CHAR}* {THREE_QUO}?
|
||||
<YYINITIAL> "?:" { return JetTokens.ELVIS ; }
|
||||
<YYINITIAL> ".*" { return JetTokens.MAP ; }
|
||||
<YYINITIAL> ".?" { return JetTokens.FILTER ; }
|
||||
<YYINITIAL> "?" { return JetTokens.QUEST ; }
|
||||
<YYINITIAL> ":" { return JetTokens.COLON ; }
|
||||
<YYINITIAL> ";" { return JetTokens.SEMICOLON ; }
|
||||
<YYINITIAL> ".." { return JetTokens.RANGE ; }
|
||||
<YYINITIAL> "=" { return JetTokens.EQ ; }
|
||||
<YYINITIAL> "*=" { return JetTokens.MULTEQ ; }
|
||||
<YYINITIAL> "/=" { return JetTokens.DIVEQ ; }
|
||||
<YYINITIAL> "%=" { return JetTokens.PERCEQ ; }
|
||||
<YYINITIAL> "+=" { return JetTokens.PLUSEQ ; }
|
||||
<YYINITIAL> "-=" { return JetTokens.MINUSEQ ; }
|
||||
<YYINITIAL> "->" { return JetTokens.ARROW ; }
|
||||
<YYINITIAL> "[" { return JetTokens.LBRACKET ; }
|
||||
<YYINITIAL> "]" { return JetTokens.RBRACKET ; }
|
||||
<YYINITIAL> "{" { return JetTokens.LBRACE ; }
|
||||
<YYINITIAL> "}" { return JetTokens.RBRACE ; }
|
||||
<YYINITIAL> "(" { return JetTokens.LPAR ; }
|
||||
<YYINITIAL> ")" { return JetTokens.RPAR ; }
|
||||
<YYINITIAL> "." { return JetTokens.DOT ; }
|
||||
<YYINITIAL> "*" { return JetTokens.MUL ; }
|
||||
<YYINITIAL> "+" { return JetTokens.PLUS ; }
|
||||
<YYINITIAL> "-" { return JetTokens.MINUS ; }
|
||||
<YYINITIAL> "!" { return JetTokens.EXCL ; }
|
||||
<YYINITIAL> "/" { return JetTokens.DIV ; }
|
||||
<YYINITIAL> "%" { return JetTokens.PERC ; }
|
||||
<YYINITIAL> "<" { return JetTokens.LT ; }
|
||||
<YYINITIAL> ">" { return JetTokens.GT ; }
|
||||
<YYINITIAL> "?" { return JetTokens.QUEST ; }
|
||||
<YYINITIAL> ":" { return JetTokens.COLON ; }
|
||||
<YYINITIAL> ";" { return JetTokens.SEMICOLON ; }
|
||||
<YYINITIAL> ".." { return JetTokens.RANGE ; }
|
||||
<YYINITIAL> "=" { return JetTokens.EQ ; }
|
||||
<YYINITIAL> "," { return JetTokens.COMMA ; }
|
||||
|
||||
<YYINITIAL> . { return TokenType.BAD_CHARACTER; }
|
||||
|
||||
@@ -40,7 +40,6 @@ public interface JetTokens {
|
||||
JetKeywordToken TRUE_KEYWORD = JetKeywordToken.keyword("true");
|
||||
JetKeywordToken FALSE_KEYWORD = JetKeywordToken.keyword("false");
|
||||
JetKeywordToken IS_KEYWORD = JetKeywordToken.keyword("is");
|
||||
JetKeywordToken ISNOT_KEYWORD = JetKeywordToken.keyword("isnot");
|
||||
JetKeywordToken IN_KEYWORD = JetKeywordToken.keyword("in");
|
||||
JetKeywordToken THROW_KEYWORD = JetKeywordToken.keyword("throw");
|
||||
JetKeywordToken RETURN_KEYWORD = JetKeywordToken.keyword("return");
|
||||
@@ -77,6 +76,8 @@ public interface JetTokens {
|
||||
JetToken LTEQ = new JetToken("LTEQ");
|
||||
JetToken GTEQ = new JetToken("GTEQ");
|
||||
JetToken EQEQEQ = new JetToken("EQEQEQ");
|
||||
JetToken ARROW = new JetToken("ARROW");
|
||||
JetToken EXCLEQEQEQ = new JetToken("EXCLEQEQEQ");
|
||||
JetToken EQEQ = new JetToken("EQEQ");
|
||||
JetToken EXCLEQ = new JetToken("EXCLEQ");
|
||||
JetToken ANDAND = new JetToken("ANDAND");
|
||||
@@ -95,10 +96,12 @@ public interface JetTokens {
|
||||
JetToken PERCEQ = new JetToken("PERCEQ");
|
||||
JetToken PLUSEQ = new JetToken("PLUSEQ");
|
||||
JetToken MINUSEQ = new JetToken("MINUSEQ");
|
||||
JetToken NOT_IN = new JetToken("NOT_IN");
|
||||
JetToken NOT_IS = new JetToken("NOT_IS");
|
||||
|
||||
JetToken COMMA = new JetToken("COMMA");
|
||||
|
||||
JetToken EOL_OR_SEMICOLON = new JetToken("EOL_OR_SEMICOLON");
|
||||
|
||||
JetKeywordToken WRAPS_KEYWORD = JetKeywordToken.softKeyword("wraps");
|
||||
JetKeywordToken IMPORT_KEYWORD = JetKeywordToken.softKeyword("import");
|
||||
JetKeywordToken WHERE_KEYWORD = JetKeywordToken.softKeyword("where");
|
||||
@@ -119,11 +122,12 @@ public interface JetTokens {
|
||||
JetKeywordToken OUT_KEYWORD = JetKeywordToken.softKeyword("out");
|
||||
JetKeywordToken REF_KEYWORD = JetKeywordToken.softKeyword("ref");
|
||||
JetKeywordToken CATCH_KEYWORD = JetKeywordToken.softKeyword("catch");
|
||||
|
||||
JetKeywordToken FINALLY_KEYWORD = JetKeywordToken.softKeyword("finally");
|
||||
|
||||
TokenSet KEYWORDS = TokenSet.create(NAMESPACE_KEYWORD, AS_KEYWORD, TYPE_KEYWORD, CLASS_KEYWORD,
|
||||
THIS_KEYWORD, VAL_KEYWORD, VAR_KEYWORD, FUN_KEYWORD, DECOMPOSER_KEYWORD, EXTENSION_KEYWORD, FOR_KEYWORD,
|
||||
NULL_KEYWORD, TYPEOF_KEYWORD, NEW_KEYWORD, TRUE_KEYWORD, FALSE_KEYWORD, IS_KEYWORD, ISNOT_KEYWORD,
|
||||
NULL_KEYWORD, TYPEOF_KEYWORD, NEW_KEYWORD, TRUE_KEYWORD, FALSE_KEYWORD, IS_KEYWORD,
|
||||
IN_KEYWORD, THROW_KEYWORD, RETURN_KEYWORD, BREAK_KEYWORD, CONTINUE_KEYWORD, OBJECT_KEYWORD, IF_KEYWORD,
|
||||
ELSE_KEYWORD, WHILE_KEYWORD, DO_KEYWORD, MATCH_KEYWORD, REF_KEYWORD, OUT_KEYWORD, TRY_KEYWORD
|
||||
);
|
||||
@@ -140,7 +144,6 @@ public interface JetTokens {
|
||||
);
|
||||
|
||||
TokenSet WHITE_SPACE_OR_COMMENT_BIT_SET = TokenSet.create(WHITE_SPACE, BLOCK_COMMENT, EOL_COMMENT, DOC_COMMENT);
|
||||
|
||||
TokenSet WHITESPACES = TokenSet.create(TokenType.WHITE_SPACE);
|
||||
TokenSet COMMENTS = TokenSet.create(EOL_COMMENT, BLOCK_COMMENT, DOC_COMMENT);
|
||||
TokenSet STRINGS = TokenSet.create(CHARACTER_LITERAL, STRING_LITERAL, RAW_STRING_LITERAL);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -40,20 +40,19 @@ JetFile: Attributes.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(GT)('>')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(GT)('>')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
@@ -65,54 +64,51 @@ JetFile: Attributes.jet
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(COMMA)(',')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('ina')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('ina')
|
||||
PsiElement(COMMA)(',')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('goo')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('doo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('goo')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('goo')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('doo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('goo')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('df')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('df')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(in)('in')
|
||||
@@ -120,9 +116,8 @@ JetFile: Attributes.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('sdfsdf')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('sdfsdf')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(out)('out')
|
||||
@@ -155,30 +150,27 @@ JetFile: Attributes.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('sdfsd')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('sdfsd')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('sdfsd')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('sdfsd')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(private)('private')
|
||||
|
||||
@@ -45,20 +45,19 @@ JetFile: Attributes_ERR.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(GT)('>')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(GT)('>')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
@@ -71,54 +70,51 @@ JetFile: Attributes_ERR.jet
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('ina')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('ina')
|
||||
PsiElement(COMMA)(',')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('goo')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('doo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('goo')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('goo')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('doo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('goo')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('df')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('df')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(in)('in')
|
||||
@@ -126,9 +122,8 @@ JetFile: Attributes_ERR.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('sdfsdf')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('sdfsdf')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiErrorElement:Expecting a comma-separated list of attributes
|
||||
<empty list>
|
||||
@@ -137,14 +132,12 @@ JetFile: Attributes_ERR.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('s')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('s')
|
||||
PsiElement(COMMA)(',')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('fd')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('fd')
|
||||
PsiErrorElement:Expecting ']' to close an attribute annotation
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -185,30 +178,27 @@ JetFile: Attributes_ERR.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('sdfsd')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('sdfsd')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('sdfsd')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('sdfsd')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(private)('private')
|
||||
|
||||
@@ -67,10 +67,8 @@ fun a(
|
||||
|
||||
for (val x in foo) a
|
||||
for (x in foo) a
|
||||
for (val x in [1..10]) a
|
||||
for (x in [1..10]) a
|
||||
for (val x : Int in [1..10]) a
|
||||
for (x : Int in [1..10]) {}
|
||||
for (val x : Int in foo) a
|
||||
for (x : Int in foo) {}
|
||||
|
||||
while (true) {}
|
||||
|
||||
|
||||
@@ -448,54 +448,6 @@ JetFile: ControlStructures.jet
|
||||
BODY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n ')
|
||||
FOR
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
LOOP_PARAMETER
|
||||
PsiElement(val)('val')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
LOOP_RANGE
|
||||
RANGE_LITERAL
|
||||
PsiElement(LBRACKET)('[')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiElement(RANGE)('..')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('10')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BODY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n ')
|
||||
FOR
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
LOOP_PARAMETER
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
LOOP_RANGE
|
||||
RANGE_LITERAL
|
||||
PsiElement(LBRACKET)('[')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiElement(RANGE)('..')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('10')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BODY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n ')
|
||||
FOR
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -514,14 +466,7 @@ JetFile: ControlStructures.jet
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
LOOP_RANGE
|
||||
RANGE_LITERAL
|
||||
PsiElement(LBRACKET)('[')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiElement(RANGE)('..')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('10')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BODY
|
||||
@@ -543,14 +488,7 @@ JetFile: ControlStructures.jet
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
LOOP_RANGE
|
||||
RANGE_LITERAL
|
||||
PsiElement(LBRACKET)('[')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiElement(RANGE)('..')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('10')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BODY
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
decomposer (a, a)
|
||||
decomposer ()
|
||||
decomposer foo<T>.{() : ()}.bar(a, a)
|
||||
decomposer {foo<T>.() : ()}.bar(a, a)
|
||||
decomposer a.foobar()
|
||||
[a] decomposer foobar([a] s)
|
||||
decomposer foobar()
|
||||
|
||||
@@ -22,17 +22,19 @@ JetFile: Decomposers.jet
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -44,9 +46,8 @@ JetFile: Decomposers.jet
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
@@ -73,9 +74,8 @@ JetFile: Decomposers.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(decomposer)('decomposer')
|
||||
@@ -86,9 +86,8 @@ JetFile: Decomposers.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('s')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
decomposer (a a)
|
||||
decomposer foo<T>.{() : ()}.bar(, a)
|
||||
decomposer {foo<T>.() : ()}.bar(, a)
|
||||
decomposer a.foobar)
|
||||
[a] decomposer foobar([a] s, )
|
||||
decomposer foobar([a])
|
||||
@@ -7,7 +7,7 @@ decomposer foobar([a])
|
||||
|
||||
decomposer (a, a).
|
||||
decomposer ().
|
||||
decomposer foo<T>.{() : ()}.bar(a, a).
|
||||
decomposer {foo<T>.() : ()}.bar(a, a).
|
||||
|
||||
|
||||
decomposer foo.bar.-()
|
||||
decomposer foo.bar.-()
|
||||
|
||||
@@ -16,17 +16,19 @@ JetFile: Decomposers_ERR.jet
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -38,9 +40,8 @@ JetFile: Decomposers_ERR.jet
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiErrorElement:Expecting a property name
|
||||
@@ -69,9 +70,8 @@ JetFile: Decomposers_ERR.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(decomposer)('decomposer')
|
||||
@@ -82,9 +82,8 @@ JetFile: Decomposers_ERR.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('s')
|
||||
@@ -103,9 +102,8 @@ JetFile: Decomposers_ERR.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiErrorElement:Expecting a property name
|
||||
<empty list>
|
||||
@@ -141,17 +139,19 @@ JetFile: Decomposers_ERR.jet
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -163,9 +163,8 @@ JetFile: Decomposers_ERR.jet
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
@@ -185,9 +184,10 @@ JetFile: Decomposers_ERR.jet
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(DOT)('.')
|
||||
PsiErrorElement:Expecting decomposer name
|
||||
PsiElement(MINUS)('-')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiErrorElement:Type name expected
|
||||
PsiElement(MINUS)('-')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -0,0 +1,18 @@
|
||||
JetFile: FileStart_ERR.jet
|
||||
NAMESPACE
|
||||
PsiErrorElement:Expecting namespace or top level declaration
|
||||
PsiElement(DIV)('/')
|
||||
NAMESPACE
|
||||
PsiElement(namespace)('namespace')
|
||||
PsiWhiteSpace(' ')
|
||||
NAMESPACE_NAME
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiErrorElement:A namespace block in '{...}' expected
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n')
|
||||
IMPORT_DIRECTIVE
|
||||
PsiElement(import)('import')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
@@ -15,11 +15,20 @@ type f = {(foo, a : {(a) : b}) : {() : ()}}
|
||||
|
||||
type f = {(lazy foo, out a : {(ref a) : b}) : {() : ()}}
|
||||
|
||||
type f = T.{() : ()}
|
||||
type f = T.T.{() : ()}
|
||||
type f = T<A, B>.T<x>.{() : ()}
|
||||
type f = (S).{() : ()}.{() : ()}
|
||||
type f = T.{() : ()}.{() : ()}
|
||||
type f = T.T.{() : ()}.{() : ()}
|
||||
type f = T<A, B>.T<x>.{() : ()}.{() : ()}
|
||||
type f = (S).{() : ()}.{() : ()}
|
||||
type f = {T.() : ()}
|
||||
type f = {T.T.() : ()}
|
||||
type f = {T<A, B>.T<x>.() : ()}
|
||||
type f = {{(S).() : ()}.() : ()}
|
||||
type f = {{T.() : ()}.() : ()}
|
||||
type f = {{T.T.() : ()}.() : ()}
|
||||
type f = {{T<A, B>.T<x>.() : ()}.() : ()}
|
||||
type f = {{(S).() : ()}.() : ()}
|
||||
|
||||
type f = [a] {T.() : ()}
|
||||
type f = [a] {T.T.() : ()}
|
||||
type f = [a] {T<A, B>.T<x>.() : ()}
|
||||
type f = [a] {[a] {(S).() : ()}.() : ()}
|
||||
type f = [a] {[a] {T.() : ()}.() : ()}
|
||||
type f = [a] {[a] {T.T.() : ()}.() : ()}
|
||||
type f = [a] {[a] {T<A, B>.T<x>.() : ()}.() : ()}
|
||||
type f = [a] {[a] {(S).() : ()}.() : ()}
|
||||
+693
-214
@@ -18,9 +18,8 @@ JetFile: FunctionTypes.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
@@ -83,9 +82,8 @@ JetFile: FunctionTypes.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
@@ -139,9 +137,8 @@ JetFile: FunctionTypes.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
@@ -256,9 +253,8 @@ JetFile: FunctionTypes.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
@@ -511,11 +507,13 @@ JetFile: FunctionTypes.jet
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -538,14 +536,16 @@ JetFile: FunctionTypes.jet
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -568,31 +568,33 @@ JetFile: FunctionTypes.jet
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -615,175 +617,276 @@ JetFile: FunctionTypes.jet
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('S')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEDEF
|
||||
PsiElement(type)('type')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEDEF
|
||||
PsiElement(type)('type')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEDEF
|
||||
PsiElement(type)('type')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEDEF
|
||||
PsiElement(type)('type')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('S')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n')
|
||||
TYPEDEF
|
||||
PsiElement(type)('type')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('S')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEDEF
|
||||
PsiElement(type)('type')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEDEF
|
||||
PsiElement(type)('type')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEDEF
|
||||
PsiElement(type)('type')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -806,15 +909,23 @@ JetFile: FunctionTypes.jet
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('S')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -826,9 +937,377 @@ JetFile: FunctionTypes.jet
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEDEF
|
||||
PsiElement(type)('type')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEDEF
|
||||
PsiElement(type)('type')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('S')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEDEF
|
||||
PsiElement(type)('type')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEDEF
|
||||
PsiElement(type)('type')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEDEF
|
||||
PsiElement(type)('type')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEDEF
|
||||
PsiElement(type)('type')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('S')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
|
||||
@@ -18,9 +18,8 @@ JetFile: FunctionTypes_ERR.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
fun foo()
|
||||
fun [a] foo()
|
||||
fun [a] T.foo()
|
||||
fun [a] T<T>.{(A<B>) : ()}.foo()
|
||||
fun {[a] T<T>.(A<B>) : ()}.foo()
|
||||
fun [a] T.foo(a : foo) : bar
|
||||
fun [a()] T.foo<T : {(a) : b}>(a : foo) : bar
|
||||
|
||||
fun foo();
|
||||
fun [a] foo();
|
||||
fun [a] T.foo();
|
||||
fun [a] T<T>.{(A<B>) : ()}.foo();
|
||||
fun {[a] T<T>.(A<B>) : ()}.foo();
|
||||
fun [a] T.foo(a : foo) : bar;
|
||||
fun [a()] T.foo<T : {(a) : b}>(a : foo) : bar;
|
||||
|
||||
fun foo() {}
|
||||
fun [a] foo() {}
|
||||
fun [a] T.foo() {}
|
||||
fun [a] T<T>.{(A<B>) : ()}.foo() {}
|
||||
fun {[a] T<T>.(A<B>) : ()}.foo() {}
|
||||
fun [a] T.foo(a : foo) : bar {}
|
||||
fun [a()] T.foo<T : {(a) : b}>(a : foo) : bar {}
|
||||
|
||||
fun [a] {[a] T<T>.(A<B>) : ()}.foo() {}
|
||||
fun [a()] T.foo<T : [a] {(a) : b}>(a : foo) : bar {}
|
||||
|
||||
+212
-87
@@ -16,9 +16,8 @@ JetFile: Functions.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
@@ -35,9 +34,8 @@ JetFile: Functions.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
@@ -54,25 +52,26 @@ JetFile: Functions.jet
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
TYPE_REFERENCE
|
||||
@@ -108,9 +107,8 @@ JetFile: Functions.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
@@ -144,9 +142,8 @@ JetFile: Functions.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -215,9 +212,8 @@ JetFile: Functions.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
@@ -235,9 +231,8 @@ JetFile: Functions.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
@@ -255,25 +250,26 @@ JetFile: Functions.jet
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
TYPE_REFERENCE
|
||||
@@ -310,9 +306,8 @@ JetFile: Functions.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
@@ -347,9 +342,8 @@ JetFile: Functions.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -422,9 +416,8 @@ JetFile: Functions.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
@@ -445,9 +438,8 @@ JetFile: Functions.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
@@ -468,25 +460,26 @@ JetFile: Functions.jet
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
TYPE_REFERENCE
|
||||
@@ -526,9 +519,8 @@ JetFile: Functions.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
@@ -566,9 +558,8 @@ JetFile: Functions.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -620,6 +611,140 @@ JetFile: Functions.jet
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n')
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(GT)('>')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -10,4 +10,4 @@ fun [a()] T.foo<T, T>(, a : foo, , a: b) : bar
|
||||
fun foo() : = a;
|
||||
|
||||
|
||||
fun [a] T<T>.{(A<B>) : ()}.-()
|
||||
fun {[a] T<T>.(A<B>) : ()}.-()
|
||||
@@ -17,9 +17,8 @@ JetFile: Functions_ERR.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
@@ -43,9 +42,8 @@ JetFile: Functions_ERR.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
@@ -79,9 +77,8 @@ JetFile: Functions_ERR.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -141,9 +138,8 @@ JetFile: Functions_ERR.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -183,9 +179,8 @@ JetFile: Functions_ERR.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -232,9 +227,8 @@ JetFile: Functions_ERR.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -284,9 +278,8 @@ JetFile: Functions_ERR.jet
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -362,25 +355,26 @@ JetFile: Functions_ERR.jet
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
RECEIVER_TYPE
|
||||
TYPE_REFERENCE
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
TYPE_REFERENCE
|
||||
|
||||
@@ -27,38 +27,39 @@ public class JetParsingTest extends ParsingTestCase {
|
||||
return new File(PathManager.getResourceRoot(JetParsingTest.class, "/")).getParentFile().getParentFile().getParent();
|
||||
}
|
||||
|
||||
public void testEmptyFile() throws Exception {doTest(true);}
|
||||
public void testAttributes() throws Exception {doTest(true);}
|
||||
public void testAttributes_ERR() throws Exception {doTest(true);}
|
||||
public void testBabySteps() throws Exception {doTest(true);}
|
||||
public void testBabySteps_ERR() throws Exception {doTest(true);}
|
||||
public void testConstructors() throws Exception {doTest(true);}
|
||||
public void testControlStructures() throws Exception {doTest(true);}
|
||||
public void testDecomposers() throws Exception {doTest(true);}
|
||||
public void testDecomposers_ERR() throws Exception {doTest(true);}
|
||||
public void testEmptyFile() throws Exception {doTest(true);}
|
||||
public void testEnums() throws Exception {doTest(true);}
|
||||
public void testExtensions() throws Exception {doTest(true);}
|
||||
public void testExtensions_ERR() throws Exception {doTest(true);}
|
||||
public void testFileStart_ERR() throws Exception {doTest(true);}
|
||||
public void testFunctions() throws Exception {doTest(true);}
|
||||
public void testFunctions_ERR() throws Exception {doTest(true);}
|
||||
public void testFunctionTypes() throws Exception {doTest(true);}
|
||||
public void testFunctionTypes_ERR() throws Exception {doTest(true);}
|
||||
public void testImports() throws Exception {doTest(true);}
|
||||
public void testImports_ERR() throws Exception {doTest(true);}
|
||||
public void testImportSoftKW() throws Exception {doTest(true);}
|
||||
public void testNamespaceBlock_ERR() throws Exception {doTest(true);}
|
||||
public void testNamespaceBlock() throws Exception {doTest(true);}
|
||||
public void testSimpleModifiers() throws Exception {doTest(true);}
|
||||
public void testAttributes() throws Exception {doTest(true);}
|
||||
public void testAttributes_ERR() throws Exception {doTest(true);}
|
||||
public void testTypeDef() throws Exception {doTest(true);}
|
||||
public void testTypeDef_ERR() throws Exception {doTest(true);}
|
||||
public void testTypeAnnotations() throws Exception {doTest(true);}
|
||||
public void testTupleTypes() throws Exception {doTest(true);}
|
||||
public void testTupleTypes_ERR() throws Exception {doTest(true);}
|
||||
public void testFunctionTypes() throws Exception {doTest(true);}
|
||||
public void testFunctionTypes_ERR() throws Exception {doTest(true);}
|
||||
public void testDecomposers() throws Exception {doTest(true);}
|
||||
public void testDecomposers_ERR() throws Exception {doTest(true);}
|
||||
public void testProperties() throws Exception {doTest(true);}
|
||||
public void testProperties_ERR() throws Exception {doTest(true);}
|
||||
public void testFunctions() throws Exception {doTest(true);}
|
||||
public void testFunctions_ERR() throws Exception {doTest(true);}
|
||||
public void testExtensions() throws Exception {doTest(true);}
|
||||
public void testExtensions_ERR() throws Exception {doTest(true);}
|
||||
public void testSoftKeywords() throws Exception {doTest(true);}
|
||||
public void testSimpleClassMembers() throws Exception {doTest(true);}
|
||||
public void testSimpleClassMembers_ERR() throws Exception {doTest(true);}
|
||||
public void testConstructors() throws Exception {doTest(true);}
|
||||
public void testTypeConstraints() throws Exception {doTest(true);}
|
||||
public void testEnums() throws Exception {doTest(true);}
|
||||
public void testSimpleExpressions() throws Exception {doTest(true);}
|
||||
public void testControlStructures() throws Exception {doTest(true);}
|
||||
public void testSimpleModifiers() throws Exception {doTest(true);}
|
||||
public void testSoftKeywords() throws Exception {doTest(true);}
|
||||
public void testTupleTypes() throws Exception {doTest(true);}
|
||||
public void testTupleTypes_ERR() throws Exception {doTest(true);}
|
||||
public void testTypeAnnotations() throws Exception {doTest(true);}
|
||||
public void testTypeConstraints() throws Exception {doTest(true);}
|
||||
public void testTypeDef() throws Exception {doTest(true);}
|
||||
public void testTypeDef_ERR() throws Exception {doTest(true);}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user