Decomposers removed
This commit is contained in:
@@ -33,7 +33,6 @@ class Example(a : Foo, i : Int) : Bar(i), Some {
|
||||
memberDeclaration
|
||||
: classObject
|
||||
: constructor
|
||||
: decomposer
|
||||
: function
|
||||
: property
|
||||
: class
|
||||
@@ -71,10 +70,6 @@ block
|
||||
: "{" expressions "}"
|
||||
;
|
||||
|
||||
decomposer // TODO: consider other names
|
||||
: modifiers "decomposer" (type ".")? SimpleName? "(" (attributes SimpleName){","}? ")" SEMI? // Public properties only
|
||||
;
|
||||
|
||||
function
|
||||
: modifiers "fun" (type ".")? attributes/*for receiver type*/ typeParameters? functionParameters (":" type)? functionBody?
|
||||
;
|
||||
|
||||
@@ -38,7 +38,6 @@ this
|
||||
val
|
||||
var
|
||||
fun
|
||||
decomposer -- may be soft
|
||||
extension
|
||||
for
|
||||
null
|
||||
|
||||
@@ -7,7 +7,7 @@ pattern
|
||||
: SimpleName // variable from the context
|
||||
: tuplePattern
|
||||
: bindingPattern // we allow non-linear patterns
|
||||
: decomposerPattern // labeled components are allowed
|
||||
: decomposerPattern // TODO: labeled components are allowed?
|
||||
;
|
||||
|
||||
constantPattern
|
||||
|
||||
@@ -25,7 +25,6 @@ toplevelObject
|
||||
: function
|
||||
: property
|
||||
: typedef
|
||||
: decomposer
|
||||
;
|
||||
|
||||
namespace
|
||||
|
||||
@@ -16,7 +16,6 @@ public interface JetNodeTypes {
|
||||
JetNodeType FUN = new JetNodeType("FUN", JetFunction.class);
|
||||
JetNodeType EXTENSION = new JetNodeType("EXTENSION", JetExtension.class);
|
||||
JetNodeType TYPEDEF = new JetNodeType("TYPEDEF", JetTypedef.class);
|
||||
JetNodeType DECOMPOSER = new JetNodeType("DECOMPOSER", JetDecomposer.class);
|
||||
|
||||
JetNodeType CLASS_OBJECT = new JetNodeType("CLASS_OBJECT", JetClassObject.class);
|
||||
JetNodeType CONSTRUCTOR = new JetNodeType("CONSTRUCTOR", JetConstructor.class);
|
||||
@@ -53,7 +52,6 @@ public interface JetNodeTypes {
|
||||
JetNodeType FUNCTION_TYPE = new JetNodeType("FUNCTION_TYPE", JetFunctionType.class);
|
||||
JetNodeType SELF_TYPE = new JetNodeType("SELF_TYPE", JetSelfType.class);
|
||||
|
||||
JetNodeType DECOMPOSER_PROPERTY_LIST = new JetNodeType("DECOMPOSER_PROPERTY_LIST", JetDecomposerPropertyList.class);
|
||||
// TODO: review
|
||||
JetNodeType RECEIVER_TYPE_ATTRIBUTES = new JetNodeType("RECEIVER_TYPE_ATTRIBUTES");
|
||||
JetNodeType PROPERTY_ACCESSOR = new JetNodeType("PROPERTY_ACCESSOR", JetPropertyAccessor.class);
|
||||
|
||||
@@ -17,7 +17,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
private static final TokenSet TYPE_ARGUMENT_LIST_STOPPERS = TokenSet.create(
|
||||
INTEGER_LITERAL, LONG_LITERAL, FLOAT_LITERAL, CHARACTER_LITERAL, STRING_LITERAL, RAW_STRING_LITERAL,
|
||||
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,
|
||||
FUN_KEYWORD, EXTENSION_KEYWORD, FOR_KEYWORD, NULL_KEYWORD, TYPEOF_KEYWORD,
|
||||
NEW_KEYWORD, TRUE_KEYWORD, FALSE_KEYWORD, IS_KEYWORD, THROW_KEYWORD, RETURN_KEYWORD, BREAK_KEYWORD,
|
||||
CONTINUE_KEYWORD, OBJECT_KEYWORD, IF_KEYWORD, TRY_KEYWORD, ELSE_KEYWORD, WHILE_KEYWORD, DO_KEYWORD,
|
||||
MATCH_KEYWORD, RBRACKET, RBRACE, RPAR, PLUSPLUS, MINUSMINUS, MUL, PLUS, MINUS, EXCL, DIV, PERC, LTEQ,
|
||||
@@ -342,7 +342,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
parseDoWhile();
|
||||
}
|
||||
else if (atSet(CLASS_KEYWORD, EXTENSION_KEYWORD, FUN_KEYWORD, VAL_KEYWORD,
|
||||
VAR_KEYWORD, TYPE_KEYWORD, DECOMPOSER_KEYWORD)) {
|
||||
VAR_KEYWORD, TYPE_KEYWORD)) {
|
||||
parseLocalDeclaration();
|
||||
}
|
||||
else if (at(FIELD_IDENTIFIER)) {
|
||||
@@ -459,7 +459,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
* : variablePattern // variable from the context
|
||||
* : tuplePattern
|
||||
* : bindingPattern // we allow non-linear patterns
|
||||
* : decomposerPattern // labeled components are allowed
|
||||
* : decomposerPattern // TODO: labeled components are allowed?
|
||||
* ;
|
||||
*/
|
||||
private void parsePattern() {
|
||||
@@ -766,9 +766,6 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
else if (keywordToken == TYPE_KEYWORD) {
|
||||
declType = myJetParsing.parseTypeDef();
|
||||
}
|
||||
else if (keywordToken == DECOMPOSER_KEYWORD) {
|
||||
declType = myJetParsing.parseDecomposer();
|
||||
}
|
||||
return declType;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@ public class JetParsing extends AbstractJetParsing {
|
||||
}
|
||||
|
||||
private static final TokenSet TOPLEVEL_OBJECT_FIRST = TokenSet.create(TYPE_KEYWORD, CLASS_KEYWORD,
|
||||
EXTENSION_KEYWORD, FUN_KEYWORD, VAL_KEYWORD, NAMESPACE_KEYWORD, DECOMPOSER_KEYWORD);
|
||||
EXTENSION_KEYWORD, FUN_KEYWORD, VAL_KEYWORD, NAMESPACE_KEYWORD);
|
||||
private static final TokenSet ENUM_MEMBER_FIRST = TokenSet.create(TYPE_KEYWORD, CLASS_KEYWORD,
|
||||
EXTENSION_KEYWORD, FUN_KEYWORD, VAL_KEYWORD, DECOMPOSER_KEYWORD, IDENTIFIER);
|
||||
EXTENSION_KEYWORD, FUN_KEYWORD, VAL_KEYWORD, IDENTIFIER);
|
||||
|
||||
private static final TokenSet CLASS_NAME_RECOVERY_SET = TokenSet.orSet(TokenSet.create(LT, WRAPS_KEYWORD, LPAR, COLON, LBRACE), TOPLEVEL_OBJECT_FIRST);
|
||||
private static final TokenSet TYPE_PARAMETER_GT_RECOVERY_SET = TokenSet.create(WHERE_KEYWORD, WRAPS_KEYWORD, LPAR, COLON, LBRACE, GT);
|
||||
@@ -225,9 +225,6 @@ public class JetParsing extends AbstractJetParsing {
|
||||
else if (keywordToken == TYPE_KEYWORD) {
|
||||
declType = parseTypeDef();
|
||||
}
|
||||
else if (keywordToken == DECOMPOSER_KEYWORD) {
|
||||
declType = parseDecomposer();
|
||||
}
|
||||
|
||||
if (declType == null) {
|
||||
errorAndAdvance("Expecting namespace or top level declaration");
|
||||
@@ -238,75 +235,6 @@ public class JetParsing extends AbstractJetParsing {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* decomposer
|
||||
* : modifiers "decomposer" (type ".")? SimpleName? "(" (attributes SimpleName){","}? ")" // Public properties only
|
||||
* ;
|
||||
*/
|
||||
public JetNodeType parseDecomposer() {
|
||||
assert _at(DECOMPOSER_KEYWORD);
|
||||
advance(); // DECOMPOSER_KEYWORD
|
||||
|
||||
boolean extenstion;
|
||||
if (!at(LPAR)) {
|
||||
extenstion = true;
|
||||
if (TYPE_REF_FIRST.contains(tt())
|
||||
&& !(at(IDENTIFIER) && lookahead(1) == LPAR)) {
|
||||
// TODO: if this type is annotated with an attribute, and it is a single identifier, it is an error (decomposer [a] foo())
|
||||
parseTypeRef();
|
||||
// The decomposer name may appear as the last section of the type
|
||||
if (at(DOT)) {
|
||||
advance(); // DOT
|
||||
expect(IDENTIFIER, "Expecting decomposer name", TokenSet.create(LPAR));
|
||||
}
|
||||
}
|
||||
else {
|
||||
consumeIf(IDENTIFIER);
|
||||
}
|
||||
} else {
|
||||
extenstion = false;
|
||||
}
|
||||
|
||||
PsiBuilder.Marker properties = mark();
|
||||
|
||||
myBuilder.disableNewlines();
|
||||
expect(LPAR, "Expecting a property list in parentheses '( ... )'");
|
||||
|
||||
// Property list
|
||||
if (!at(RPAR)) {
|
||||
while (true) {
|
||||
parseAttributeList();
|
||||
if (at(IDENTIFIER)) {
|
||||
myExpressionParsing.parseSimpleNameExpression();
|
||||
}
|
||||
else {
|
||||
errorWithRecovery("Expecting a property name", TokenSet.create(COMMA, RPAR));
|
||||
skipUntil(TokenSet.create(COMMA, RPAR, EOL_OR_SEMICOLON));
|
||||
}
|
||||
if (!at(COMMA)) {
|
||||
if (at(RPAR)) break;
|
||||
error("Expecting ',' or a closing ')'");
|
||||
skipUntil(TokenSet.create(COMMA, RPAR, EOL_OR_SEMICOLON));
|
||||
}
|
||||
if (!at(COMMA)) break;
|
||||
advance(); // COMMA
|
||||
}
|
||||
}
|
||||
|
||||
expect(RPAR, "Expecting ')' to close a property list");
|
||||
myBuilder.restoreNewlinesState();
|
||||
|
||||
consumeIf(SEMICOLON);
|
||||
|
||||
properties.done(DECOMPOSER_PROPERTY_LIST);
|
||||
|
||||
if (at(DOT) && !extenstion) {
|
||||
error("Cannot define an extension decomposer on a tuple");
|
||||
}
|
||||
|
||||
return DECOMPOSER;
|
||||
}
|
||||
|
||||
/*
|
||||
* (modifier | attribute)*
|
||||
*/
|
||||
@@ -572,7 +500,6 @@ public class JetParsing extends AbstractJetParsing {
|
||||
* memberDeclaration'
|
||||
* : classObject
|
||||
* : constructor
|
||||
* : decomposer
|
||||
* : function
|
||||
* : property
|
||||
* : class
|
||||
@@ -621,9 +548,6 @@ public class JetParsing extends AbstractJetParsing {
|
||||
else if (keywordToken == TYPE_KEYWORD) {
|
||||
declType = parseTypeDef();
|
||||
}
|
||||
else if (keywordToken == DECOMPOSER_KEYWORD) {
|
||||
declType = parseDecomposer();
|
||||
}
|
||||
else if (keywordToken == THIS_KEYWORD) {
|
||||
declType = parseConstructor();
|
||||
} else if (keywordToken == LBRACE) {
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
package org.jetbrains.jet.lang.psi;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.JetNodeTypes;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author max
|
||||
*/
|
||||
public class JetDecomposer extends JetNamedDeclaration {
|
||||
public JetDecomposer(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(@NotNull JetVisitor visitor) {
|
||||
visitor.visitDecomposer(this);
|
||||
}
|
||||
|
||||
@Nullable @IfNotParsed
|
||||
public JetDecomposerPropertyList getPropertyList() {
|
||||
return (JetDecomposerPropertyList) findChildByType(JetNodeTypes.DECOMPOSER_PROPERTY_LIST);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public List<JetReferenceExpression> getPropertyReferences() {
|
||||
JetDecomposerPropertyList list = getPropertyList();
|
||||
|
||||
return list != null ? list.getPropertyReferences() : Collections.<JetReferenceExpression>emptyList();
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package org.jetbrains.jet.lang.psi;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.JetNodeTypes;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author max
|
||||
*/
|
||||
public class JetDecomposerPropertyList extends JetNamedDeclaration {
|
||||
public JetDecomposerPropertyList(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(@NotNull JetVisitor visitor) {
|
||||
visitor.visitDecomposerPropertyList(this);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public List<JetReferenceExpression> getPropertyReferences() {
|
||||
return findChildrenByType(JetNodeTypes.REFERENCE_EXPRESSION);
|
||||
}
|
||||
}
|
||||
@@ -30,14 +30,6 @@ public class JetVisitor extends PsiElementVisitor {
|
||||
visitDeclaration(constructor);
|
||||
}
|
||||
|
||||
public void visitDecomposer(JetDecomposer decomposer) {
|
||||
visitDeclaration(decomposer);
|
||||
}
|
||||
|
||||
public void visitDecomposerPropertyList(JetDecomposerPropertyList propertyList) {
|
||||
visitJetElement(propertyList);
|
||||
}
|
||||
|
||||
public void visitExtension(JetExtension extension) {
|
||||
visitDeclaration(extension);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,6 @@ RAW_STRING_LITERAL = {THREE_QUO} {QUO_STRING_CHAR}* {THREE_QUO}?
|
||||
// TODO: Decide what to do with """ ... """"
|
||||
<YYINITIAL> {RAW_STRING_LITERAL} { return JetTokens.RAW_STRING_LITERAL; }
|
||||
|
||||
<YYINITIAL> "decomposer" { return JetTokens.DECOMPOSER_KEYWORD ;}
|
||||
<YYINITIAL> "namespace" { return JetTokens.NAMESPACE_KEYWORD ;}
|
||||
<YYINITIAL> "extension" { return JetTokens.EXTENSION_KEYWORD ;}
|
||||
<YYINITIAL> "continue" { return JetTokens.CONTINUE_KEYWORD ;}
|
||||
|
||||
@@ -31,7 +31,6 @@ public interface JetTokens {
|
||||
JetKeywordToken VAL_KEYWORD = JetKeywordToken.keyword("val");
|
||||
JetKeywordToken VAR_KEYWORD = JetKeywordToken.keyword("var");
|
||||
JetKeywordToken FUN_KEYWORD = JetKeywordToken.keyword("fun");
|
||||
JetKeywordToken DECOMPOSER_KEYWORD = JetKeywordToken.keyword("decomposer");
|
||||
JetKeywordToken EXTENSION_KEYWORD = JetKeywordToken.keyword("extension");
|
||||
JetKeywordToken FOR_KEYWORD = JetKeywordToken.keyword("for");
|
||||
JetKeywordToken NULL_KEYWORD = JetKeywordToken.keyword("null");
|
||||
@@ -134,7 +133,7 @@ public interface JetTokens {
|
||||
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,
|
||||
THIS_KEYWORD, VAL_KEYWORD, VAR_KEYWORD, FUN_KEYWORD, EXTENSION_KEYWORD, FOR_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, TRY_KEYWORD, CASE_KEYWORD,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +0,0 @@
|
||||
decomposer (a, a)
|
||||
decomposer ()
|
||||
decomposer {foo<T>.() : ()}.bar(a, a)
|
||||
decomposer a.foobar()
|
||||
[a] decomposer foobar([a] s)
|
||||
decomposer foobar()
|
||||
@@ -1,106 +0,0 @@
|
||||
JetFile: Decomposers.jet
|
||||
NAMESPACE
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
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)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('foobar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
MODIFIER_LIST
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foobar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('s')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foobar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -1,13 +0,0 @@
|
||||
decomposer (a a)
|
||||
decomposer {foo<T>.() : ()}.bar(, a)
|
||||
decomposer a.foobar)
|
||||
[a] decomposer foobar([a] s, )
|
||||
decomposer foobar([a])
|
||||
|
||||
|
||||
decomposer (a, a).
|
||||
decomposer ().
|
||||
decomposer {foo<T>.() : ()}.bar(a, a).
|
||||
|
||||
|
||||
decomposer foo.bar.-()
|
||||
@@ -1,198 +0,0 @@
|
||||
JetFile: Decomposers_ERR.jet
|
||||
NAMESPACE
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiErrorElement:Expecting ',' or a closing ')'
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
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)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiErrorElement:Expecting a property name
|
||||
<empty list>
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('foobar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiErrorElement:Expecting a property list in parentheses '( ... )'
|
||||
<empty list>
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
MODIFIER_LIST
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foobar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('s')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiErrorElement:Expecting a property name
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foobar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
ATTRIBUTE_ANNOTATION
|
||||
PsiElement(LBRACKET)('[')
|
||||
ATTRIBUTE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiErrorElement:Expecting a property name
|
||||
<empty list>
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n\n\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiErrorElement:Cannot define an extension decomposer on a tuple
|
||||
<empty list>
|
||||
PsiErrorElement:Expecting namespace or top level declaration
|
||||
PsiElement(DOT)('.')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiErrorElement:Cannot define an extension decomposer on a tuple
|
||||
<empty list>
|
||||
PsiErrorElement:Expecting namespace or top level declaration
|
||||
PsiElement(DOT)('.')
|
||||
PsiWhiteSpace('\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
PsiElement(LBRACE)('{')
|
||||
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)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
TUPLE_TYPE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiErrorElement:Expecting namespace or top level declaration
|
||||
PsiElement(DOT)('.')
|
||||
PsiWhiteSpace('\n\n\n')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
USER_TYPE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(DOT)('.')
|
||||
PsiErrorElement:Type name expected
|
||||
PsiElement(MINUS)('-')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
@@ -4,8 +4,6 @@ fun foo() {
|
||||
extension foo for boo
|
||||
|
||||
type x = t
|
||||
decomposer (df)
|
||||
|
||||
var r
|
||||
|
||||
[a] var foo = 4
|
||||
|
||||
@@ -56,15 +56,6 @@ JetFile: EOLsOnRollback.jet
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('t')
|
||||
PsiWhiteSpace('\n ')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('df')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PROPERTY
|
||||
PsiElement(var)('var')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
@@ -11,6 +11,4 @@ fun foo() {
|
||||
virtual extension foo for bar {
|
||||
|
||||
}
|
||||
|
||||
decomposer T.foo(bar)
|
||||
}
|
||||
|
||||
@@ -140,20 +140,5 @@ JetFile: LocalDeclarations.jet
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -15,8 +15,6 @@ class foo {
|
||||
|
||||
type foo = bar
|
||||
|
||||
decomposer (a, b, c)
|
||||
|
||||
this() : this(a, b, c), Foo<T>(bar)
|
||||
}
|
||||
|
||||
@@ -51,8 +49,6 @@ class foo {
|
||||
|
||||
type foo = bar
|
||||
|
||||
decomposer (a, b, c)
|
||||
|
||||
this() : this(a, b, c), Foo<T>(bar)
|
||||
}
|
||||
|
||||
@@ -64,8 +60,6 @@ class foo {
|
||||
|
||||
type foo = bar
|
||||
|
||||
decomposer (a, b, c)
|
||||
|
||||
this() : this(a, b, c), Foo<T>(bar)
|
||||
|
||||
this() : this(a, b, c), Foo<T>(bar) {
|
||||
|
||||
@@ -88,23 +88,6 @@ JetFile: SimpleClassMembers.jet
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
CONSTRUCTOR
|
||||
PsiElement(this)('this')
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -336,23 +319,6 @@ JetFile: SimpleClassMembers.jet
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
CONSTRUCTOR
|
||||
PsiElement(this)('this')
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -434,23 +400,6 @@ JetFile: SimpleClassMembers.jet
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
CONSTRUCTOR
|
||||
PsiElement(this)('this')
|
||||
VALUE_PARAMETER_LIST
|
||||
|
||||
@@ -14,8 +14,6 @@ class foo {
|
||||
|
||||
type foo = ;
|
||||
|
||||
decomposer (a, b, c
|
||||
|
||||
this() : this(a, b, c), Foo<T(bar)
|
||||
|
||||
this() : this(a, b, c), Foo<T>(bar) {
|
||||
|
||||
@@ -80,67 +80,52 @@ JetFile: SimpleClassMembers_ERR.jet
|
||||
<empty list>
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
DECOMPOSER
|
||||
PsiElement(decomposer)('decomposer')
|
||||
PsiWhiteSpace(' ')
|
||||
DECOMPOSER_PROPERTY_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiErrorElement:Expecting ',' or a closing ')'
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PsiElement(this)('this')
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting member declaration
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
CONSTRUCTOR
|
||||
PsiElement(this)('this')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiErrorElement:Parameters must have type annotation
|
||||
<empty list>
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiErrorElement:Parameters must have type annotation
|
||||
<empty list>
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiErrorElement:Parameters must have type annotation
|
||||
<empty list>
|
||||
PsiElement(RPAR)(')')
|
||||
PsiErrorElement:Expecting member declaration
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting member declaration
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
PsiErrorElement:Expecting member declaration
|
||||
PsiElement(LT)('<')
|
||||
PsiErrorElement:Expecting member declaration
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiErrorElement:Expecting member declaration
|
||||
PsiElement(LPAR)('(')
|
||||
PsiErrorElement:Expecting member declaration
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiErrorElement:Expecting member declaration
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
INITIALIZER_LIST
|
||||
THIS_CALL
|
||||
PsiElement(this)('this')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_ARGUMENT
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_ARGUMENT
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
DELEGATOR_SUPER_CALL
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('Foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiErrorElement:Expecting a '>'
|
||||
<empty list>
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
CONSTRUCTOR
|
||||
PsiElement(this)('this')
|
||||
|
||||
Reference in New Issue
Block a user