From 2305f3c4452ce76b31555010b917fa4309c45902 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Wed, 29 Dec 2010 15:42:57 +0300 Subject: [PATCH] Fixing function types --- examples/src/With.jetl | 2 +- grammar/src/class_members.grm | 2 +- grammar/src/expressions.grm | 46 +- grammar/src/types.grm | 6 +- idea/src/org/jetbrains/jet/JetNodeTypes.java | 1 + .../jet/lang/parsing/AbstractJetParsing.java | 14 +- .../lang/parsing/JetExpressionParsing.java | 124 +-- .../jet/lang/parsing/JetParsing.java | 55 +- idea/src/org/jetbrains/jet/lexer/Jet.flex | 47 +- .../org/jetbrains/jet/lexer/JetTokens.java | 11 +- .../org/jetbrains/jet/lexer/_JetLexer.java | 716 +++++++------- idea/testData/psi/Attributes.txt | 144 ++- idea/testData/psi/Attributes_ERR.txt | 154 ++- idea/testData/psi/ControlStructures.jet | 6 +- idea/testData/psi/ControlStructures.txt | 66 +- idea/testData/psi/Decomposers.jet | 2 +- idea/testData/psi/Decomposers.txt | 35 +- idea/testData/psi/Decomposers_ERR.jet | 6 +- idea/testData/psi/Decomposers_ERR.txt | 72 +- idea/testData/psi/FileStart_ERR.txt | 18 + idea/testData/psi/FunctionTypes.jet | 25 +- idea/testData/psi/FunctionTypes.txt | 907 +++++++++++++----- idea/testData/psi/FunctionTypes_ERR.txt | 5 +- idea/testData/psi/Functions.jet | 9 +- idea/testData/psi/Functions.txt | 299 ++++-- idea/testData/psi/Functions_ERR.jet | 2 +- idea/testData/psi/Functions_ERR.txt | 70 +- .../jetbrains/jet/parsing/JetParsingTest.java | 45 +- 28 files changed, 1674 insertions(+), 1215 deletions(-) create mode 100644 idea/testData/psi/FileStart_ERR.txt diff --git a/examples/src/With.jetl b/examples/src/With.jetl index cae143e7f21..8dc0a46640b 100644 --- a/examples/src/With.jetl +++ b/examples/src/With.jetl @@ -1,4 +1,4 @@ -[inline] fun with(receiver : T, body : T.{() : Unit}) = receiver.body() +[inline] fun with(receiver : T, body : {T.() : Unit}) = receiver.body() fun example() { diff --git a/grammar/src/class_members.grm b/grammar/src/class_members.grm index 79e5370af70..e1a7ee6db69 100644 --- a/grammar/src/class_members.grm +++ b/grammar/src/class_members.grm @@ -67,7 +67,7 @@ initializer ; block - : "{" (expression SEMI)* "}" + : "{" expressions "}" ; decomposer // TODO: consider other names diff --git a/grammar/src/expressions.grm b/grammar/src/expressions.grm index a979df50451..d51a859b5c2 100644 --- a/grammar/src/expressions.grm +++ b/grammar/src/expressions.grm @@ -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 diff --git a/grammar/src/types.grm b/grammar/src/types.grm index 35b16fa0aaf..c0eaa8e6b28 100644 --- a/grammar/src/types.grm +++ b/grammar/src/types.grm @@ -10,11 +10,11 @@ Foo, 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 diff --git a/idea/src/org/jetbrains/jet/JetNodeTypes.java b/idea/src/org/jetbrains/jet/JetNodeTypes.java index 4942fe437fb..14165494eda 100644 --- a/idea/src/org/jetbrains/jet/JetNodeTypes.java +++ b/idea/src/org/jetbrains/jet/JetNodeTypes.java @@ -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"); } diff --git a/idea/src/org/jetbrains/jet/lang/parsing/AbstractJetParsing.java b/idea/src/org/jetbrains/jet/lang/parsing/AbstractJetParsing.java index d7a20a41172..8aa38facc66 100644 --- a/idea/src/org/jetbrains/jet/lang/parsing/AbstractJetParsing.java +++ b/idea/src/org/jetbrains/jet/lang/parsing/AbstractJetParsing.java @@ -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 } diff --git a/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java b/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java index e1cf146ec1b..c70377b830f 100644 --- a/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java +++ b/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java @@ -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 diff --git a/idea/src/org/jetbrains/jet/lang/parsing/JetParsing.java b/idea/src/org/jetbrains/jet/lang/parsing/JetParsing.java index dc98202eb41..8931263b82f 100644 --- a/idea/src/org/jetbrains/jet/lang/parsing/JetParsing.java +++ b/idea/src/org/jetbrains/jet/lang/parsing/JetParsing.java @@ -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 '}"); diff --git a/idea/src/org/jetbrains/jet/lexer/Jet.flex b/idea/src/org/jetbrains/jet/lexer/Jet.flex index 422ed674fd4..6f30ee77119 100644 --- a/idea/src/org/jetbrains/jet/lexer/Jet.flex +++ b/idea/src/org/jetbrains/jet/lexer/Jet.flex @@ -85,7 +85,6 @@ RAW_STRING_LITERAL = {THREE_QUO} {QUO_STRING_CHAR}* {THREE_QUO}? "return" { return JetTokens.RETURN_KEYWORD ;} "typeof" { return JetTokens.TYPEOF_KEYWORD ;} "object" { return JetTokens.OBJECT_KEYWORD ;} - "isnot" { return JetTokens.ISNOT_KEYWORD ;} "while" { return JetTokens.WHILE_KEYWORD ;} "break" { return JetTokens.BREAK_KEYWORD ;} "class" { return JetTokens.CLASS_KEYWORD ;} @@ -113,26 +112,14 @@ RAW_STRING_LITERAL = {THREE_QUO} {QUO_STRING_CHAR}* {THREE_QUO}? {IDENTIFIER} { return JetTokens.IDENTIFIER; } - "[" { return JetTokens.LBRACKET ; } - "]" { return JetTokens.RBRACKET ; } - "{" { return JetTokens.LBRACE ; } - "}" { return JetTokens.RBRACE ; } - "(" { return JetTokens.LPAR ; } - ")" { return JetTokens.RPAR ; } - "." { return JetTokens.DOT ; } + "===" { return JetTokens.EQEQEQ ; } + "!==" { return JetTokens.EXCLEQEQEQ; } + "!in" { return JetTokens.NOT_IN; } + "!is" { return JetTokens.NOT_IS; } "++" { return JetTokens.PLUSPLUS ; } "--" { return JetTokens.MINUSMINUS; } - "*" { return JetTokens.MUL ; } - "+" { return JetTokens.PLUS ; } - "-" { return JetTokens.MINUS ; } - "!" { return JetTokens.EXCL ; } - "/" { return JetTokens.DIV ; } - "%" { return JetTokens.PERC ; } - "<" { return JetTokens.LT ; } - ">" { return JetTokens.GT ; } "<=" { return JetTokens.LTEQ ; } ">=" { return JetTokens.GTEQ ; } - "===" { return JetTokens.EQEQEQ ; } "==" { return JetTokens.EQEQ ; } "!=" { return JetTokens.EXCLEQ ; } "&&" { return JetTokens.ANDAND ; } @@ -141,16 +128,32 @@ RAW_STRING_LITERAL = {THREE_QUO} {QUO_STRING_CHAR}* {THREE_QUO}? "?:" { return JetTokens.ELVIS ; } ".*" { return JetTokens.MAP ; } ".?" { return JetTokens.FILTER ; } - "?" { return JetTokens.QUEST ; } - ":" { return JetTokens.COLON ; } - ";" { return JetTokens.SEMICOLON ; } - ".." { return JetTokens.RANGE ; } - "=" { return JetTokens.EQ ; } "*=" { return JetTokens.MULTEQ ; } "/=" { return JetTokens.DIVEQ ; } "%=" { return JetTokens.PERCEQ ; } "+=" { return JetTokens.PLUSEQ ; } "-=" { return JetTokens.MINUSEQ ; } + "->" { return JetTokens.ARROW ; } + "[" { return JetTokens.LBRACKET ; } + "]" { return JetTokens.RBRACKET ; } + "{" { return JetTokens.LBRACE ; } + "}" { return JetTokens.RBRACE ; } + "(" { return JetTokens.LPAR ; } + ")" { return JetTokens.RPAR ; } + "." { return JetTokens.DOT ; } + "*" { return JetTokens.MUL ; } + "+" { return JetTokens.PLUS ; } + "-" { return JetTokens.MINUS ; } + "!" { return JetTokens.EXCL ; } + "/" { return JetTokens.DIV ; } + "%" { return JetTokens.PERC ; } + "<" { return JetTokens.LT ; } + ">" { return JetTokens.GT ; } + "?" { return JetTokens.QUEST ; } + ":" { return JetTokens.COLON ; } + ";" { return JetTokens.SEMICOLON ; } + ".." { return JetTokens.RANGE ; } + "=" { return JetTokens.EQ ; } "," { return JetTokens.COMMA ; } . { return TokenType.BAD_CHARACTER; } diff --git a/idea/src/org/jetbrains/jet/lexer/JetTokens.java b/idea/src/org/jetbrains/jet/lexer/JetTokens.java index 64d95d8001c..3c5c82861c2 100644 --- a/idea/src/org/jetbrains/jet/lexer/JetTokens.java +++ b/idea/src/org/jetbrains/jet/lexer/JetTokens.java @@ -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); diff --git a/idea/src/org/jetbrains/jet/lexer/_JetLexer.java b/idea/src/org/jetbrains/jet/lexer/_JetLexer.java index 60c0d4e3690..73d578b93b9 100644 --- a/idea/src/org/jetbrains/jet/lexer/_JetLexer.java +++ b/idea/src/org/jetbrains/jet/lexer/_JetLexer.java @@ -1,4 +1,4 @@ -/* The following code was generated by JFlex 1.4.3 on 12/27/10 8:11 PM */ +/* The following code was generated by JFlex 1.4.3 on 12/29/10 2:56 PM */ /* It's an automatically generated code. Do not modify it. */ package org.jetbrains.jet.lexer; @@ -13,7 +13,7 @@ import org.jetbrains.jet.lexer.JetTokens; /** * This class is a scanner generated by * JFlex 1.4.3 - * on 12/27/10 8:11 PM from the specification file + * on 12/29/10 2:56 PM from the specification file * /home/user/work/jet/idea/src/org/jetbrains/jet/lexer/Jet.flex */ class _JetLexer implements FlexLexer { @@ -37,15 +37,15 @@ class _JetLexer implements FlexLexer { * Translates characters to character classes */ private static final String ZZ_CMAP_PACKED = - "\11\5\1\3\1\10\1\0\1\3\1\0\16\5\4\0\1\3\1\63"+ - "\1\24\1\0\1\4\1\64\1\70\1\22\1\60\1\61\1\7\1\62"+ - "\1\75\1\20\1\16\1\6\1\11\11\1\1\73\1\74\1\65\1\67"+ - "\1\66\1\72\1\0\1\2\1\13\1\2\1\15\1\17\1\15\5\4"+ - "\1\14\3\4\1\21\7\4\1\12\2\4\1\54\1\23\1\55\1\0"+ + "\11\5\1\3\1\10\1\0\1\3\1\0\16\5\4\0\1\3\1\55"+ + "\1\24\1\0\1\4\1\65\1\61\1\22\1\72\1\73\1\7\1\56"+ + "\1\75\1\20\1\16\1\6\1\11\11\1\1\64\1\74\1\57\1\54"+ + "\1\60\1\63\1\0\1\2\1\13\1\2\1\15\1\17\1\15\5\4"+ + "\1\14\3\4\1\21\7\4\1\12\2\4\1\66\1\23\1\67\1\0"+ "\1\4\1\0\1\36\1\45\1\27\1\25\1\26\1\44\1\4\1\50"+ "\1\41\1\46\1\52\1\51\1\31\1\35\1\30\1\32\1\4\1\34"+ - "\1\33\1\40\1\42\1\53\1\47\1\37\1\43\1\4\1\56\1\71"+ - "\1\57\1\0\41\5\2\0\4\4\4\0\1\4\2\0\1\5\7\0"+ + "\1\33\1\40\1\42\1\53\1\47\1\37\1\43\1\4\1\70\1\62"+ + "\1\71\1\0\41\5\2\0\4\4\4\0\1\4\2\0\1\5\7\0"+ "\1\4\4\0\1\4\5\0\27\4\1\0\37\4\1\0\u013f\4\31\0"+ "\162\4\4\0\14\4\16\0\5\4\11\0\1\4\21\0\130\5\5\0"+ "\23\5\12\0\1\4\13\0\1\4\1\0\3\4\1\0\1\4\1\0"+ @@ -141,24 +141,24 @@ class _JetLexer implements FlexLexer { private static final String ZZ_ACTION_PACKED_0 = "\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\2"+ "\1\7\1\10\1\11\1\12\16\3\1\13\1\14\1\15"+ - "\1\16\1\17\1\20\1\21\1\22\1\23\1\24\1\25"+ - "\1\26\2\1\1\27\1\30\1\31\1\32\1\33\3\34"+ + "\1\16\1\17\2\1\1\20\1\21\1\22\1\23\1\24"+ + "\1\25\1\26\1\27\1\30\1\31\1\32\1\33\3\34"+ "\1\35\1\36\1\37\1\40\1\0\2\2\1\34\1\41"+ - "\1\42\1\43\1\44\1\45\2\11\3\12\1\3\1\46"+ - "\13\3\1\47\3\3\1\50\1\51\1\52\6\3\1\53"+ - "\1\54\1\55\1\56\1\57\1\60\1\61\1\62\1\63"+ - "\1\64\1\65\1\66\1\34\1\36\1\67\1\0\1\33"+ - "\3\0\1\12\1\70\5\3\1\71\3\3\1\72\1\73"+ - "\3\3\1\74\4\3\1\75\1\3\1\76\2\3\1\77"+ - "\1\100\1\101\1\0\2\67\1\0\1\34\2\0\2\3"+ - "\1\102\6\3\1\103\1\104\1\105\1\3\1\106\4\3"+ - "\1\36\1\0\1\34\1\0\3\3\1\107\1\3\1\110"+ - "\3\3\1\111\1\112\1\113\1\114\1\115\1\70\3\3"+ - "\1\116\1\117\1\3\1\120\6\3\1\121\2\3\1\122"+ - "\1\123\1\124"; + "\1\42\1\43\1\44\1\45\1\46\2\11\3\12\1\3"+ + "\1\47\13\3\1\50\3\3\1\51\1\52\1\53\6\3"+ + "\1\54\1\0\1\55\1\56\1\57\1\60\1\61\1\62"+ + "\1\63\1\64\1\65\1\66\1\67\1\34\1\36\1\70"+ + "\1\0\1\33\3\0\1\12\1\71\5\3\1\72\3\3"+ + "\1\73\1\74\3\3\1\75\3\3\1\76\1\3\1\77"+ + "\2\3\1\100\1\101\1\102\1\103\1\104\1\105\1\0"+ + "\2\70\1\0\1\34\2\0\2\3\1\106\6\3\1\107"+ + "\1\110\1\111\1\3\1\112\3\3\1\36\1\0\1\34"+ + "\1\0\3\3\1\113\1\3\1\114\3\3\1\115\1\116"+ + "\1\117\1\120\1\71\3\3\1\121\1\122\1\3\1\123"+ + "\6\3\1\124\2\3\1\125\1\126\1\127"; private static int [] zzUnpackAction() { - int [] result = new int[204]; + int [] result = new int[206]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -186,32 +186,32 @@ class _JetLexer implements FlexLexer { "\0\0\0\76\0\174\0\272\0\370\0\u0136\0\u0174\0\u01b2"+ "\0\u01f0\0\u022e\0\u026c\0\u02aa\0\u02e8\0\u0326\0\u0364\0\u03a2"+ "\0\u03e0\0\u041e\0\u045c\0\u049a\0\u04d8\0\u0516\0\u0554\0\u0592"+ - "\0\u05d0\0\u060e\0\76\0\76\0\76\0\76\0\76\0\76"+ - "\0\u064c\0\u068a\0\u06c8\0\u0706\0\u0744\0\u0782\0\u07c0\0\u07fe"+ - "\0\u083c\0\76\0\76\0\76\0\76\0\76\0\u087a\0\u08b8"+ + "\0\u05d0\0\u060e\0\u064c\0\u068a\0\u06c8\0\u0706\0\u0744\0\u0782"+ + "\0\u07c0\0\u07fe\0\76\0\u083c\0\76\0\76\0\76\0\76"+ + "\0\76\0\76\0\76\0\76\0\76\0\76\0\u087a\0\u08b8"+ "\0\u08f6\0\u0934\0\76\0\76\0\u0972\0\u09b0\0\u09ee\0\u0a2c"+ - "\0\76\0\76\0\76\0\76\0\76\0\76\0\u0a6a\0\u0aa8"+ - "\0\u0ae6\0\u0b24\0\u0b62\0\272\0\u0ba0\0\u0bde\0\u0c1c\0\u0c5a"+ - "\0\u0c98\0\u0cd6\0\u0d14\0\u0d52\0\u0d90\0\u0dce\0\u0e0c\0\272"+ - "\0\u0e4a\0\u0e88\0\u0ec6\0\u0f04\0\272\0\272\0\u0f42\0\u0f80"+ - "\0\u0fbe\0\u0ffc\0\u103a\0\u1078\0\76\0\76\0\76\0\76"+ - "\0\76\0\76\0\u10b6\0\76\0\76\0\76\0\76\0\76"+ - "\0\u10f4\0\u1132\0\u1170\0\u11ae\0\u11ae\0\u11ec\0\u122a\0\u1268"+ - "\0\76\0\u12a6\0\u12e4\0\u1322\0\u1360\0\u139e\0\u13dc\0\272"+ - "\0\u141a\0\u1458\0\u1496\0\272\0\272\0\u14d4\0\u1512\0\u1550"+ - "\0\272\0\u158e\0\u15cc\0\u160a\0\u1648\0\272\0\u1686\0\272"+ - "\0\u16c4\0\u1702\0\272\0\272\0\76\0\u1740\0\u177e\0\76"+ - "\0\u17bc\0\u17fa\0\u1838\0\u1876\0\u18b4\0\u18f2\0\272\0\u1930"+ - "\0\u196e\0\u19ac\0\u19ea\0\u1a28\0\u1a66\0\272\0\272\0\u1aa4"+ - "\0\u1ae2\0\272\0\u1b20\0\u1b5e\0\u1b9c\0\u1bda\0\76\0\u1c18"+ - "\0\u11ae\0\u1c56\0\u1c94\0\u1cd2\0\u1d10\0\272\0\u1d4e\0\272"+ - "\0\u1d8c\0\u1dca\0\u1e08\0\272\0\272\0\272\0\272\0\272"+ - "\0\76\0\u1e46\0\u1e84\0\u1ec2\0\272\0\272\0\u1f00\0\272"+ - "\0\u1f3e\0\u1f7c\0\u1fba\0\u1ff8\0\u2036\0\u2074\0\272\0\u20b2"+ - "\0\u20f0\0\272\0\272\0\272"; + "\0\76\0\76\0\76\0\76\0\76\0\76\0\76\0\u0a6a"+ + "\0\u0aa8\0\u0ae6\0\u0b24\0\u0b62\0\272\0\u0ba0\0\u0bde\0\u0c1c"+ + "\0\u0c5a\0\u0c98\0\u0cd6\0\u0d14\0\u0d52\0\u0d90\0\u0dce\0\u0e0c"+ + "\0\272\0\u0e4a\0\u0e88\0\u0ec6\0\272\0\272\0\272\0\u0f04"+ + "\0\u0f42\0\u0f80\0\u0fbe\0\u0ffc\0\u103a\0\u1078\0\u10b6\0\u10f4"+ + "\0\76\0\76\0\76\0\76\0\76\0\76\0\76\0\76"+ + "\0\76\0\76\0\u1132\0\u1170\0\u11ae\0\u11ec\0\u11ec\0\u122a"+ + "\0\u1268\0\u12a6\0\76\0\u12e4\0\u1322\0\u1360\0\u139e\0\u13dc"+ + "\0\u141a\0\272\0\u1458\0\u1496\0\u14d4\0\272\0\272\0\u1512"+ + "\0\u1550\0\u158e\0\272\0\u15cc\0\u160a\0\u1648\0\272\0\u1686"+ + "\0\272\0\u16c4\0\u1702\0\272\0\272\0\76\0\76\0\76"+ + "\0\76\0\u1740\0\u177e\0\76\0\u17bc\0\u17fa\0\u1838\0\u1876"+ + "\0\u18b4\0\u18f2\0\272\0\u1930\0\u196e\0\u19ac\0\u19ea\0\u1a28"+ + "\0\u1a66\0\272\0\272\0\u1aa4\0\u1ae2\0\272\0\u1b20\0\u1b5e"+ + "\0\u1b9c\0\76\0\u1bda\0\u11ec\0\u1c18\0\u1c56\0\u1c94\0\u1cd2"+ + "\0\272\0\u1d10\0\272\0\u1d4e\0\u1d8c\0\u1dca\0\272\0\272"+ + "\0\272\0\272\0\76\0\u1e08\0\u1e46\0\u1e84\0\272\0\272"+ + "\0\u1ec2\0\272\0\u1f00\0\u1f3e\0\u1f7c\0\u1fba\0\u1ff8\0\u2036"+ + "\0\272\0\u2074\0\u20b2\0\272\0\272\0\272"; private static int [] zzUnpackRowMap() { - int [] result = new int[204]; + int [] result = new int[206]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -245,207 +245,203 @@ class _JetLexer implements FlexLexer { "\5\0\1\56\1\60\15\0\1\56\4\0\1\55\25\0"+ "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ "\1\4\3\0\27\4\25\0\1\5\4\0\1\5\73\0"+ - "\1\61\1\62\57\0\1\63\75\0\1\64\7\0\1\65"+ + "\1\61\1\62\44\0\1\63\75\0\1\64\22\0\1\65"+ "\7\0\1\65\1\66\1\67\1\55\1\56\1\57\1\60"+ "\5\0\1\56\1\60\10\0\1\66\4\0\1\56\1\67"+ "\3\0\1\55\25\0\1\70\5\0\1\71\1\0\1\70"+ - "\4\0\1\72\53\0\1\73\23\0\1\74\46\0\1\75"+ - "\6\0\10\13\1\0\11\13\1\76\1\77\52\13\10\100"+ - "\1\0\12\100\1\101\1\102\51\100\1\0\2\4\1\0"+ - "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\1\4\1\103\1\4\1\104\23\4\23\0\2\4\1\0"+ - "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\12\4\1\105\11\4\1\106\2\4\23\0\2\4\1\0"+ - "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\3\4\1\107\20\4\1\110\2\4\23\0\2\4\1\0"+ - "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\15\4\1\111\2\4\1\112\6\4\23\0\2\4\1\0"+ - "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\11\4\1\113\15\4\23\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\1\4\1\114"+ - "\25\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\1\4\1\115\7\4\1\116"+ - "\3\4\1\117\11\4\23\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\6\4\1\120"+ - "\20\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\7\4\1\121\6\4\1\122"+ - "\4\4\1\123\3\4\23\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\6\4\1\124"+ - "\1\4\1\125\6\4\1\126\7\4\23\0\2\4\1\0"+ - "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\3\4\1\127\5\4\1\130\3\4\1\131\11\4\23\0"+ + "\4\0\1\72\44\0\1\73\32\0\1\74\33\0\1\75"+ + "\3\0\1\76\15\0\10\13\1\0\11\13\1\77\1\100"+ + "\52\13\10\101\1\0\12\101\1\102\1\103\51\101\1\0"+ "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\7\4\1\132\17\4\23\0\2\4\1\0"+ + "\1\4\3\0\1\4\1\104\1\4\1\105\23\4\23\0"+ + "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ + "\1\4\3\0\12\4\1\106\11\4\1\107\2\4\23\0"+ + "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ + "\1\4\3\0\3\4\1\110\20\4\1\111\2\4\23\0"+ + "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ + "\1\4\3\0\15\4\1\112\2\4\1\113\6\4\23\0"+ + "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ + "\1\4\3\0\11\4\1\114\15\4\23\0\2\4\1\0"+ "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\23\4\1\133\3\4\23\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\11\4\1\134"+ - "\15\4\104\0\1\135\4\0\1\136\75\0\1\137\75\0"+ - "\1\140\75\0\1\141\75\0\1\142\75\0\1\143\76\0"+ - "\1\144\76\0\1\145\22\0\1\146\54\0\1\147\3\0"+ - "\1\70\7\0\1\70\3\0\1\56\1\150\1\60\5\0"+ - "\1\56\1\60\15\0\1\56\32\0\1\151\7\0\1\151"+ - "\3\0\1\56\2\0\1\151\4\0\1\56\16\0\1\56"+ - "\15\0\1\151\13\0\10\61\1\0\65\61\7\152\1\153"+ - "\66\152\1\0\1\65\7\0\1\65\3\0\1\56\1\70"+ - "\1\60\5\0\1\56\1\60\15\0\1\56\31\0\1\154"+ - "\2\66\5\154\1\0\1\66\1\154\1\66\1\155\1\66"+ - "\1\156\1\66\1\154\1\157\3\154\3\66\2\154\1\157"+ - "\3\154\1\66\5\154\2\66\3\154\1\155\24\154\1\0"+ - "\1\67\7\0\1\67\2\0\1\55\1\0\1\160\32\0"+ - "\1\55\25\0\1\70\7\0\1\70\3\0\1\56\1\0"+ - "\1\60\5\0\1\56\1\60\15\0\1\56\31\0\10\13"+ - "\1\0\65\13\10\100\1\0\12\100\1\101\1\161\61\100"+ - "\1\0\65\100\24\0\1\162\52\0\2\4\1\0\2\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\2\4"+ - "\1\163\24\4\23\0\2\4\1\0\2\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\13\4\1\164\13\4"+ - "\23\0\2\4\1\0\2\4\3\0\5\4\1\0\1\4"+ - "\1\0\1\4\3\0\6\4\1\165\20\4\23\0\2\4"+ + "\1\4\1\115\25\4\23\0\2\4\1\0\2\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\1\4\1\116"+ + "\7\4\1\117\3\4\1\120\11\4\23\0\2\4\1\0"+ + "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\6\4\1\121\20\4\23\0\2\4\1\0\2\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\7\4\1\122"+ + "\6\4\1\123\4\4\1\124\3\4\23\0\2\4\1\0"+ + "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\6\4\1\125\1\4\1\126\6\4\1\127\7\4\23\0"+ + "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ + "\1\4\3\0\3\4\1\130\5\4\1\131\3\4\1\132"+ + "\11\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ + "\1\4\1\0\1\4\3\0\7\4\1\133\17\4\23\0"+ + "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ + "\1\4\3\0\23\4\1\134\3\4\23\0\2\4\1\0"+ + "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\11\4\1\135\15\4\76\0\1\136\62\0\1\137\12\0"+ + "\1\140\75\0\1\141\1\0\1\142\73\0\1\143\75\0"+ + "\1\144\102\0\1\145\76\0\1\146\31\0\1\147\45\0"+ + "\1\150\65\0\1\151\22\0\1\70\7\0\1\70\3\0"+ + "\1\56\1\152\1\60\5\0\1\56\1\60\15\0\1\56"+ + "\32\0\1\153\7\0\1\153\3\0\1\56\2\0\1\153"+ + "\4\0\1\56\16\0\1\56\11\0\1\153\17\0\10\61"+ + "\1\0\65\61\7\154\1\155\66\154\1\0\1\65\7\0"+ + "\1\65\3\0\1\56\1\70\1\60\5\0\1\56\1\60"+ + "\15\0\1\56\31\0\1\156\2\66\5\156\1\0\1\66"+ + "\1\156\1\66\1\157\1\66\1\160\1\66\1\156\1\161"+ + "\3\156\3\66\2\156\1\161\3\156\1\66\5\156\2\66"+ + "\3\156\1\157\24\156\1\0\1\67\7\0\1\67\2\0"+ + "\1\55\1\0\1\162\32\0\1\55\25\0\1\70\7\0"+ + "\1\70\3\0\1\56\1\0\1\60\5\0\1\56\1\60"+ + "\15\0\1\56\31\0\10\13\1\0\65\13\10\101\1\0"+ + "\12\101\1\102\1\163\61\101\1\0\65\101\24\0\1\164"+ + "\52\0\2\4\1\0\2\4\3\0\5\4\1\0\1\4"+ + "\1\0\1\4\3\0\2\4\1\165\24\4\23\0\2\4"+ "\1\0\2\4\3\0\5\4\1\0\1\4\1\0\1\4"+ - "\3\0\10\4\1\166\16\4\23\0\2\4\1\0\2\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\11\4"+ - "\1\167\15\4\23\0\2\4\1\0\2\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\13\4\1\170\13\4"+ + "\3\0\13\4\1\166\13\4\23\0\2\4\1\0\2\4"+ + "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\6\4"+ + "\1\167\20\4\23\0\2\4\1\0\2\4\3\0\5\4"+ + "\1\0\1\4\1\0\1\4\3\0\10\4\1\170\16\4"+ "\23\0\2\4\1\0\2\4\3\0\5\4\1\0\1\4"+ - "\1\0\1\4\3\0\21\4\1\171\5\4\23\0\2\4"+ + "\1\0\1\4\3\0\11\4\1\171\15\4\23\0\2\4"+ "\1\0\2\4\3\0\5\4\1\0\1\4\1\0\1\4"+ "\3\0\13\4\1\172\13\4\23\0\2\4\1\0\2\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\13\4"+ - "\1\173\3\4\1\174\7\4\23\0\2\4\1\0\2\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\22\4"+ - "\1\175\4\4\23\0\2\4\1\0\2\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\4\4\1\176\22\4"+ + "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\21\4"+ + "\1\173\5\4\23\0\2\4\1\0\2\4\3\0\5\4"+ + "\1\0\1\4\1\0\1\4\3\0\13\4\1\174\13\4"+ "\23\0\2\4\1\0\2\4\3\0\5\4\1\0\1\4"+ - "\1\0\1\4\3\0\24\4\1\177\2\4\23\0\2\4"+ + "\1\0\1\4\3\0\13\4\1\175\3\4\1\176\7\4"+ + "\23\0\2\4\1\0\2\4\3\0\5\4\1\0\1\4"+ + "\1\0\1\4\3\0\22\4\1\177\4\4\23\0\2\4"+ "\1\0\2\4\3\0\5\4\1\0\1\4\1\0\1\4"+ - "\3\0\15\4\1\200\1\201\10\4\23\0\2\4\1\0"+ + "\3\0\4\4\1\200\22\4\23\0\2\4\1\0\2\4"+ + "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\24\4"+ + "\1\201\2\4\23\0\2\4\1\0\2\4\3\0\5\4"+ + "\1\0\1\4\1\0\1\4\3\0\15\4\1\202\1\203"+ + "\10\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ + "\1\4\1\0\1\4\3\0\5\4\1\204\21\4\23\0"+ + "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ + "\1\4\3\0\7\4\1\205\4\4\1\206\12\4\23\0"+ + "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ + "\1\4\3\0\7\4\1\207\17\4\23\0\2\4\1\0"+ "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\5\4\1\202\21\4\23\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\7\4\1\203"+ - "\4\4\1\204\12\4\23\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\10\4\1\205"+ + "\24\4\1\210\2\4\23\0\2\4\1\0\2\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\10\4\1\211"+ "\16\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\7\4\1\206\17\4\23\0"+ + "\1\4\1\0\1\4\3\0\1\4\1\212\25\4\23\0"+ "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\24\4\1\207\2\4\23\0\2\4\1\0"+ + "\1\4\3\0\14\4\1\213\12\4\23\0\2\4\1\0"+ "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\10\4\1\210\16\4\23\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\1\4\1\211"+ - "\25\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\14\4\1\212\12\4\23\0"+ - "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\7\4\1\213\14\4\1\214\2\4\111\0"+ - "\1\215\7\0\1\151\7\0\1\151\3\0\1\56\7\0"+ - "\1\56\16\0\1\56\31\0\7\152\1\216\66\152\6\217"+ - "\1\220\1\153\66\217\1\0\2\154\6\0\1\154\1\0"+ - "\1\154\1\0\1\154\1\0\1\154\1\0\1\221\3\0"+ - "\3\154\2\0\1\221\3\0\1\154\5\0\2\154\31\0"+ - "\2\154\6\0\1\154\1\0\1\154\1\0\1\154\1\150"+ - "\1\154\1\0\1\221\3\0\3\154\2\0\1\221\3\0"+ - "\1\154\5\0\2\154\31\0\1\222\1\154\6\0\1\222"+ - "\1\0\1\154\1\0\1\154\1\0\1\154\1\223\1\221"+ - "\3\0\3\154\2\0\1\221\3\0\1\154\5\0\2\154"+ - "\14\0\1\223\31\0\1\150\57\0\24\162\1\224\51\162"+ - "\1\0\2\4\1\0\2\4\3\0\5\4\1\0\1\4"+ - "\1\0\1\4\3\0\3\4\1\225\23\4\23\0\2\4"+ - "\1\0\2\4\3\0\5\4\1\0\1\4\1\0\1\4"+ - "\3\0\1\4\1\226\25\4\23\0\2\4\1\0\2\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\1\4"+ - "\1\227\25\4\23\0\2\4\1\0\2\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\13\4\1\230\13\4"+ - "\23\0\2\4\1\0\2\4\3\0\5\4\1\0\1\4"+ - "\1\0\1\4\3\0\6\4\1\231\20\4\23\0\2\4"+ - "\1\0\2\4\3\0\5\4\1\0\1\4\1\0\1\4"+ - "\3\0\1\4\1\232\25\4\23\0\2\4\1\0\2\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\2\4"+ - "\1\233\24\4\23\0\2\4\1\0\2\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\15\4\1\234\11\4"+ - "\23\0\2\4\1\0\2\4\3\0\5\4\1\0\1\4"+ - "\1\0\1\4\3\0\1\4\1\235\25\4\23\0\2\4"+ - "\1\0\2\4\3\0\5\4\1\0\1\4\1\0\1\4"+ - "\3\0\24\4\1\236\2\4\23\0\2\4\1\0\2\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\1\4"+ - "\1\237\25\4\23\0\2\4\1\0\2\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\1\4\1\240\25\4"+ - "\23\0\2\4\1\0\2\4\3\0\5\4\1\0\1\4"+ - "\1\0\1\4\3\0\3\4\1\241\23\4\23\0\2\4"+ - "\1\0\2\4\3\0\5\4\1\0\1\4\1\0\1\4"+ - "\3\0\6\4\1\242\20\4\23\0\2\4\1\0\2\4"+ + "\7\4\1\214\14\4\1\215\2\4\76\0\1\216\54\0"+ + "\1\217\1\0\1\220\114\0\1\221\22\0\1\153\7\0"+ + "\1\153\3\0\1\56\7\0\1\56\16\0\1\56\31\0"+ + "\7\154\1\222\66\154\6\223\1\224\1\155\66\223\1\0"+ + "\2\156\6\0\1\156\1\0\1\156\1\0\1\156\1\0"+ + "\1\156\1\0\1\225\3\0\3\156\2\0\1\225\3\0"+ + "\1\156\5\0\2\156\31\0\2\156\6\0\1\156\1\0"+ + "\1\156\1\0\1\156\1\152\1\156\1\0\1\225\3\0"+ + "\3\156\2\0\1\225\3\0\1\156\5\0\2\156\31\0"+ + "\1\226\1\156\6\0\1\226\1\0\1\156\1\0\1\156"+ + "\1\0\1\156\1\227\1\225\3\0\3\156\2\0\1\225"+ + "\3\0\1\156\5\0\2\156\10\0\1\227\35\0\1\152"+ + "\57\0\24\164\1\230\51\164\1\0\2\4\1\0\2\4"+ "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\3\4"+ - "\1\243\23\4\23\0\2\4\1\0\2\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\6\4\1\244\20\4"+ + "\1\231\23\4\23\0\2\4\1\0\2\4\3\0\5\4"+ + "\1\0\1\4\1\0\1\4\3\0\1\4\1\232\25\4"+ "\23\0\2\4\1\0\2\4\3\0\5\4\1\0\1\4"+ - "\1\0\1\4\3\0\11\4\1\245\15\4\23\0\2\4"+ + "\1\0\1\4\3\0\1\4\1\233\25\4\23\0\2\4"+ "\1\0\2\4\3\0\5\4\1\0\1\4\1\0\1\4"+ - "\3\0\24\4\1\246\2\4\22\0\6\152\1\247\1\216"+ - "\66\152\7\217\1\250\66\217\1\0\1\151\7\0\1\151"+ - "\6\0\1\223\41\0\1\223\14\0\1\222\1\154\6\0"+ - "\1\222\1\0\1\154\1\0\1\251\1\0\1\154\1\0"+ - "\1\221\3\0\1\251\2\154\2\0\1\221\3\0\1\154"+ - "\5\0\1\251\1\154\31\0\1\151\7\0\1\151\64\0"+ - "\24\162\1\252\51\162\1\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\4\4\1\253"+ - "\22\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\10\4\1\254\16\4\23\0"+ + "\3\0\13\4\1\234\13\4\23\0\2\4\1\0\2\4"+ + "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\6\4"+ + "\1\235\20\4\23\0\2\4\1\0\2\4\3\0\5\4"+ + "\1\0\1\4\1\0\1\4\3\0\1\4\1\236\25\4"+ + "\23\0\2\4\1\0\2\4\3\0\5\4\1\0\1\4"+ + "\1\0\1\4\3\0\2\4\1\237\24\4\23\0\2\4"+ + "\1\0\2\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\15\4\1\240\11\4\23\0\2\4\1\0\2\4"+ + "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\1\4"+ + "\1\241\25\4\23\0\2\4\1\0\2\4\3\0\5\4"+ + "\1\0\1\4\1\0\1\4\3\0\24\4\1\242\2\4"+ + "\23\0\2\4\1\0\2\4\3\0\5\4\1\0\1\4"+ + "\1\0\1\4\3\0\1\4\1\243\25\4\23\0\2\4"+ + "\1\0\2\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\1\4\1\244\25\4\23\0\2\4\1\0\2\4"+ + "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\3\4"+ + "\1\245\23\4\23\0\2\4\1\0\2\4\3\0\5\4"+ + "\1\0\1\4\1\0\1\4\3\0\6\4\1\246\20\4"+ + "\23\0\2\4\1\0\2\4\3\0\5\4\1\0\1\4"+ + "\1\0\1\4\3\0\6\4\1\247\20\4\23\0\2\4"+ + "\1\0\2\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\11\4\1\250\15\4\23\0\2\4\1\0\2\4"+ + "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\24\4"+ + "\1\251\2\4\22\0\6\154\1\252\1\222\66\154\7\223"+ + "\1\253\66\223\1\0\1\153\7\0\1\153\6\0\1\227"+ + "\35\0\1\227\20\0\1\226\1\156\6\0\1\226\1\0"+ + "\1\156\1\0\1\254\1\0\1\156\1\0\1\225\3\0"+ + "\1\254\2\156\2\0\1\225\3\0\1\156\5\0\1\254"+ + "\1\156\31\0\1\153\7\0\1\153\64\0\24\164\1\255"+ + "\51\164\1\0\2\4\1\0\2\4\3\0\5\4\1\0"+ + "\1\4\1\0\1\4\3\0\4\4\1\256\22\4\23\0"+ "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\14\4\1\255\12\4\23\0\2\4\1\0"+ + "\1\4\3\0\10\4\1\257\16\4\23\0\2\4\1\0"+ "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\6\4\1\256\20\4\23\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\2\4\1\257"+ - "\24\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\23\4\1\260\3\4\23\0"+ + "\14\4\1\260\12\4\23\0\2\4\1\0\2\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\6\4\1\261"+ + "\20\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ + "\1\4\1\0\1\4\3\0\2\4\1\262\24\4\23\0"+ "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\7\4\1\261\17\4\23\0\2\4\1\0"+ + "\1\4\3\0\23\4\1\263\3\4\23\0\2\4\1\0"+ "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\6\4\1\262\20\4\23\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\3\4\1\263"+ - "\23\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\22\4\1\264\4\4\23\0"+ + "\7\4\1\264\17\4\23\0\2\4\1\0\2\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\6\4\1\265"+ + "\20\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ + "\1\4\1\0\1\4\3\0\3\4\1\266\23\4\23\0"+ "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\13\4\1\265\13\4\23\0\2\4\1\0"+ + "\1\4\3\0\22\4\1\267\4\4\23\0\2\4\1\0"+ "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\1\4\1\266\25\4\23\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\25\4\1\267"+ + "\1\4\1\270\25\4\23\0\2\4\1\0\2\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\25\4\1\271"+ "\1\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\1\4\1\270\25\4\22\0"+ - "\6\217\1\220\1\250\66\217\24\162\1\271\51\162\1\0"+ + "\1\4\1\0\1\4\3\0\1\4\1\272\25\4\22\0"+ + "\6\223\1\224\1\253\66\223\24\164\1\273\51\164\1\0"+ "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\5\4\1\272\21\4\23\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\274\21\4\23\0\2\4\1\0"+ "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\6\4\1\273\20\4\23\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\10\4\1\274"+ + "\6\4\1\275\20\4\23\0\2\4\1\0\2\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\10\4\1\276"+ "\16\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\13\4\1\275\13\4\23\0"+ + "\1\4\1\0\1\4\3\0\13\4\1\277\13\4\23\0"+ "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\10\4\1\276\16\4\23\0\2\4\1\0"+ + "\1\4\3\0\10\4\1\300\16\4\23\0\2\4\1\0"+ "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\5\4\1\277\21\4\23\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\17\4\1\300"+ + "\5\4\1\301\21\4\23\0\2\4\1\0\2\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\17\4\1\302"+ "\7\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\3\4\1\301\23\4\23\0"+ + "\1\4\1\0\1\4\3\0\3\4\1\303\23\4\23\0"+ "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\14\4\1\302\12\4\23\0\2\4\1\0"+ + "\1\4\3\0\14\4\1\304\12\4\23\0\2\4\1\0"+ "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\15\4\1\303\11\4\23\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\11\4\1\304"+ + "\15\4\1\305\11\4\23\0\2\4\1\0\2\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\11\4\1\306"+ "\15\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\6\4\1\305\20\4\23\0"+ + "\1\4\1\0\1\4\3\0\6\4\1\307\20\4\23\0"+ "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\3\4\1\306\23\4\23\0\2\4\1\0"+ + "\1\4\3\0\3\4\1\310\23\4\23\0\2\4\1\0"+ "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\1\4\1\307\25\4\23\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\2\4\1\310"+ + "\1\4\1\311\25\4\23\0\2\4\1\0\2\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\2\4\1\312"+ "\24\4\23\0\2\4\1\0\2\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\1\4\1\311\25\4\23\0"+ + "\1\4\1\0\1\4\3\0\1\4\1\313\25\4\23\0"+ "\2\4\1\0\2\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\10\4\1\312\16\4\23\0\2\4\1\0"+ + "\1\4\3\0\10\4\1\314\16\4\23\0\2\4\1\0"+ "\2\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\1\4\1\313\25\4\23\0\2\4\1\0\2\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\7\4\1\314"+ + "\1\4\1\315\25\4\23\0\2\4\1\0\2\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\7\4\1\316"+ "\17\4\22\0"; private static int [] zzUnpackTrans() { - int [] result = new int[8494]; + int [] result = new int[8432]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; @@ -486,14 +482,14 @@ class _JetLexer implements FlexLexer { private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\1\0\1\11\30\1\6\11\11\1\5\11\4\1\2\11"+ - "\1\0\3\1\6\11\36\1\6\11\1\1\5\11\3\1"+ - "\1\0\1\1\3\0\1\11\33\1\1\11\1\0\1\1"+ - "\1\11\1\0\1\1\2\0\22\1\1\11\1\0\1\1"+ - "\1\0\16\1\1\11\23\1"; + "\1\0\1\11\40\1\1\11\1\1\12\11\4\1\2\11"+ + "\1\0\3\1\7\11\37\1\1\0\1\1\12\11\3\1"+ + "\1\0\1\1\3\0\1\11\32\1\4\11\1\0\1\1"+ + "\1\11\1\0\1\1\2\0\21\1\1\11\1\0\1\1"+ + "\1\0\15\1\1\11\23\1"; private static int [] zzUnpackAttribute() { - int [] result = new int[204]; + int [] result = new int[206]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -801,339 +797,351 @@ class _JetLexer implements FlexLexer { case 3: { return JetTokens.IDENTIFIER; } - case 85: break; - case 61: + case 88: break; + case 62: { return JetTokens.FOR_KEYWORD ; } - case 86: break; - case 57: + case 89: break; + case 58: { return JetTokens.OUT_KEYWORD ; } - case 87: break; - case 79: + case 90: break; + case 82: { return JetTokens.RETURN_KEYWORD ; } - case 88: break; - case 67: + case 91: break; + case 71: { return JetTokens.NULL_KEYWORD ; } - case 89: break; - case 20: + case 92: break; + case 14: { return JetTokens.LT ; } - case 90: break; - case 38: + case 93: break; + case 39: { return JetTokens.DO_KEYWORD ; } - case 91: break; - case 17: + case 94: break; + case 13: { return JetTokens.PLUS ; } - case 92: break; + case 95: break; case 27: { return JetTokens.LONG_LITERAL; } - case 93: break; - case 56: + case 96: break; + case 57: { return JetTokens.RAW_STRING_LITERAL; } - case 94: break; - case 44: + case 97: break; + case 46: { return JetTokens.PLUSEQ ; } - case 95: break; - case 72: + case 98: break; + case 76: { return JetTokens.MATCH_KEYWORD ; } - case 96: break; + case 99: break; case 26: { return JetTokens.COMMA ; } - case 97: break; - case 21: + case 100: break; + case 15: { return JetTokens.GT ; } - case 98: break; + case 101: break; case 4: { return JetTokens.WHITE_SPACE; } - case 99: break; - case 80: + case 102: break; + case 83: { return JetTokens.TYPEOF_KEYWORD ; } - case 100: break; - case 16: + case 103: break; + case 24: { return JetTokens.RPAR ; } - case 101: break; - case 68: + case 104: break; + case 72: { return JetTokens.TRUE_KEYWORD ; } - case 102: break; + case 105: break; case 50: { return JetTokens.ANDAND ; } - case 103: break; - case 55: + case 106: break; + case 56: { return JetTokens.DOC_COMMENT; } - case 104: break; + case 107: break; case 28: { return JetTokens.FLOAT_LITERAL; } - case 105: break; + case 108: break; case 29: { return JetTokens.EOL_COMMENT; } - case 106: break; - case 24: + case 109: break; + case 17: { return JetTokens.COLON ; } - case 107: break; - case 47: + case 110: break; + case 48: { return JetTokens.LTEQ ; } - case 108: break; - case 11: + case 111: break; + case 38: + { return JetTokens.ARROW ; + } + case 112: break; + case 19: { return JetTokens.LBRACKET ; } - case 109: break; - case 54: + case 113: break; + case 55: { yypushback(2); return JetTokens.INTEGER_LITERAL; } - case 110: break; + case 114: break; case 9: { return JetTokens.CHARACTER_LITERAL; } - case 111: break; - case 63: + case 115: break; + case 64: { return JetTokens.VAR_KEYWORD ; } - case 112: break; - case 48: + case 116: break; + case 49: { return JetTokens.GTEQ ; } - case 113: break; + case 117: break; case 2: { return JetTokens.INTEGER_LITERAL; } - case 114: break; - case 14: + case 118: break; + case 22: { return JetTokens.RBRACE ; } - case 115: break; - case 71: + case 119: break; + case 75: { return JetTokens.CLASS_KEYWORD ; } - case 116: break; - case 18: + case 120: break; + case 12: { return JetTokens.EXCL ; } - case 117: break; - case 60: + case 121: break; + case 61: { return JetTokens.TRY_KEYWORD ; } - case 118: break; + case 122: break; case 45: { return JetTokens.EXCLEQ ; } - case 119: break; + case 123: break; case 37: { return JetTokens.MINUSEQ ; } - case 120: break; - case 73: + case 124: break; + case 77: { return JetTokens.THROW_KEYWORD ; } - case 121: break; - case 77: + case 125: break; + case 80: { return JetTokens.WHILE_KEYWORD ; } - case 122: break; + case 126: break; case 36: { return JetTokens.MINUSMINUS; } - case 123: break; - case 81: + case 127: break; + case 84: { return JetTokens.CONTINUE_KEYWORD ; } - case 124: break; + case 128: break; + case 68: + { return JetTokens.NOT_IN; + } + case 129: break; case 5: { return JetTokens.DIV ; } - case 125: break; + case 130: break; case 53: { return JetTokens.ELVIS ; } - case 126: break; - case 23: + case 131: break; + case 16: { return JetTokens.QUEST ; } - case 127: break; + case 132: break; case 51: { return JetTokens.OROR ; } - case 128: break; - case 19: + case 133: break; + case 18: { return JetTokens.PERC ; } - case 129: break; - case 46: + case 134: break; + case 69: + { return JetTokens.EXCLEQEQEQ; + } + case 135: break; + case 54: { return JetTokens.PERCEQ ; } - case 130: break; + case 136: break; case 34: { return JetTokens.RANGE ; } - case 131: break; + case 137: break; case 1: { return TokenType.BAD_CHARACTER; } - case 132: break; + case 138: break; case 52: { return JetTokens.SAFE_ACCESS; } - case 133: break; - case 83: + case 139: break; + case 86: { return JetTokens.NAMESPACE_KEYWORD ; } - case 134: break; - case 84: + case 140: break; + case 87: { return JetTokens.DECOMPOSER_KEYWORD ; } - case 135: break; + case 141: break; + case 67: + { return JetTokens.NOT_IS; + } + case 142: break; case 6: { return JetTokens.MUL ; } - case 136: break; - case 12: + case 143: break; + case 20: { return JetTokens.RBRACKET ; } - case 137: break; - case 43: + case 144: break; + case 47: { return JetTokens.PLUSPLUS ; } - case 138: break; - case 70: + case 145: break; + case 74: { return JetTokens.THIS_KEYWORD ; } - case 139: break; + case 146: break; case 7: { return JetTokens.DOT ; } - case 140: break; + case 147: break; case 25: { return JetTokens.SEMICOLON ; } - case 141: break; - case 42: + case 148: break; + case 43: { return JetTokens.IF_KEYWORD ; } - case 142: break; - case 22: + case 149: break; + case 11: { return JetTokens.EQ ; } - case 143: break; - case 15: + case 150: break; + case 23: { return JetTokens.LPAR ; } - case 144: break; + case 151: break; case 8: { return JetTokens.MINUS ; } - case 145: break; - case 75: + case 152: break; + case 78: { return JetTokens.FALSE_KEYWORD ; } - case 146: break; - case 69: + case 153: break; + case 73: { return JetTokens.TYPE_KEYWORD ; } - case 147: break; - case 58: + case 154: break; + case 59: { return JetTokens.REF_KEYWORD ; } - case 148: break; - case 62: + case 155: break; + case 63: { return JetTokens.FUN_KEYWORD ; } - case 149: break; - case 40: + case 156: break; + case 41: { return JetTokens.IS_KEYWORD ; } - case 150: break; + case 157: break; case 31: { return JetTokens.DIVEQ ; } - case 151: break; - case 82: + case 158: break; + case 85: { return JetTokens.EXTENSION_KEYWORD ; } - case 152: break; - case 39: + case 159: break; + case 40: { return JetTokens.AS_KEYWORD ; } - case 153: break; - case 66: + case 160: break; + case 70: { return JetTokens.ELSE_KEYWORD ; } - case 154: break; - case 41: + case 161: break; + case 42: { return JetTokens.IN_KEYWORD ; } - case 155: break; - case 49: + case 162: break; + case 44: { return JetTokens.EQEQ ; } - case 156: break; - case 64: + case 163: break; + case 65: { return JetTokens.VAL_KEYWORD ; } - case 157: break; - case 65: + case 164: break; + case 66: { return JetTokens.EQEQEQ ; } - case 158: break; - case 59: + case 165: break; + case 60: { return JetTokens.NEW_KEYWORD ; } - case 159: break; + case 166: break; case 32: { return JetTokens.MULTEQ ; } - case 160: break; + case 167: break; case 10: { return JetTokens.STRING_LITERAL; } - case 161: break; - case 13: + case 168: break; + case 21: { return JetTokens.LBRACE ; } - case 162: break; - case 74: - { return JetTokens.ISNOT_KEYWORD ; - } - case 163: break; - case 78: + case 169: break; + case 81: { return JetTokens.OBJECT_KEYWORD ; } - case 164: break; - case 76: + case 170: break; + case 79: { return JetTokens.BREAK_KEYWORD ; } - case 165: break; + case 171: break; case 30: { return JetTokens.BLOCK_COMMENT; } - case 166: break; + case 172: break; case 35: { return JetTokens.FILTER ; } - case 167: break; + case 173: break; case 33: { return JetTokens.MAP ; } - case 168: break; + case 174: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; diff --git a/idea/testData/psi/Attributes.txt b/idea/testData/psi/Attributes.txt index 828eabfbc84..c9c5686024c 100644 --- a/idea/testData/psi/Attributes.txt +++ b/idea/testData/psi/Attributes.txt @@ -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') diff --git a/idea/testData/psi/Attributes_ERR.txt b/idea/testData/psi/Attributes_ERR.txt index c663576eec8..5a5d96f1d2b 100644 --- a/idea/testData/psi/Attributes_ERR.txt +++ b/idea/testData/psi/Attributes_ERR.txt @@ -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 @@ -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 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') diff --git a/idea/testData/psi/ControlStructures.jet b/idea/testData/psi/ControlStructures.jet index 15bbc908069..44cf337e1b7 100644 --- a/idea/testData/psi/ControlStructures.jet +++ b/idea/testData/psi/ControlStructures.jet @@ -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) {} diff --git a/idea/testData/psi/ControlStructures.txt b/idea/testData/psi/ControlStructures.txt index a5e18b3b154..1ad0508e7d3 100644 --- a/idea/testData/psi/ControlStructures.txt +++ b/idea/testData/psi/ControlStructures.txt @@ -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 diff --git a/idea/testData/psi/Decomposers.jet b/idea/testData/psi/Decomposers.jet index 82fe053adb4..9ca4f0f4114 100644 --- a/idea/testData/psi/Decomposers.jet +++ b/idea/testData/psi/Decomposers.jet @@ -1,6 +1,6 @@ decomposer (a, a) decomposer () -decomposer foo.{() : ()}.bar(a, a) +decomposer {foo.() : ()}.bar(a, a) decomposer a.foobar() [a] decomposer foobar([a] s) decomposer foobar() diff --git a/idea/testData/psi/Decomposers.txt b/idea/testData/psi/Decomposers.txt index 9c9cf55826b..cc0b1e4b766 100644 --- a/idea/testData/psi/Decomposers.txt +++ b/idea/testData/psi/Decomposers.txt @@ -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') diff --git a/idea/testData/psi/Decomposers_ERR.jet b/idea/testData/psi/Decomposers_ERR.jet index 8454e8d9f5c..00c44953f46 100644 --- a/idea/testData/psi/Decomposers_ERR.jet +++ b/idea/testData/psi/Decomposers_ERR.jet @@ -1,5 +1,5 @@ decomposer (a a) -decomposer foo.{() : ()}.bar(, a) +decomposer {foo.() : ()}.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.{() : ()}.bar(a, a). +decomposer {foo.() : ()}.bar(a, a). -decomposer foo.bar.-() \ No newline at end of file +decomposer foo.bar.-() diff --git a/idea/testData/psi/Decomposers_ERR.txt b/idea/testData/psi/Decomposers_ERR.txt index 3805c9e3f10..aa3e2bd550d 100644 --- a/idea/testData/psi/Decomposers_ERR.txt +++ b/idea/testData/psi/Decomposers_ERR.txt @@ -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 @@ -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)(')') \ No newline at end of file diff --git a/idea/testData/psi/FileStart_ERR.txt b/idea/testData/psi/FileStart_ERR.txt new file mode 100644 index 00000000000..cfb916ad671 --- /dev/null +++ b/idea/testData/psi/FileStart_ERR.txt @@ -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 + + PsiWhiteSpace('\n') + IMPORT_DIRECTIVE + PsiElement(import)('import') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('foo') \ No newline at end of file diff --git a/idea/testData/psi/FunctionTypes.jet b/idea/testData/psi/FunctionTypes.jet index 06207552e9a..c0e1f3ee7ac 100644 --- a/idea/testData/psi/FunctionTypes.jet +++ b/idea/testData/psi/FunctionTypes.jet @@ -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.T.{() : ()} -type f = (S).{() : ()}.{() : ()} -type f = T.{() : ()}.{() : ()} -type f = T.T.{() : ()}.{() : ()} -type f = T.T.{() : ()}.{() : ()} -type f = (S).{() : ()}.{() : ()} \ No newline at end of file +type f = {T.() : ()} +type f = {T.T.() : ()} +type f = {T.T.() : ()} +type f = {{(S).() : ()}.() : ()} +type f = {{T.() : ()}.() : ()} +type f = {{T.T.() : ()}.() : ()} +type f = {{T.T.() : ()}.() : ()} +type f = {{(S).() : ()}.() : ()} + +type f = [a] {T.() : ()} +type f = [a] {T.T.() : ()} +type f = [a] {T.T.() : ()} +type f = [a] {[a] {(S).() : ()}.() : ()} +type f = [a] {[a] {T.() : ()}.() : ()} +type f = [a] {[a] {T.T.() : ()}.() : ()} +type f = [a] {[a] {T.T.() : ()}.() : ()} +type f = [a] {[a] {(S).() : ()}.() : ()} \ No newline at end of file diff --git a/idea/testData/psi/FunctionTypes.txt b/idea/testData/psi/FunctionTypes.txt index c8ddc07f6b5..d8484cd9e53 100644 --- a/idea/testData/psi/FunctionTypes.txt +++ b/idea/testData/psi/FunctionTypes.txt @@ -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 + + 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 + + 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 + + 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 + + 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 + + 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 - - 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 - - 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 - - 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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)(')') diff --git a/idea/testData/psi/FunctionTypes_ERR.txt b/idea/testData/psi/FunctionTypes_ERR.txt index 31aa27f065a..57d02f12bce 100644 --- a/idea/testData/psi/FunctionTypes_ERR.txt +++ b/idea/testData/psi/FunctionTypes_ERR.txt @@ -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 diff --git a/idea/testData/psi/Functions.jet b/idea/testData/psi/Functions.jet index 78e75e541b0..ef3513b2266 100644 --- a/idea/testData/psi/Functions.jet +++ b/idea/testData/psi/Functions.jet @@ -1,20 +1,23 @@ fun foo() fun [a] foo() fun [a] T.foo() -fun [a] T.{(A) : ()}.foo() +fun {[a] T.(A) : ()}.foo() fun [a] T.foo(a : foo) : bar fun [a()] T.foo(a : foo) : bar fun foo(); fun [a] foo(); fun [a] T.foo(); -fun [a] T.{(A) : ()}.foo(); +fun {[a] T.(A) : ()}.foo(); fun [a] T.foo(a : foo) : bar; fun [a()] T.foo(a : foo) : bar; fun foo() {} fun [a] foo() {} fun [a] T.foo() {} -fun [a] T.{(A) : ()}.foo() {} +fun {[a] T.(A) : ()}.foo() {} fun [a] T.foo(a : foo) : bar {} fun [a()] T.foo(a : foo) : bar {} + +fun [a] {[a] T.(A) : ()}.foo() {} +fun [a()] T.foo(a : foo) : bar {} diff --git a/idea/testData/psi/Functions.txt b/idea/testData/psi/Functions.txt index aa5f0e93b43..6515268599a 100644 --- a/idea/testData/psi/Functions.txt +++ b/idea/testData/psi/Functions.txt @@ -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 + + 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)('}') \ No newline at end of file diff --git a/idea/testData/psi/Functions_ERR.jet b/idea/testData/psi/Functions_ERR.jet index dc30b5d778e..08d7ed21abe 100644 --- a/idea/testData/psi/Functions_ERR.jet +++ b/idea/testData/psi/Functions_ERR.jet @@ -10,4 +10,4 @@ fun [a()] T.foo(, a : foo, , a: b) : bar fun foo() : = a; -fun [a] T.{(A) : ()}.-() \ No newline at end of file +fun {[a] T.(A) : ()}.-() \ No newline at end of file diff --git a/idea/testData/psi/Functions_ERR.txt b/idea/testData/psi/Functions_ERR.txt index d6e03a4d957..066ff0572b8 100644 --- a/idea/testData/psi/Functions_ERR.txt +++ b/idea/testData/psi/Functions_ERR.txt @@ -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 diff --git a/idea/tests/org/jetbrains/jet/parsing/JetParsingTest.java b/idea/tests/org/jetbrains/jet/parsing/JetParsingTest.java index cae2f18f92b..cea09fb07c4 100644 --- a/idea/tests/org/jetbrains/jet/parsing/JetParsingTest.java +++ b/idea/tests/org/jetbrains/jet/parsing/JetParsingTest.java @@ -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);} }