diff --git a/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java b/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java index 108da22c68b..5e072a32b08 100644 --- a/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java +++ b/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java @@ -6,6 +6,9 @@ import com.intellij.psi.tree.TokenSet; import org.jetbrains.jet.JetNodeType; import org.jetbrains.jet.lexer.JetTokens; +import java.util.ArrayList; +import java.util.List; + import static org.jetbrains.jet.JetNodeTypes.*; import static org.jetbrains.jet.lexer.JetTokens.*; @@ -80,12 +83,9 @@ public class JetExpressionParsing extends AbstractJetParsing { NAMESPACE_KEYWORD // for absolute qualified names ), MODIFIER_KEYWORDS); - private final JetParsing myJetParsing; - - public JetExpressionParsing(SemanticWhitespaceAwarePsiBuilder builder, JetParsing jetParsing) { - super(builder); - myJetParsing = jetParsing; - } + private static final TokenSet EXPRESSION_FOLLOW = TokenSet.create( + SEMICOLON, DOUBLE_ARROW, COMMA, RBRACE, RPAR, RBRACKET + ); @SuppressWarnings({"UnusedDeclaration"}) private enum Precedence { @@ -170,6 +170,29 @@ public class JetExpressionParsing extends AbstractJetParsing { } } + private final JetParsing myJetParsing; + private TokenSet expressionFollow = null; + private TokenSet decomposerExpressionFollow = null; + + public JetExpressionParsing(SemanticWhitespaceAwarePsiBuilder builder, JetParsing jetParsing) { + super(builder); + myJetParsing = jetParsing; + } + + private TokenSet getDecomposerExpressionFollow() { + // TODO : memoize + List elvisFollow = new ArrayList(); + Precedence precedence = Precedence.ELVIS; + while (precedence != null) { + IElementType[] types = precedence.getOperations().getTypes(); + for (IElementType type : types) { + elvisFollow.add(type); + } + precedence = precedence.higher; + } + return TokenSet.orSet(EXPRESSION_FOLLOW, TokenSet.create(elvisFollow.toArray(new IElementType[elvisFollow.size()]))); + } + /* * expression * : attributes expression @@ -620,14 +643,14 @@ public class JetExpressionParsing extends AbstractJetParsing { /* * pattern - * : attributes pattern - * : type // '[a] T' is a type-pattern 'T' with an attribute '[a]', not a type-pattern '[a] T' - * // this makes sense because is-chack may be different for a type with attributes - * : tuplePattern - * : decomposerPattern - * : constantPattern - * : bindingPattern - * : expressionPattern + * : attributes pattern + * : type // '[a] T' is a type-pattern 'T' with an attribute '[a]', not a type-pattern '[a] T' + * // this makes sense because is-check may be different for a type with attributes + * : tuplePattern + * : decomposerPattern + * : constantPattern + * : bindingPattern + * : "*" // wildcard pattern * ; */ private void parsePattern() { @@ -635,22 +658,37 @@ public class JetExpressionParsing extends AbstractJetParsing { myJetParsing.parseAttributeList(); - if (at(NAMESPACE_KEYWORD) || at(IDENTIFIER)) { - myJetParsing.parseUserTypeOrQualifiedName(); - if (!myBuilder.newlineBeforeCurrentToken() && at(LPAR)) { + if (at(NAMESPACE_KEYWORD) || at(IDENTIFIER) || at(LBRACE) || at(THIS_KEYWORD)) { + PsiBuilder.Marker rollbackMarker = mark(); + parseBinaryExpression(Precedence.ELVIS); + if (at(AT)) { + rollbackMarker.drop(); + advance(); // AT PsiBuilder.Marker list = mark(); parseTuplePattern(DECOMPOSER_ARGUMENT); list.done(DECOMPOSER_ARGUMENT_LIST); pattern.done(DECOMPOSER_PATTERN); } else { - pattern.done(TYPE_PATTERN); + int expressionEndOffset = myBuilder.getCurrentOffset(); + rollbackMarker.rollbackTo(); + rollbackMarker = mark(); + + myJetParsing.parseTypeRef(); + if (at(AT)) { + errorAndAdvance("'@' is allowed only after a decomposer expression, not after a type"); + } + if (myBuilder.getCurrentOffset() < expressionEndOffset) { + rollbackMarker.rollbackTo(); + parseBinaryExpression(Precedence.ELVIS); + pattern.done(DECOMPOSER_PATTERN); + } else { + rollbackMarker.drop(); + pattern.done(TYPE_PATTERN); + } } } else if (at(LPAR)) { parseTuplePattern(TUPLE_PATTERN_ENTRY); pattern.done(TUPLE_PATTERN); - } else if (at(LBRACE) || at(CAPITALIZED_THIS_KEYWORD)) { - myJetParsing.parseTypeRef(); - pattern.done(TYPE_PATTERN); } else if (at(QUEST)) { parseBindingPattern(); @@ -673,10 +711,9 @@ public class JetExpressionParsing extends AbstractJetParsing { * ; */ private void parseTuplePattern(JetNodeType entryType) { - assert _at(LPAR); myBuilder.disableNewlines(); - advance(); // LPAR + expect(LPAR, "Expecting '('", getDecomposerExpressionFollow()); if (!at(RPAR)) { while (true) { diff --git a/idea/src/org/jetbrains/jet/lexer/Jet.flex b/idea/src/org/jetbrains/jet/lexer/Jet.flex index 2d38dd55784..c37d23ce545 100644 --- a/idea/src/org/jetbrains/jet/lexer/Jet.flex +++ b/idea/src/org/jetbrains/jet/lexer/Jet.flex @@ -165,6 +165,7 @@ RAW_STRING_LITERAL = {THREE_QUO} {QUO_STRING_CHAR}* {THREE_QUO}? "=" { return JetTokens.EQ ; } "," { return JetTokens.COMMA ; } "#" { return JetTokens.HASH ; } + "@" { return JetTokens.AT ; } . { 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 7d16a155577..0b20ed21d68 100644 --- a/idea/src/org/jetbrains/jet/lexer/JetTokens.java +++ b/idea/src/org/jetbrains/jet/lexer/JetTokens.java @@ -102,6 +102,7 @@ public interface JetTokens { JetToken NOT_IN = JetKeywordToken.keyword("NOT_IN"); JetToken NOT_IS = JetKeywordToken.keyword("NOT_IS"); JetToken HASH = new JetToken("HASH"); + JetToken AT = new JetToken("AT"); JetToken COMMA = new JetToken("COMMA"); diff --git a/idea/src/org/jetbrains/jet/lexer/_JetLexer.java b/idea/src/org/jetbrains/jet/lexer/_JetLexer.java index d5785492f81..66050894b89 100644 --- a/idea/src/org/jetbrains/jet/lexer/_JetLexer.java +++ b/idea/src/org/jetbrains/jet/lexer/_JetLexer.java @@ -1,19 +1,17 @@ -/* The following code was generated by JFlex 1.4.3 on 1/26/11 3:03 PM */ +/* The following code was generated by JFlex 1.4.3 on 2/8/11 6:25 PM */ /* It's an automatically generated code. Do not modify it. */ package org.jetbrains.jet.lexer; -import com.intellij.lexer.*; -import com.intellij.psi.*; +import com.intellij.lexer.FlexLexer; +import com.intellij.psi.TokenType; import com.intellij.psi.tree.IElementType; -import org.jetbrains.jet.lexer.JetTokens; - /** * This class is a scanner generated by * JFlex 1.4.3 - * on 1/26/11 3:03 PM from the specification file + * on 2/8/11 6:25 PM from the specification file * /Users/abreslav/work/jet/idea/src/org/jetbrains/jet/lexer/Jet.flex */ class _JetLexer implements FlexLexer { @@ -40,7 +38,7 @@ class _JetLexer implements FlexLexer { "\11\5\1\3\1\12\1\0\1\3\1\0\16\5\4\0\1\3\1\60"+ "\1\26\1\101\1\7\1\70\1\64\1\24\1\75\1\76\1\11\1\61"+ "\1\100\1\22\1\20\1\10\1\13\11\1\1\67\1\77\1\62\1\57"+ - "\1\63\1\66\1\0\1\2\1\15\1\2\1\17\1\21\1\17\5\4"+ + "\1\63\1\66\1\102\1\2\1\15\1\2\1\17\1\21\1\17\5\4"+ "\1\16\3\4\1\23\3\4\1\54\3\4\1\14\2\4\1\71\1\25"+ "\1\72\1\0\1\4\1\6\1\30\1\46\1\35\1\56\1\32\1\45"+ "\1\4\1\51\1\40\1\47\1\53\1\52\1\31\1\27\1\41\1\34"+ @@ -143,23 +141,23 @@ class _JetLexer implements FlexLexer { "\1\6\1\2\1\7\1\10\1\11\1\12\16\3\1\13"+ "\1\14\1\15\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\1\34\3\35\1\0\1\36\1\0\1\37\1\40"+ - "\1\41\1\42\1\0\2\2\1\35\1\43\1\44\1\45"+ - "\1\46\1\47\1\50\2\11\3\12\3\3\1\51\7\3"+ - "\1\52\1\53\1\54\11\3\1\55\1\56\1\57\1\0"+ - "\1\60\1\61\1\62\1\63\1\64\1\65\1\66\1\67"+ - "\1\70\1\71\1\72\1\35\1\3\1\0\1\40\1\73"+ - "\1\0\1\34\3\0\1\12\1\74\1\3\1\75\6\3"+ - "\1\76\6\3\1\77\1\100\4\3\1\101\1\102\1\103"+ - "\1\104\1\105\1\106\1\36\1\0\2\73\1\0\1\35"+ - "\2\0\1\3\1\107\1\3\1\110\2\3\1\111\1\112"+ - "\1\113\5\3\1\114\1\3\1\115\1\40\1\0\1\35"+ - "\1\0\3\3\1\116\1\3\1\117\2\3\1\120\1\121"+ - "\1\122\1\74\3\3\1\123\1\124\1\125\5\3\1\126"+ - "\1\127\1\130"; + "\1\33\1\34\1\35\3\36\1\0\1\37\1\0\1\40"+ + "\1\41\1\42\1\43\1\0\2\2\1\36\1\44\1\45"+ + "\1\46\1\47\1\50\1\51\2\11\3\12\3\3\1\52"+ + "\7\3\1\53\1\54\1\55\11\3\1\56\1\57\1\60"+ + "\1\0\1\61\1\62\1\63\1\64\1\65\1\66\1\67"+ + "\1\70\1\71\1\72\1\73\1\36\1\3\1\0\1\41"+ + "\1\74\1\0\1\35\3\0\1\12\1\75\1\3\1\76"+ + "\6\3\1\77\6\3\1\100\1\101\4\3\1\102\1\103"+ + "\1\104\1\105\1\106\1\107\1\37\1\0\2\74\1\0"+ + "\1\36\2\0\1\3\1\110\1\3\1\111\2\3\1\112"+ + "\1\113\1\114\5\3\1\115\1\3\1\116\1\41\1\0"+ + "\1\36\1\0\3\3\1\117\1\3\1\120\2\3\1\121"+ + "\1\122\1\123\1\75\3\3\1\124\1\125\1\126\5\3"+ + "\1\127\1\130\1\131"; private static int [] zzUnpackAction() { - int [] result = new int[205]; + int [] result = new int[206]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -184,35 +182,35 @@ class _JetLexer implements FlexLexer { private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\102\0\204\0\306\0\u0108\0\u014a\0\u018c\0\u01ce"+ - "\0\u0210\0\u0252\0\u0294\0\u02d6\0\u0318\0\u035a\0\u039c\0\u03de"+ - "\0\u0420\0\u0462\0\u04a4\0\u04e6\0\u0528\0\u056a\0\u05ac\0\u05ee"+ - "\0\u0630\0\u0672\0\u06b4\0\u06f6\0\u0738\0\u077a\0\u07bc\0\u07fe"+ - "\0\u0840\0\u0882\0\u08c4\0\u0906\0\102\0\u0948\0\102\0\102"+ - "\0\102\0\102\0\102\0\102\0\102\0\102\0\102\0\102"+ - "\0\102\0\u098a\0\u09cc\0\u0a0e\0\u0a50\0\u0a92\0\u0ad4\0\u0b16"+ - "\0\102\0\102\0\u0b58\0\u0b9a\0\u0bdc\0\u0c1e\0\102\0\102"+ - "\0\102\0\102\0\102\0\102\0\102\0\u0c60\0\u0ca2\0\u0ce4"+ - "\0\u0d26\0\u0d68\0\u0daa\0\u0dec\0\306\0\u0e2e\0\u0e70\0\u0eb2"+ - "\0\u0ef4\0\u0f36\0\u0f78\0\u0fba\0\306\0\306\0\306\0\u0ffc"+ - "\0\u103e\0\u1080\0\u10c2\0\u1104\0\u1146\0\u1188\0\u11ca\0\u120c"+ - "\0\306\0\u124e\0\102\0\u1290\0\u12d2\0\102\0\102\0\102"+ - "\0\102\0\102\0\102\0\102\0\102\0\102\0\102\0\u1314"+ - "\0\102\0\u1356\0\u1398\0\u13da\0\u141c\0\u141c\0\u145e\0\u14a0"+ - "\0\u14e2\0\102\0\u1524\0\u1566\0\306\0\u15a8\0\u15ea\0\u162c"+ - "\0\u166e\0\u16b0\0\u16f2\0\306\0\u1734\0\u1776\0\u17b8\0\u17fa"+ - "\0\u183c\0\u187e\0\306\0\306\0\u18c0\0\u1902\0\u1944\0\u1986"+ - "\0\306\0\306\0\102\0\102\0\102\0\102\0\102\0\u19c8"+ - "\0\u1a0a\0\102\0\u1a4c\0\u1a8e\0\u1ad0\0\u1b12\0\u1b54\0\306"+ - "\0\u1b96\0\306\0\u1bd8\0\u1c1a\0\306\0\u1c5c\0\306\0\u1c9e"+ - "\0\u1ce0\0\u1d22\0\u1d64\0\u1da6\0\306\0\u1de8\0\306\0\102"+ - "\0\u1e2a\0\u141c\0\u1e6c\0\u1eae\0\u1ef0\0\u1f32\0\306\0\u1f74"+ - "\0\306\0\u1fb6\0\u1ff8\0\306\0\306\0\306\0\102\0\u203a"+ - "\0\u207c\0\u20be\0\306\0\306\0\306\0\u2100\0\u2142\0\u2184"+ - "\0\u21c6\0\u2208\0\306\0\306\0\306"; + "\0\0\0\103\0\206\0\311\0\u010c\0\u014f\0\u0192\0\u01d5"+ + "\0\u0218\0\u025b\0\u029e\0\u02e1\0\u0324\0\u0367\0\u03aa\0\u03ed"+ + "\0\u0430\0\u0473\0\u04b6\0\u04f9\0\u053c\0\u057f\0\u05c2\0\u0605"+ + "\0\u0648\0\u068b\0\u06ce\0\u0711\0\u0754\0\u0797\0\u07da\0\u081d"+ + "\0\u0860\0\u08a3\0\u08e6\0\u0929\0\103\0\u096c\0\103\0\103"+ + "\0\103\0\103\0\103\0\103\0\103\0\103\0\103\0\103"+ + "\0\103\0\103\0\u09af\0\u09f2\0\u0a35\0\u0a78\0\u0abb\0\u0afe"+ + "\0\u0b41\0\103\0\103\0\u0b84\0\u0bc7\0\u0c0a\0\u0c4d\0\103"+ + "\0\103\0\103\0\103\0\103\0\103\0\103\0\u0c90\0\u0cd3"+ + "\0\u0d16\0\u0d59\0\u0d9c\0\u0ddf\0\u0e22\0\311\0\u0e65\0\u0ea8"+ + "\0\u0eeb\0\u0f2e\0\u0f71\0\u0fb4\0\u0ff7\0\311\0\311\0\311"+ + "\0\u103a\0\u107d\0\u10c0\0\u1103\0\u1146\0\u1189\0\u11cc\0\u120f"+ + "\0\u1252\0\311\0\u1295\0\103\0\u12d8\0\u131b\0\103\0\103"+ + "\0\103\0\103\0\103\0\103\0\103\0\103\0\103\0\103"+ + "\0\u135e\0\103\0\u13a1\0\u13e4\0\u1427\0\u146a\0\u146a\0\u14ad"+ + "\0\u14f0\0\u1533\0\103\0\u1576\0\u15b9\0\311\0\u15fc\0\u163f"+ + "\0\u1682\0\u16c5\0\u1708\0\u174b\0\311\0\u178e\0\u17d1\0\u1814"+ + "\0\u1857\0\u189a\0\u18dd\0\311\0\311\0\u1920\0\u1963\0\u19a6"+ + "\0\u19e9\0\311\0\311\0\103\0\103\0\103\0\103\0\103"+ + "\0\u1a2c\0\u1a6f\0\103\0\u1ab2\0\u1af5\0\u1b38\0\u1b7b\0\u1bbe"+ + "\0\311\0\u1c01\0\311\0\u1c44\0\u1c87\0\311\0\u1cca\0\311"+ + "\0\u1d0d\0\u1d50\0\u1d93\0\u1dd6\0\u1e19\0\311\0\u1e5c\0\311"+ + "\0\103\0\u1e9f\0\u146a\0\u1ee2\0\u1f25\0\u1f68\0\u1fab\0\311"+ + "\0\u1fee\0\311\0\u2031\0\u2074\0\311\0\311\0\311\0\103"+ + "\0\u20b7\0\u20fa\0\u213d\0\311\0\311\0\311\0\u2180\0\u21c3"+ + "\0\u2206\0\u2249\0\u228c\0\311\0\311\0\311"; private static int [] zzUnpackRowMap() { - int [] result = new int[205]; + int [] result = new int[206]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -242,222 +240,223 @@ class _JetLexer implements FlexLexer { "\1\4\1\27\1\30\1\4\1\31\3\4\1\32\1\33"+ "\1\34\1\35\1\36\1\37\1\40\1\41\1\42\1\43"+ "\1\44\1\45\1\46\1\47\1\50\1\51\1\52\1\53"+ - "\1\54\1\55\1\56\1\57\103\0\1\3\11\0\1\3"+ - "\2\0\1\60\1\61\1\62\1\63\10\0\1\63\12\0"+ - "\1\61\4\0\1\60\3\0\1\61\24\0\2\4\1\0"+ - "\2\4\1\0\1\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\30\4\26\0\1\5\6\0\1\5\71\0"+ - "\1\64\1\0\1\64\2\0\1\64\4\0\4\64\1\0"+ - "\1\64\1\0\1\64\3\0\30\64\24\0\1\4\1\65"+ - "\1\0\1\65\1\4\1\66\1\65\3\0\1\4\4\65"+ - "\1\0\1\65\1\0\1\65\3\0\30\65\33\0\1\67"+ - "\1\70\45\0\1\71\101\0\1\72\23\0\1\73\11\0"+ - "\1\73\1\74\1\75\1\60\1\61\1\62\1\63\10\0"+ - "\1\63\3\0\1\74\6\0\1\61\1\75\3\0\1\60"+ - "\3\0\1\61\24\0\1\76\7\0\1\77\1\0\1\76"+ - "\4\0\1\100\45\0\1\101\35\0\1\102\34\0\1\103"+ - "\3\0\1\104\16\0\12\15\1\0\11\15\1\105\1\106"+ - "\54\15\12\107\1\0\12\107\1\110\1\111\53\107\1\0"+ - "\2\4\1\0\2\4\1\0\1\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\1\4\1\112\1\4\1\113"+ - "\7\4\1\114\14\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\4\4\1\115\23\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\7\4\1\116\13\4\1\117\4\4\24\0\2\4\1\0"+ - "\2\4\1\0\1\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\12\4\1\120\10\4\1\121\4\4\24\0"+ - "\2\4\1\0\2\4\1\0\1\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\14\4\1\122\1\123\4\4"+ - "\1\124\5\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\1\125"+ - "\3\4\1\126\11\4\1\127\11\4\24\0\2\4\1\0"+ - "\2\4\1\0\1\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\17\4\1\130\10\4\24\0\2\4\1\0"+ - "\2\4\1\0\1\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\3\4\1\131\24\4\24\0\2\4\1\0"+ - "\2\4\1\0\1\4\3\0\5\4\1\0\1\4\1\0"+ - "\1\4\3\0\1\4\1\132\10\4\1\133\1\134\14\4"+ - "\24\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\14\4\1\135\13\4"+ - "\24\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\22\4\1\136\5\4"+ - "\24\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\22\4\1\137\5\4"+ - "\24\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\1\4\1\140\26\4"+ - "\24\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\12\4\1\141\15\4"+ - "\102\0\1\142\3\0\1\143\56\0\1\144\16\0\1\145"+ - "\101\0\1\146\1\0\1\147\77\0\1\150\101\0\1\151"+ - "\106\0\1\152\102\0\1\153\34\0\1\154\46\0\1\155"+ - "\71\0\1\156\23\0\1\76\11\0\1\76\3\0\1\61"+ - "\1\157\1\63\10\0\1\63\12\0\1\61\10\0\1\61"+ - "\24\0\1\160\11\0\1\160\3\0\1\61\2\0\1\160"+ - "\22\0\1\61\10\0\1\61\2\0\1\160\21\0\2\64"+ - "\1\0\2\64\1\161\1\64\3\0\5\64\1\0\1\64"+ - "\1\0\1\64\3\0\30\64\24\0\2\65\1\0\2\65"+ - "\1\0\1\65\3\0\5\65\1\0\1\65\1\0\1\65"+ - "\3\0\30\65\25\0\1\162\1\0\1\162\2\0\1\162"+ - "\4\0\4\162\1\0\1\162\1\0\1\162\3\0\30\162"+ - "\23\0\12\67\1\0\67\67\11\163\1\164\70\163\1\0"+ - "\1\73\11\0\1\73\3\0\1\61\1\76\1\63\10\0"+ - "\1\63\12\0\1\61\10\0\1\61\23\0\1\165\2\74"+ - "\7\165\1\0\1\74\1\165\1\74\1\166\1\74\1\167"+ - "\1\74\1\165\1\170\4\165\1\74\1\165\1\74\1\165"+ - "\1\170\1\74\7\165\2\74\3\165\1\166\3\165\1\74"+ - "\23\165\1\0\1\75\11\0\1\75\2\0\1\60\1\0"+ - "\1\171\31\0\1\60\30\0\1\76\11\0\1\76\3\0"+ - "\1\61\1\0\1\63\10\0\1\63\12\0\1\61\10\0"+ - "\1\61\23\0\12\15\1\0\67\15\12\107\1\0\12\107"+ - "\1\110\1\172\65\107\1\0\67\107\26\0\1\173\54\0"+ - "\2\4\1\0\2\4\1\0\1\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\2\4\1\174\25\4\24\0"+ - "\2\4\1\0\2\4\1\0\1\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\21\4\1\175\6\4\24\0"+ - "\2\4\1\0\2\4\1\0\1\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\23\4\1\176\4\4\24\0"+ - "\2\4\1\0\2\4\1\0\1\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\10\4\1\177\17\4\24\0"+ - "\2\4\1\0\2\4\1\0\1\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\4\4\1\200\23\4\24\0"+ - "\2\4\1\0\2\4\1\0\1\4\3\0\5\4\1\0"+ - "\1\4\1\0\1\4\3\0\1\201\27\4\24\0\2\4"+ + "\1\54\1\55\1\56\1\57\1\60\104\0\1\3\11\0"+ + "\1\3\2\0\1\61\1\62\1\63\1\64\10\0\1\64"+ + "\12\0\1\62\4\0\1\61\3\0\1\62\25\0\2\4"+ "\1\0\2\4\1\0\1\4\3\0\5\4\1\0\1\4"+ - "\1\0\1\4\3\0\1\4\1\202\26\4\24\0\2\4"+ + "\1\0\1\4\3\0\30\4\27\0\1\5\6\0\1\5"+ + "\72\0\1\65\1\0\1\65\2\0\1\65\4\0\4\65"+ + "\1\0\1\65\1\0\1\65\3\0\30\65\25\0\1\4"+ + "\1\66\1\0\1\66\1\4\1\67\1\66\3\0\1\4"+ + "\4\66\1\0\1\66\1\0\1\66\3\0\30\66\34\0"+ + "\1\70\1\71\45\0\1\72\102\0\1\73\24\0\1\74"+ + "\11\0\1\74\1\75\1\76\1\61\1\62\1\63\1\64"+ + "\10\0\1\64\3\0\1\75\6\0\1\62\1\76\3\0"+ + "\1\61\3\0\1\62\25\0\1\77\7\0\1\100\1\0"+ + "\1\77\4\0\1\101\45\0\1\102\36\0\1\103\34\0"+ + "\1\104\3\0\1\105\17\0\12\15\1\0\11\15\1\106"+ + "\1\107\55\15\12\110\1\0\12\110\1\111\1\112\54\110"+ + "\1\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ + "\1\0\1\4\1\0\1\4\3\0\1\4\1\113\1\4"+ + "\1\114\7\4\1\115\14\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\4\4\1\116\23\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\7\4\1\117\13\4\1\120\4\4\25\0\2\4"+ "\1\0\2\4\1\0\1\4\3\0\5\4\1\0\1\4"+ - "\1\0\1\4\3\0\13\4\1\203\1\4\1\204\12\4"+ - "\24\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\5\4\1\205\22\4"+ - "\24\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\11\4\1\206\2\4"+ - "\1\207\13\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\20\4"+ - "\1\210\7\4\24\0\2\4\1\0\2\4\1\0\1\4"+ + "\1\0\1\4\3\0\12\4\1\121\10\4\1\122\4\4"+ + "\25\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ + "\1\0\1\4\1\0\1\4\3\0\14\4\1\123\1\124"+ + "\4\4\1\125\5\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\1\126\3\4\1\127\11\4\1\130\11\4\25\0\2\4"+ + "\1\0\2\4\1\0\1\4\3\0\5\4\1\0\1\4"+ + "\1\0\1\4\3\0\17\4\1\131\10\4\25\0\2\4"+ + "\1\0\2\4\1\0\1\4\3\0\5\4\1\0\1\4"+ + "\1\0\1\4\3\0\3\4\1\132\24\4\25\0\2\4"+ + "\1\0\2\4\1\0\1\4\3\0\5\4\1\0\1\4"+ + "\1\0\1\4\3\0\1\4\1\133\10\4\1\134\1\135"+ + "\14\4\25\0\2\4\1\0\2\4\1\0\1\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\14\4\1\136"+ + "\13\4\25\0\2\4\1\0\2\4\1\0\1\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\22\4\1\137"+ + "\5\4\25\0\2\4\1\0\2\4\1\0\1\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\22\4\1\140"+ + "\5\4\25\0\2\4\1\0\2\4\1\0\1\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\1\4\1\141"+ + "\26\4\25\0\2\4\1\0\2\4\1\0\1\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\12\4\1\142"+ + "\15\4\103\0\1\143\3\0\1\144\57\0\1\145\16\0"+ + "\1\146\102\0\1\147\1\0\1\150\100\0\1\151\102\0"+ + "\1\152\107\0\1\153\103\0\1\154\35\0\1\155\46\0"+ + "\1\156\72\0\1\157\24\0\1\77\11\0\1\77\3\0"+ + "\1\62\1\160\1\64\10\0\1\64\12\0\1\62\10\0"+ + "\1\62\25\0\1\161\11\0\1\161\3\0\1\62\2\0"+ + "\1\161\22\0\1\62\10\0\1\62\2\0\1\161\22\0"+ + "\2\65\1\0\2\65\1\162\1\65\3\0\5\65\1\0"+ + "\1\65\1\0\1\65\3\0\30\65\25\0\2\66\1\0"+ + "\2\66\1\0\1\66\3\0\5\66\1\0\1\66\1\0"+ + "\1\66\3\0\30\66\26\0\1\163\1\0\1\163\2\0"+ + "\1\163\4\0\4\163\1\0\1\163\1\0\1\163\3\0"+ + "\30\163\24\0\12\70\1\0\70\70\11\164\1\165\71\164"+ + "\1\0\1\74\11\0\1\74\3\0\1\62\1\77\1\64"+ + "\10\0\1\64\12\0\1\62\10\0\1\62\24\0\1\166"+ + "\2\75\7\166\1\0\1\75\1\166\1\75\1\167\1\75"+ + "\1\170\1\75\1\166\1\171\4\166\1\75\1\166\1\75"+ + "\1\166\1\171\1\75\7\166\2\75\3\166\1\167\3\166"+ + "\1\75\24\166\1\0\1\76\11\0\1\76\2\0\1\61"+ + "\1\0\1\172\31\0\1\61\31\0\1\77\11\0\1\77"+ + "\3\0\1\62\1\0\1\64\10\0\1\64\12\0\1\62"+ + "\10\0\1\62\24\0\12\15\1\0\70\15\12\110\1\0"+ + "\12\110\1\111\1\173\66\110\1\0\70\110\26\0\1\174"+ + "\55\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ + "\1\0\1\4\1\0\1\4\3\0\2\4\1\175\25\4"+ + "\25\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ + "\1\0\1\4\1\0\1\4\3\0\21\4\1\176\6\4"+ + "\25\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ + "\1\0\1\4\1\0\1\4\3\0\23\4\1\177\4\4"+ + "\25\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ + "\1\0\1\4\1\0\1\4\3\0\10\4\1\200\17\4"+ + "\25\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ + "\1\0\1\4\1\0\1\4\3\0\4\4\1\201\23\4"+ + "\25\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ + "\1\0\1\4\1\0\1\4\3\0\1\202\27\4\25\0"+ + "\2\4\1\0\2\4\1\0\1\4\3\0\5\4\1\0"+ + "\1\4\1\0\1\4\3\0\1\4\1\203\26\4\25\0"+ + "\2\4\1\0\2\4\1\0\1\4\3\0\5\4\1\0"+ + "\1\4\1\0\1\4\3\0\13\4\1\204\1\4\1\205"+ + "\12\4\25\0\2\4\1\0\2\4\1\0\1\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\5\4\1\206"+ + "\22\4\25\0\2\4\1\0\2\4\1\0\1\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\11\4\1\207"+ + "\2\4\1\210\13\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\20\4\1\211\7\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\10\4\1\212\17\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\23\4\1\213\4\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\14\4\1\214\13\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\1\215\27\4\25\0\2\4\1\0\2\4\1\0\1\4"+ + "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\3\4"+ + "\1\216\24\4\25\0\2\4\1\0\2\4\1\0\1\4"+ + "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\3\4"+ + "\1\217\5\4\1\220\16\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\11\4\1\221\16\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\14\4\1\222\6\4\1\223\4\4\103\0\1\224"+ + "\52\0\1\225\3\0\1\226\126\0\1\227\24\0\1\161"+ + "\11\0\1\161\3\0\1\62\25\0\1\62\10\0\1\62"+ + "\25\0\2\163\1\0\2\163\1\230\1\163\3\0\5\163"+ + "\1\0\1\163\1\0\1\163\3\0\30\163\24\0\11\164"+ + "\1\231\71\164\10\232\1\233\1\165\71\232\1\0\2\166"+ + "\10\0\1\166\1\0\1\166\1\0\1\166\1\0\1\166"+ + "\1\0\1\234\4\0\1\166\1\0\1\166\1\0\1\234"+ + "\1\166\7\0\2\166\7\0\1\166\25\0\2\166\10\0"+ + "\1\166\1\0\1\166\1\0\1\166\1\160\1\166\1\0"+ + "\1\234\4\0\1\166\1\0\1\166\1\0\1\234\1\166"+ + "\7\0\2\166\7\0\1\166\25\0\1\235\1\166\10\0"+ + "\1\235\1\0\1\166\1\0\1\166\1\0\1\166\1\236"+ + "\1\234\4\0\1\166\1\0\1\166\1\0\1\234\1\166"+ + "\7\0\2\166\7\0\1\166\2\0\1\236\41\0\1\160"+ + "\62\0\26\174\1\237\54\174\1\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\3\4\1\240\24\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\23\4\1\241\4\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\3\4\1\242\24\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\3\4\1\243\24\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\10\4\1\244\17\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\4\4\1\245\23\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\3\4\1\246\24\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\3\4\1\247\24\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\4\4\1\250\23\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\12\4\1\251\15\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\3\4\1\252\24\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\13\4\1\253\14\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\4\4\1\254\23\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\1\4\1\255\26\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\1\256\27\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\23\4\1\257\4\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\4\4\1\260\23\4\24\0\10\164\1\261\1\231\71\164"+ + "\11\232\1\262\71\232\1\0\1\161\11\0\1\161\6\0"+ + "\1\236\36\0\1\236\22\0\1\235\1\166\10\0\1\235"+ + "\1\0\1\166\1\0\1\263\1\0\1\166\1\0\1\234"+ + "\4\0\1\166\1\0\1\166\1\0\1\234\1\166\7\0"+ + "\1\263\1\166\7\0\1\263\25\0\1\161\11\0\1\161"+ + "\67\0\26\174\1\264\54\174\1\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\4\4\1\265\23\4\25\0\2\4\1\0\2\4"+ + "\1\0\1\4\3\0\5\4\1\0\1\4\1\0\1\4"+ + "\3\0\1\266\27\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\11\4\1\267\16\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\4\4\1\270\23\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\12\4\1\271\15\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\21\4\1\272\6\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\6\4\1\273\21\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\14\4\1\274\13\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\3\4\1\275\24\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\24\4\1\276\3\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\3\4\1\277\24\4\24\0\10\232\1\233\1\262\71\232"+ + "\26\174\1\300\54\174\1\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\5\4\1\301\22\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\4\4\1\302\23\4\25\0\2\4\1\0\2\4\1\0"+ + "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ + "\1\303\27\4\25\0\2\4\1\0\2\4\1\0\1\4"+ + "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\16\4"+ + "\1\304\11\4\25\0\2\4\1\0\2\4\1\0\1\4"+ "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\10\4"+ - "\1\211\17\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\23\4"+ - "\1\212\4\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\14\4"+ - "\1\213\13\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\1\214"+ - "\27\4\24\0\2\4\1\0\2\4\1\0\1\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\3\4\1\215"+ - "\24\4\24\0\2\4\1\0\2\4\1\0\1\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\3\4\1\216"+ - "\5\4\1\217\16\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\11\4\1\220\16\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\14\4\1\221\6\4\1\222\4\4\102\0\1\223\51\0"+ - "\1\224\3\0\1\225\125\0\1\226\23\0\1\160\11\0"+ - "\1\160\3\0\1\61\25\0\1\61\10\0\1\61\24\0"+ - "\2\162\1\0\2\162\1\227\1\162\3\0\5\162\1\0"+ - "\1\162\1\0\1\162\3\0\30\162\23\0\11\163\1\230"+ - "\70\163\10\231\1\232\1\164\70\231\1\0\2\165\10\0"+ - "\1\165\1\0\1\165\1\0\1\165\1\0\1\165\1\0"+ - "\1\233\4\0\1\165\1\0\1\165\1\0\1\233\1\165"+ - "\7\0\2\165\7\0\1\165\24\0\2\165\10\0\1\165"+ - "\1\0\1\165\1\0\1\165\1\157\1\165\1\0\1\233"+ - "\4\0\1\165\1\0\1\165\1\0\1\233\1\165\7\0"+ - "\2\165\7\0\1\165\24\0\1\234\1\165\10\0\1\234"+ - "\1\0\1\165\1\0\1\165\1\0\1\165\1\235\1\233"+ - "\4\0\1\165\1\0\1\165\1\0\1\233\1\165\7\0"+ - "\2\165\7\0\1\165\2\0\1\235\40\0\1\157\61\0"+ - "\26\173\1\236\53\173\1\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\3\4\1\237\24\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\23\4\1\240\4\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\3\4\1\241\24\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\3\4\1\242\24\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\10\4\1\243\17\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\4\4\1\244\23\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\3\4\1\245\24\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\3\4\1\246\24\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\4\4\1\247\23\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\12\4\1\250\15\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\3\4\1\251\24\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\13\4\1\252\14\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\4\4\1\253\23\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\1\4\1\254\26\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\1\255\27\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\23\4"+ - "\1\256\4\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\4\4"+ - "\1\257\23\4\23\0\10\163\1\260\1\230\70\163\11\231"+ - "\1\261\70\231\1\0\1\160\11\0\1\160\6\0\1\235"+ - "\36\0\1\235\21\0\1\234\1\165\10\0\1\234\1\0"+ - "\1\165\1\0\1\262\1\0\1\165\1\0\1\233\4\0"+ - "\1\165\1\0\1\165\1\0\1\233\1\165\7\0\1\262"+ - "\1\165\7\0\1\262\24\0\1\160\11\0\1\160\66\0"+ - "\26\173\1\263\53\173\1\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\4\4\1\264\23\4\24\0\2\4\1\0\2\4\1\0"+ - "\1\4\3\0\5\4\1\0\1\4\1\0\1\4\3\0"+ - "\1\265\27\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\11\4"+ - "\1\266\16\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\4\4"+ - "\1\267\23\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\12\4"+ - "\1\270\15\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\21\4"+ - "\1\271\6\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\6\4"+ - "\1\272\21\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\14\4"+ - "\1\273\13\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\3\4"+ - "\1\274\24\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\24\4"+ - "\1\275\3\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\3\4"+ - "\1\276\24\4\23\0\10\231\1\232\1\261\70\231\26\173"+ - "\1\277\53\173\1\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\5\4"+ - "\1\300\22\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\4\4"+ - "\1\301\23\4\24\0\2\4\1\0\2\4\1\0\1\4"+ - "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\1\302"+ - "\27\4\24\0\2\4\1\0\2\4\1\0\1\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\16\4\1\303"+ - "\11\4\24\0\2\4\1\0\2\4\1\0\1\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\10\4\1\304"+ - "\17\4\24\0\2\4\1\0\2\4\1\0\1\4\3\0"+ - "\5\4\1\0\1\4\1\0\1\4\3\0\1\305\27\4"+ - "\24\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\1\4\1\306\26\4"+ - "\24\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\11\4\1\307\16\4"+ - "\24\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\13\4\1\310\14\4"+ - "\24\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\6\4\1\311\21\4"+ - "\24\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\12\4\1\312\15\4"+ - "\24\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\3\4\1\313\24\4"+ - "\24\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\3\4\1\314\24\4"+ - "\24\0\2\4\1\0\2\4\1\0\1\4\3\0\5\4"+ - "\1\0\1\4\1\0\1\4\3\0\1\315\27\4\23\0"; + "\1\305\17\4\25\0\2\4\1\0\2\4\1\0\1\4"+ + "\3\0\5\4\1\0\1\4\1\0\1\4\3\0\1\306"+ + "\27\4\25\0\2\4\1\0\2\4\1\0\1\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\1\4\1\307"+ + "\26\4\25\0\2\4\1\0\2\4\1\0\1\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\11\4\1\310"+ + "\16\4\25\0\2\4\1\0\2\4\1\0\1\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\13\4\1\311"+ + "\14\4\25\0\2\4\1\0\2\4\1\0\1\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\6\4\1\312"+ + "\21\4\25\0\2\4\1\0\2\4\1\0\1\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\12\4\1\313"+ + "\15\4\25\0\2\4\1\0\2\4\1\0\1\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\3\4\1\314"+ + "\24\4\25\0\2\4\1\0\2\4\1\0\1\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\3\4\1\315"+ + "\24\4\25\0\2\4\1\0\2\4\1\0\1\4\3\0"+ + "\5\4\1\0\1\4\1\0\1\4\3\0\1\316\27\4"+ + "\24\0"; private static int [] zzUnpackTrans() { - int [] result = new int[8778]; + int [] result = new int[8911]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; @@ -498,7 +497,7 @@ class _JetLexer implements FlexLexer { private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\1\0\1\11\42\1\1\11\1\1\13\11\2\1\1\0"+ + "\1\0\1\11\42\1\1\11\1\1\14\11\2\1\1\0"+ "\1\1\1\0\2\1\2\11\1\0\3\1\7\11\35\1"+ "\1\11\1\0\1\1\12\11\1\1\1\11\1\0\2\1"+ "\1\0\1\1\3\0\1\11\30\1\5\11\1\0\1\1"+ @@ -506,7 +505,7 @@ class _JetLexer implements FlexLexer { "\1\0\13\1\1\11\16\1"; private static int [] zzUnpackAttribute() { - int [] result = new int[205]; + int [] result = new int[206]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -814,355 +813,359 @@ class _JetLexer implements FlexLexer { case 3: { return JetTokens.IDENTIFIER; } - case 89: break; - case 63: + case 90: break; + case 64: { return JetTokens.FOR_KEYWORD ; } - case 90: break; - case 85: + case 91: break; + case 86: { return JetTokens.RETURN_KEYWORD ; } - case 91: break; - case 71: + case 92: break; + case 72: { return JetTokens.NULL_KEYWORD ; } - case 92: break; + case 93: break; case 14: { return JetTokens.LT ; } - case 93: break; - case 45: + case 94: break; + case 46: { return JetTokens.DO_KEYWORD ; } - case 94: break; + case 95: break; case 13: { return JetTokens.PLUS ; } - case 95: break; - case 28: + case 96: break; + case 29: { return JetTokens.LONG_LITERAL; } - case 96: break; - case 60: + case 97: break; + case 61: { return JetTokens.RAW_STRING_LITERAL; } - case 97: break; - case 49: + case 98: break; + case 50: { return JetTokens.PLUSEQ ; } - case 98: break; + case 99: break; case 26: { return JetTokens.COMMA ; } - case 99: break; + case 100: break; case 15: { return JetTokens.GT ; } - case 100: break; + case 101: break; case 4: { return JetTokens.WHITE_SPACE; } - case 101: break; - case 83: + case 102: break; + case 84: { return JetTokens.TYPEOF_KEYWORD ; } - case 102: break; + case 103: break; case 24: { return JetTokens.RPAR ; } - case 103: break; - case 47: + case 104: break; + case 48: { return JetTokens.DOUBLE_ARROW; } - case 104: break; - case 73: + case 105: break; + case 74: { return JetTokens.TRUE_KEYWORD ; } - case 105: break; - case 30: + case 106: break; + case 31: { return JetTokens.FIELD_IDENTIFIER; } - case 106: break; - case 53: + case 107: break; + case 54: { return JetTokens.ANDAND ; } - case 107: break; - case 59: + case 108: break; + case 60: { return JetTokens.DOC_COMMENT; } - case 108: break; - case 29: + case 109: break; + case 30: { return JetTokens.FLOAT_LITERAL; } - case 109: break; - case 31: + case 110: break; + case 32: { return JetTokens.EOL_COMMENT; } - case 110: break; - case 76: + case 111: break; + case 77: { return JetTokens.WHEN_KEYWORD ; } - case 111: break; + case 112: break; case 17: { return JetTokens.COLON ; } - case 112: break; - case 51: + case 113: break; + case 52: { return JetTokens.LTEQ ; } - case 113: break; - case 40: + case 114: break; + case 41: { return JetTokens.ARROW ; } - case 114: break; + case 115: break; case 19: { return JetTokens.LBRACKET ; } - case 115: break; - case 58: + case 116: break; + case 59: { yypushback(2); return JetTokens.INTEGER_LITERAL; } - case 116: break; + case 117: break; case 9: { return JetTokens.CHARACTER_LITERAL; } - case 117: break; - case 65: + case 118: break; + case 66: { return JetTokens.VAR_KEYWORD ; } - case 118: break; - case 52: + case 119: break; + case 53: { return JetTokens.GTEQ ; } - case 119: break; + case 120: break; case 2: { return JetTokens.INTEGER_LITERAL; } - case 120: break; + case 121: break; case 22: { return JetTokens.RBRACE ; } - case 121: break; - case 78: + case 122: break; + case 79: { return JetTokens.CLASS_KEYWORD ; } - case 122: break; + case 123: break; case 12: { return JetTokens.EXCL ; } - case 123: break; - case 62: + case 124: break; + case 63: { return JetTokens.TRY_KEYWORD ; } - case 124: break; - case 48: + case 125: break; + case 49: { return JetTokens.EXCLEQ ; } - case 125: break; - case 39: + case 126: break; + case 40: { return JetTokens.MINUSEQ ; } - case 126: break; - case 79: + case 127: break; + case 80: { return JetTokens.THROW_KEYWORD ; } - case 127: break; - case 82: + case 128: break; + case 83: { return JetTokens.WHILE_KEYWORD ; } - case 128: break; - case 38: + case 129: break; + case 39: { return JetTokens.MINUSMINUS; } - case 129: break; - case 86: + case 130: break; + case 87: { return JetTokens.CONTINUE_KEYWORD ; } - case 130: break; - case 68: + case 131: break; + case 69: { return JetTokens.NOT_IN; } - case 131: break; + case 132: break; case 5: { return JetTokens.DIV ; } - case 132: break; - case 56: + case 133: break; + case 57: { return JetTokens.ELVIS ; } - case 133: break; + case 134: break; case 16: { return JetTokens.QUEST ; } - case 134: break; - case 54: + case 135: break; + case 55: { return JetTokens.OROR ; } - case 135: break; + case 136: break; case 18: { return JetTokens.PERC ; } - case 136: break; - case 70: + case 137: break; + case 71: { return JetTokens.EXCLEQEQEQ; } - case 137: break; - case 57: + case 138: break; + case 58: { return JetTokens.PERCEQ ; } - case 138: break; - case 36: + case 139: break; + case 37: { return JetTokens.RANGE ; } - case 139: break; + case 140: break; case 1: { return TokenType.BAD_CHARACTER; } - case 140: break; - case 55: + case 141: break; + case 56: { return JetTokens.SAFE_ACCESS; } - case 141: break; - case 87: + case 142: break; + case 88: { return JetTokens.NAMESPACE_KEYWORD ; } - case 142: break; - case 69: + case 143: break; + case 70: { return JetTokens.NOT_IS; } - case 143: break; + case 144: break; case 6: { return JetTokens.MUL ; } - case 144: break; + case 145: break; case 20: { return JetTokens.RBRACKET ; } - case 145: break; - case 50: + case 146: break; + case 51: { return JetTokens.PLUSPLUS ; } - case 146: break; - case 75: + case 147: break; + case 76: { return JetTokens.THIS_KEYWORD ; } - case 147: break; + case 148: break; case 7: { return JetTokens.DOT ; } - case 148: break; + case 149: break; case 25: { return JetTokens.SEMICOLON ; } - case 149: break; - case 44: + case 150: break; + case 45: { return JetTokens.IF_KEYWORD ; } - case 150: break; + case 151: break; case 11: { return JetTokens.EQ ; } - case 151: break; + case 152: break; + case 28: + { return JetTokens.AT ; + } + case 153: break; case 23: { return JetTokens.LPAR ; } - case 152: break; + case 154: break; case 8: { return JetTokens.MINUS ; } - case 153: break; - case 80: + case 155: break; + case 81: { return JetTokens.FALSE_KEYWORD ; } - case 154: break; - case 74: + case 156: break; + case 75: { return JetTokens.TYPE_KEYWORD ; } - case 155: break; - case 64: + case 157: break; + case 65: { return JetTokens.FUN_KEYWORD ; } - case 156: break; - case 43: + case 158: break; + case 44: { return JetTokens.IS_KEYWORD ; } - case 157: break; - case 33: + case 159: break; + case 34: { return JetTokens.DIVEQ ; } - case 158: break; - case 88: + case 160: break; + case 89: { return JetTokens.EXTENSION_KEYWORD ; } - case 159: break; - case 72: + case 161: break; + case 73: { return JetTokens.ELSE_KEYWORD ; } - case 160: break; - case 41: + case 162: break; + case 42: { return JetTokens.AS_KEYWORD ; } - case 161: break; - case 42: + case 163: break; + case 43: { return JetTokens.IN_KEYWORD ; } - case 162: break; - case 46: + case 164: break; + case 47: { return JetTokens.EQEQ ; } - case 163: break; - case 66: + case 165: break; + case 67: { return JetTokens.VAL_KEYWORD ; } - case 164: break; - case 67: + case 166: break; + case 68: { return JetTokens.EQEQEQ ; } - case 165: break; - case 77: + case 167: break; + case 78: { return JetTokens.CAPITALIZED_THIS_KEYWORD ; } - case 166: break; - case 61: + case 168: break; + case 62: { return JetTokens.NEW_KEYWORD ; } - case 167: break; - case 34: + case 169: break; + case 35: { return JetTokens.MULTEQ ; } - case 168: break; + case 170: break; case 10: { return JetTokens.STRING_LITERAL; } - case 169: break; + case 171: break; case 21: { return JetTokens.LBRACE ; } - case 170: break; - case 84: + case 172: break; + case 85: { return JetTokens.OBJECT_KEYWORD ; } - case 171: break; - case 81: + case 173: break; + case 82: { return JetTokens.BREAK_KEYWORD ; } - case 172: break; - case 32: + case 174: break; + case 33: { return JetTokens.BLOCK_COMMENT; } - case 173: break; - case 37: + case 175: break; + case 38: { return JetTokens.FILTER ; } - case 174: break; + case 176: break; case 27: { return JetTokens.HASH ; } - case 175: break; - case 35: + case 177: break; + case 36: { return JetTokens.MAP ; } - case 176: break; + case 178: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; diff --git a/idea/testData/psi/AttributesOnPatterns.jet b/idea/testData/psi/AttributesOnPatterns.jet index 2b5b9096471..56cc9f90eec 100644 --- a/idea/testData/psi/AttributesOnPatterns.jet +++ b/idea/testData/psi/AttributesOnPatterns.jet @@ -4,6 +4,6 @@ fun foo() { is [a] =2 => d is [a] 2 => d is [a] T => d - is [a] T() => d + is [a] T @ () => d } } diff --git a/idea/testData/psi/AttributesOnPatterns.txt b/idea/testData/psi/AttributesOnPatterns.txt index 326d1f7c67e..ca8d784b9ba 100644 --- a/idea/testData/psi/AttributesOnPatterns.txt +++ b/idea/testData/psi/AttributesOnPatterns.txt @@ -82,8 +82,10 @@ JetFile: AttributesOnPatterns.jet PsiElement(IDENTIFIER)('a') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('T') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('T') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') @@ -106,6 +108,9 @@ JetFile: AttributesOnPatterns.jet PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('T') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') diff --git a/idea/testData/psi/NewlinesInParentheses.jet b/idea/testData/psi/NewlinesInParentheses.jet index 92297c070ce..8feebf2ea52 100644 --- a/idea/testData/psi/NewlinesInParentheses.jet +++ b/idea/testData/psi/NewlinesInParentheses.jet @@ -21,12 +21,12 @@ fun foo() { + d] when (e) { - is T + is T @ () => a in f () => a !is T - () => a + @ () => a !in f () => a f diff --git a/idea/testData/psi/NewlinesInParentheses.txt b/idea/testData/psi/NewlinesInParentheses.txt index 5bdc7543ea5..fe8cf6fa614 100644 --- a/idea/testData/psi/NewlinesInParentheses.txt +++ b/idea/testData/psi/NewlinesInParentheses.txt @@ -229,6 +229,8 @@ JetFile: NewlinesInParentheses.jet DECOMPOSER_PATTERN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('T') + PsiWhiteSpace(' ') + PsiElement(AT)('@') PsiWhiteSpace('\n ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') @@ -264,6 +266,8 @@ JetFile: NewlinesInParentheses.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('T') PsiWhiteSpace('\n ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') @@ -321,8 +325,10 @@ JetFile: NewlinesInParentheses.jet PsiElement(is)('is') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('T') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('T') PsiWhiteSpace('\n ') TUPLE PsiElement(LPAR)('(') diff --git a/idea/testData/psi/RootNamespace.jet b/idea/testData/psi/RootNamespace.jet index d70eb52b293..f4d8d3bd881 100644 --- a/idea/testData/psi/RootNamespace.jet +++ b/idea/testData/psi/RootNamespace.jet @@ -7,7 +7,7 @@ namespace foo.bar { namespace.foo.bar.X new namespace.foo.bar.X() when (e) { - is namespace.foo.bar.X(x) => {} + is namespace.foo.bar.X @ (x) => {} } } } \ No newline at end of file diff --git a/idea/testData/psi/RootNamespace.txt b/idea/testData/psi/RootNamespace.txt index 126a228aac2..634fb5163a8 100644 --- a/idea/testData/psi/RootNamespace.txt +++ b/idea/testData/psi/RootNamespace.txt @@ -88,22 +88,31 @@ JetFile: RootNamespace.jet PsiElement(is)('is') PsiWhiteSpace(' ') DECOMPOSER_PATTERN - REFERENCE_EXPRESSION - REFERENCE_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(namespace)('namespace') + DOT_QIALIFIED_EXPRESSION + DOT_QIALIFIED_EXPRESSION + DOT_QIALIFIED_EXPRESSION + ROOT_NAMESPACE + PsiElement(namespace)('namespace') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('foo') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('bar') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('X') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('X') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('x') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('x') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') diff --git a/idea/testData/psi/TypeExpressionAmbiguities_ERR.txt b/idea/testData/psi/TypeExpressionAmbiguities_ERR.txt index c65cc0f0ece..d8d217be244 100644 --- a/idea/testData/psi/TypeExpressionAmbiguities_ERR.txt +++ b/idea/testData/psi/TypeExpressionAmbiguities_ERR.txt @@ -212,18 +212,20 @@ JetFile: TypeExpressionAmbiguities_ERR.jet PsiElement(is)('is') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Foo') - PsiWhiteSpace(' ') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - PsiWhiteSpace(' ') - TYPE_PROJECTION - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - PsiErrorElement:Expecting a '>' - + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Foo') + PsiWhiteSpace(' ') + TYPE_ARGUMENT_LIST + PsiElement(LT)('<') + PsiWhiteSpace(' ') + TYPE_PROJECTION + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') + PsiErrorElement:Expecting a '>' + PsiWhiteSpace('\n') PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/idea/testData/psi/When.jet b/idea/testData/psi/When.jet index 41b211626bf..264b41627e7 100644 --- a/idea/testData/psi/When.jet +++ b/idea/testData/psi/When.jet @@ -16,8 +16,8 @@ fun foo() { is a => foo } when (e) { - is Tree(a, b) => foo - is Tree(a, b) if (a > 5) => foo + is Tree @ (a, b) => foo + is Tree @ (a, b) if (a > 5) => foo is null => foo is 1 => foo is A.b => foo @@ -43,14 +43,14 @@ fun foo() { fun foo() { when (val a = e) { is Tree => c - is Tree(null, ?r) => c - is a(a, b) => c - is a(a, b) => c - is a.a(a, b) => c - is a.a(foo = a, bar = b) => c - is namespace.a.a(a, b) => c - is a(?a is T, b) => c - is a(b, 1) => c + is Tree @ (null, ?r) => c + is a @ (a, b) => c + is a @ (a, b) => c + is a.a @ (a, b) => c + is a.a @ (foo = a, bar = b) => c + is namespace.a.a @ (a, b) => c + is a @ (?a is T, b) => c + is a @ (b, 1) => c in 1..2 => dsf !in 2 => sd !is t => d @@ -66,11 +66,11 @@ fun foo() { fun foo() { when (val a = e) { is Tree, - is Tree(null, ?r), - is a(a, b) => c + is Tree @ (null, ?r), + is a @ (a, b) => c 1, foo(), bar, 2 + 3, - is a(a, b) => c - is a.a(=a + 3, b) => c + is a @ (a, b) => c + is a.a @ (=a + 3, b) => c } } diff --git a/idea/testData/psi/When.txt b/idea/testData/psi/When.txt index e75b2d4e637..b52bd165774 100644 --- a/idea/testData/psi/When.txt +++ b/idea/testData/psi/When.txt @@ -48,8 +48,10 @@ JetFile: When.jet PsiElement(is)('is') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') @@ -117,8 +119,10 @@ JetFile: When.jet PsiElement(is)('is') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') @@ -144,18 +148,25 @@ JetFile: When.jet DECOMPOSER_PATTERN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('Tree') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') @@ -170,18 +181,25 @@ JetFile: When.jet DECOMPOSER_PATTERN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('Tree') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(if)('if') @@ -233,11 +251,13 @@ JetFile: When.jet PsiElement(is)('is') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('A') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('b') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('A') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') @@ -313,8 +333,8 @@ JetFile: When.jet WHEN_CONDITION PsiElement(is)('is') PsiWhiteSpace(' ') - BINDING_PATTERN - PsiElement(QUEST)('?') + WILDCARD_PATTERN + PsiElement(MUL)('*') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') @@ -326,32 +346,17 @@ JetFile: When.jet PsiElement(is)('is') PsiWhiteSpace(' ') BINDING_PATTERN - PsiElement(QUEST)('?') + PsiElement(val)('val') PsiWhiteSpace(' ') - PsiElement(is)('is') - PsiWhiteSpace(' ') - TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Foo') - PsiWhiteSpace(' ') - PsiElement(DOUBLE_ARROW)('=>') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiWhiteSpace('\n ') - WHEN_ENTRY - WHEN_CONDITION - PsiElement(is)('is') - PsiWhiteSpace(' ') - BINDING_PATTERN - PsiElement(QUEST)('?') PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') PsiElement(is)('is') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Foo') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Foo') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') @@ -366,20 +371,25 @@ JetFile: When.jet PsiElement(LPAR)('(') TUPLE_PATTERN_ENTRY BINDING_PATTERN - PsiElement(QUEST)('?') + PsiElement(val)('val') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') PsiElement(is)('is') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Foo') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Foo') PsiElement(COMMA)(',') PsiWhiteSpace(' ') TUPLE_PATTERN_ENTRY TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') @@ -454,8 +464,10 @@ JetFile: When.jet PsiElement(is)('is') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Tree') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Tree') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') @@ -469,6 +481,9 @@ JetFile: When.jet DECOMPOSER_PATTERN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('Tree') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT @@ -479,7 +494,8 @@ JetFile: When.jet PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT BINDING_PATTERN - PsiElement(QUEST)('?') + PsiElement(val)('val') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('r') PsiElement(RPAR)(')') PsiWhiteSpace(' ') @@ -495,18 +511,25 @@ JetFile: When.jet DECOMPOSER_PATTERN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') @@ -521,18 +544,25 @@ JetFile: When.jet DECOMPOSER_PATTERN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') @@ -545,23 +575,31 @@ JetFile: When.jet PsiElement(is)('is') PsiWhiteSpace(' ') DECOMPOSER_PATTERN - REFERENCE_EXPRESSION + DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('a') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') @@ -574,11 +612,15 @@ JetFile: When.jet PsiElement(is)('is') PsiWhiteSpace(' ') DECOMPOSER_PATTERN - REFERENCE_EXPRESSION + DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('a') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT @@ -587,8 +629,10 @@ JetFile: When.jet PsiElement(EQ)('=') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT @@ -597,8 +641,10 @@ JetFile: When.jet PsiElement(EQ)('=') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') @@ -611,25 +657,35 @@ JetFile: When.jet PsiElement(is)('is') PsiWhiteSpace(' ') DECOMPOSER_PATTERN - REFERENCE_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(namespace)('namespace') + DOT_QIALIFIED_EXPRESSION + DOT_QIALIFIED_EXPRESSION + ROOT_NAMESPACE + PsiElement(namespace)('namespace') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('a') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('a') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') @@ -644,24 +700,32 @@ JetFile: When.jet DECOMPOSER_PATTERN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT BINDING_PATTERN - PsiElement(QUEST)('?') + PsiElement(val)('val') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') PsiElement(is)('is') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('T') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('T') PsiElement(COMMA)(',') PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') @@ -676,12 +740,17 @@ JetFile: When.jet DECOMPOSER_PATTERN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') PsiElement(COMMA)(',') PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT @@ -728,8 +797,10 @@ JetFile: When.jet PsiElement(NOT_IS)('!is') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('t') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('t') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') @@ -780,36 +851,38 @@ JetFile: When.jet PsiWhiteSpace(' ') TUPLE_PATTERN_ENTRY BINDING_PATTERN - PsiElement(QUEST)('?') + PsiElement(val)('val') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') PsiElement(is)('is') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Foo') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Foo') PsiElement(COMMA)(',') PsiWhiteSpace(' ') TUPLE_PATTERN_ENTRY - BINDING_PATTERN - PsiElement(QUEST)('?') - PsiElement(COMMA)(',') - PsiWhiteSpace(' ') - TUPLE_PATTERN_ENTRY - BINDING_PATTERN - PsiElement(QUEST)('?') - PsiWhiteSpace(' ') - PsiElement(is)('is') - PsiWhiteSpace(' ') - TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Foo') + WILDCARD_PATTERN + PsiElement(MUL)('*') PsiElement(COMMA)(',') PsiWhiteSpace(' ') TUPLE_PATTERN_ENTRY TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Foo') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + TUPLE_PATTERN_ENTRY + TYPE_PATTERN + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') @@ -825,13 +898,16 @@ JetFile: When.jet PsiElement(LPAR)('(') TUPLE_PATTERN_ENTRY TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Foo') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Foo') PsiElement(COMMA)(',') PsiWhiteSpace(' ') TUPLE_PATTERN_ENTRY BINDING_PATTERN - PsiElement(QUEST)('?') + PsiElement(val)('val') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') PsiElement(in)('in') @@ -845,48 +921,60 @@ JetFile: When.jet PsiElement(COMMA)(',') PsiWhiteSpace(' ') TUPLE_PATTERN_ENTRY - BINDING_PATTERN - PsiElement(QUEST)('?') + WILDCARD_PATTERN + PsiElement(MUL)('*') PsiElement(COMMA)(',') PsiWhiteSpace(' ') TUPLE_PATTERN_ENTRY BINDING_PATTERN - PsiElement(QUEST)('?') + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('_') PsiWhiteSpace(' ') PsiElement(NOT_IS)('!is') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Foo') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Foo') PsiElement(COMMA)(',') PsiWhiteSpace(' ') TUPLE_PATTERN_ENTRY BINDING_PATTERN - PsiElement(QUEST)('?') + PsiElement(val)('val') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('bar') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + PsiElement(is)('is') PsiWhiteSpace(' ') - CALL_EXPRESSION - DOT_QIALIFIED_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - TYPE_PROJECTION - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiElement(GT)('>') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT + DECOMPOSER_PATTERN + CALL_EXPRESSION + DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') + PsiElement(IDENTIFIER)('foo') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') + TYPE_ARGUMENT_LIST + PsiElement(LT)('<') + TYPE_PROJECTION + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiElement(GT)('>') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') + DECOMPOSER_ARGUMENT_LIST + PsiElement(LPAR)('(') + DECOMPOSER_ARGUMENT + TYPE_PATTERN + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') PsiElement(RPAR)(')') PsiElement(RPAR)(')') PsiWhiteSpace(' ') @@ -903,14 +991,18 @@ JetFile: When.jet PsiElement(LPAR)('(') TUPLE_PATTERN_ENTRY TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Int') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Int') PsiElement(COMMA)(',') PsiWhiteSpace(' ') TUPLE_PATTERN_ENTRY TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Int') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Int') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') @@ -918,6 +1010,27 @@ JetFile: When.jet INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('2') PsiWhiteSpace('\n ') + WHEN_ENTRY + WHEN_CONDITION + PsiElement(is)('is') + PsiWhiteSpace(' ') + BINDING_PATTERN + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Foo') + PsiWhiteSpace(' ') + PsiElement(DOUBLE_ARROW)('=>') + PsiWhiteSpace(' ') + INTEGER_CONSTANT + PsiElement(INTEGER_LITERAL)('2') + PsiWhiteSpace('\n ') WHEN_ENTRY PsiElement(else)('else') PsiWhiteSpace(' ') @@ -969,8 +1082,10 @@ JetFile: When.jet PsiElement(is)('is') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Tree') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Tree') PsiElement(COMMA)(',') PsiWhiteSpace('\n ') WHEN_CONDITION @@ -979,6 +1094,9 @@ JetFile: When.jet DECOMPOSER_PATTERN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('Tree') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT @@ -989,7 +1107,8 @@ JetFile: When.jet PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT BINDING_PATTERN - PsiElement(QUEST)('?') + PsiElement(val)('val') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('r') PsiElement(RPAR)(')') PsiElement(COMMA)(',') @@ -1000,18 +1119,25 @@ JetFile: When.jet DECOMPOSER_PATTERN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') @@ -1056,18 +1182,25 @@ JetFile: When.jet DECOMPOSER_PATTERN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') @@ -1080,32 +1213,51 @@ JetFile: When.jet PsiElement(is)('is') PsiWhiteSpace(' ') DECOMPOSER_PATTERN - REFERENCE_EXPRESSION + DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('a') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT - EXPRESSION_PATTERN - PsiElement(EQ)('=') - BINARY_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - PsiElement(PLUS)('+') - PsiWhiteSpace(' ') - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('3') + BINDING_PATTERN + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('b') PsiElement(COMMA)(',') PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + BINARY_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace(' ') + PsiElement(EQEQ)('==') + PsiWhiteSpace(' ') + BINARY_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(PLUS)('+') + PsiWhiteSpace(' ') + INTEGER_CONSTANT + PsiElement(INTEGER_LITERAL)('3') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') PsiWhiteSpace(' ') REFERENCE_EXPRESSION diff --git a/idea/testData/psi/examples/BinaryTree.jet b/idea/testData/psi/examples/BinaryTree.jet index 83735811726..6576f4dcb11 100644 --- a/idea/testData/psi/examples/BinaryTree.jet +++ b/idea/testData/psi/examples/BinaryTree.jet @@ -99,10 +99,10 @@ class BinaryTree : IMutableSet { private fun remove(node : TreeNode) { when (node) { - is TreeNode(null, null) => replace(node, null) - is TreeNode(null, right) => replace(node, right) - is TreeNode(left, null) => replace(node, left) - is TreeNode(left, right) => { + is TreeNode @ (null, null) => replace(node, null) + is TreeNode @ (null, right) => replace(node, right) + is TreeNode @ (left, null) => replace(node, left) + is TreeNode @ (left, right) => { val min = min(node.right) node.value = min.value remove(min) diff --git a/idea/testData/psi/examples/BinaryTree.txt b/idea/testData/psi/examples/BinaryTree.txt index f22ef659e3f..5ca93f0d61e 100644 --- a/idea/testData/psi/examples/BinaryTree.txt +++ b/idea/testData/psi/examples/BinaryTree.txt @@ -1347,6 +1347,9 @@ JetFile: BinaryTree.jet DECOMPOSER_PATTERN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('TreeNode') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT @@ -1385,6 +1388,9 @@ JetFile: BinaryTree.jet DECOMPOSER_PATTERN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('TreeNode') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT @@ -1395,8 +1401,10 @@ JetFile: BinaryTree.jet PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('right') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('right') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') @@ -1423,12 +1431,17 @@ JetFile: BinaryTree.jet DECOMPOSER_PATTERN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('TreeNode') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('left') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('left') PsiElement(COMMA)(',') PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT @@ -1461,18 +1474,25 @@ JetFile: BinaryTree.jet DECOMPOSER_PATTERN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('TreeNode') + PsiWhiteSpace(' ') + PsiElement(AT)('@') + PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT_LIST PsiElement(LPAR)('(') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('left') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('left') PsiElement(COMMA)(',') PsiWhiteSpace(' ') DECOMPOSER_ARGUMENT TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('right') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('right') PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(DOUBLE_ARROW)('=>') diff --git a/idea/testData/psi/examples/priorityqueues/BinaryHeap.txt b/idea/testData/psi/examples/priorityqueues/BinaryHeap.txt index 2b1dc518afb..5ffb45c26ef 100644 --- a/idea/testData/psi/examples/priorityqueues/BinaryHeap.txt +++ b/idea/testData/psi/examples/priorityqueues/BinaryHeap.txt @@ -318,16 +318,18 @@ JetFile: BinaryHeap.jet PsiElement(is)('is') PsiWhiteSpace(' ') TYPE_PATTERN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('IComparable') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - TYPE_PROJECTION - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('T') - PsiElement(GT)('>') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('IComparable') + TYPE_ARGUMENT_LIST + PsiElement(LT)('<') + TYPE_PROJECTION + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('T') + PsiElement(GT)('>') PsiElement(RPAR)(')') PsiWhiteSpace('\n ') BINARY_EXPRESSION