Need references in decomposer's properties list.
This commit is contained in:
@@ -330,10 +330,10 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
|||||||
else if (at(IDENTIFIER)) {
|
else if (at(IDENTIFIER)) {
|
||||||
if (JetParsing.MODIFIER_KEYWORD_MAP.containsKey(myBuilder.getTokenText())) {
|
if (JetParsing.MODIFIER_KEYWORD_MAP.containsKey(myBuilder.getTokenText())) {
|
||||||
if (!parseLocalDeclaration()) {
|
if (!parseLocalDeclaration()) {
|
||||||
parseSimpleName();
|
parseSimpleNameExpression();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
parseSimpleName();
|
parseSimpleNameExpression();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (at(LBRACE)) {
|
else if (at(LBRACE)) {
|
||||||
@@ -544,7 +544,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
|||||||
/*
|
/*
|
||||||
* SimpleName
|
* SimpleName
|
||||||
*/
|
*/
|
||||||
private void parseSimpleName() {
|
public void parseSimpleNameExpression() {
|
||||||
PsiBuilder.Marker simpleName = mark();
|
PsiBuilder.Marker simpleName = mark();
|
||||||
expect(IDENTIFIER, "Expecting an identifier [Interal error]");
|
expect(IDENTIFIER, "Expecting an identifier [Interal error]");
|
||||||
simpleName.done(REFERENCE_EXPRESSION);
|
simpleName.done(REFERENCE_EXPRESSION);
|
||||||
|
|||||||
@@ -276,7 +276,11 @@ public class JetParsing extends AbstractJetParsing {
|
|||||||
if (!at(RPAR)) {
|
if (!at(RPAR)) {
|
||||||
while (true) {
|
while (true) {
|
||||||
parseAttributeList();
|
parseAttributeList();
|
||||||
if (!expect(IDENTIFIER, "Expecting a property name", TokenSet.create(COMMA, RPAR))) {
|
if (at(IDENTIFIER)) {
|
||||||
|
myExpressionParsing.parseSimpleNameExpression();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
errorWithRecovery("Expecting a property name", TokenSet.create(COMMA, RPAR));
|
||||||
skipUntil(TokenSet.create(COMMA, RPAR, EOL_OR_SEMICOLON));
|
skipUntil(TokenSet.create(COMMA, RPAR, EOL_OR_SEMICOLON));
|
||||||
}
|
}
|
||||||
if (!at(COMMA)) {
|
if (!at(COMMA)) {
|
||||||
|
|||||||
@@ -5,10 +5,12 @@ JetFile: Decomposers.jet
|
|||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
DECOMPOSER_PROPERTY_LIST
|
DECOMPOSER_PROPERTY_LIST
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(IDENTIFIER)('a')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('a')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
DECOMPOSER
|
DECOMPOSER
|
||||||
@@ -50,10 +52,12 @@ JetFile: Decomposers.jet
|
|||||||
PsiElement(IDENTIFIER)('bar')
|
PsiElement(IDENTIFIER)('bar')
|
||||||
DECOMPOSER_PROPERTY_LIST
|
DECOMPOSER_PROPERTY_LIST
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(IDENTIFIER)('a')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('a')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
DECOMPOSER
|
DECOMPOSER
|
||||||
@@ -90,7 +94,8 @@ JetFile: Decomposers.jet
|
|||||||
PsiElement(IDENTIFIER)('a')
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(RBRACKET)(']')
|
PsiElement(RBRACKET)(']')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('s')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('s')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
DECOMPOSER
|
DECOMPOSER
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ JetFile: Decomposers_ERR.jet
|
|||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
DECOMPOSER_PROPERTY_LIST
|
DECOMPOSER_PROPERTY_LIST
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(IDENTIFIER)('a')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiErrorElement:Expecting ',' or a closing ')'
|
PsiErrorElement:Expecting ',' or a closing ')'
|
||||||
<empty list>
|
<empty list>
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
@@ -48,7 +49,8 @@ JetFile: Decomposers_ERR.jet
|
|||||||
<empty list>
|
<empty list>
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('a')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
DECOMPOSER
|
DECOMPOSER
|
||||||
@@ -86,7 +88,8 @@ JetFile: Decomposers_ERR.jet
|
|||||||
PsiElement(IDENTIFIER)('a')
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(RBRACKET)(']')
|
PsiElement(RBRACKET)(']')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('s')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('s')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiErrorElement:Expecting a property name
|
PsiErrorElement:Expecting a property name
|
||||||
<empty list>
|
<empty list>
|
||||||
@@ -114,10 +117,12 @@ JetFile: Decomposers_ERR.jet
|
|||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
DECOMPOSER_PROPERTY_LIST
|
DECOMPOSER_PROPERTY_LIST
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(IDENTIFIER)('a')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('a')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
PsiErrorElement:Cannot define an extension decomposer on a tuple
|
PsiErrorElement:Cannot define an extension decomposer on a tuple
|
||||||
<empty list>
|
<empty list>
|
||||||
@@ -167,10 +172,12 @@ JetFile: Decomposers_ERR.jet
|
|||||||
PsiElement(IDENTIFIER)('bar')
|
PsiElement(IDENTIFIER)('bar')
|
||||||
DECOMPOSER_PROPERTY_LIST
|
DECOMPOSER_PROPERTY_LIST
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(IDENTIFIER)('a')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('a')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
PsiErrorElement:Expecting namespace or top level declaration
|
PsiErrorElement:Expecting namespace or top level declaration
|
||||||
PsiElement(DOT)('.')
|
PsiElement(DOT)('.')
|
||||||
|
|||||||
@@ -61,7 +61,8 @@ JetFile: EOLsOnRollback.jet
|
|||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
DECOMPOSER_PROPERTY_LIST
|
DECOMPOSER_PROPERTY_LIST
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(IDENTIFIER)('df')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('df')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiWhiteSpace('\n\n ')
|
||||||
PROPERTY
|
PROPERTY
|
||||||
|
|||||||
@@ -153,7 +153,8 @@ JetFile: LocalDeclarations.jet
|
|||||||
PsiElement(IDENTIFIER)('foo')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
DECOMPOSER_PROPERTY_LIST
|
DECOMPOSER_PROPERTY_LIST
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(IDENTIFIER)('bar')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
@@ -93,13 +93,16 @@ JetFile: SimpleClassMembers.jet
|
|||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
DECOMPOSER_PROPERTY_LIST
|
DECOMPOSER_PROPERTY_LIST
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(IDENTIFIER)('a')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('b')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('c')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('c')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiWhiteSpace('\n\n ')
|
||||||
CONSTRUCTOR
|
CONSTRUCTOR
|
||||||
@@ -338,13 +341,16 @@ JetFile: SimpleClassMembers.jet
|
|||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
DECOMPOSER_PROPERTY_LIST
|
DECOMPOSER_PROPERTY_LIST
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(IDENTIFIER)('a')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('b')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('c')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('c')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiWhiteSpace('\n\n ')
|
||||||
CONSTRUCTOR
|
CONSTRUCTOR
|
||||||
@@ -433,13 +439,16 @@ JetFile: SimpleClassMembers.jet
|
|||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
DECOMPOSER_PROPERTY_LIST
|
DECOMPOSER_PROPERTY_LIST
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(IDENTIFIER)('a')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('b')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('c')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('c')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiWhiteSpace('\n\n ')
|
||||||
CONSTRUCTOR
|
CONSTRUCTOR
|
||||||
|
|||||||
@@ -85,13 +85,16 @@ JetFile: SimpleClassMembers_ERR.jet
|
|||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
DECOMPOSER_PROPERTY_LIST
|
DECOMPOSER_PROPERTY_LIST
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(IDENTIFIER)('a')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('b')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(COMMA)(',')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('c')
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('c')
|
||||||
PsiErrorElement:Expecting ',' or a closing ')'
|
PsiErrorElement:Expecting ',' or a closing ')'
|
||||||
<empty list>
|
<empty list>
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiWhiteSpace('\n\n ')
|
||||||
|
|||||||
Reference in New Issue
Block a user