Need *this* to be an expression and don't need separate node for super type qualifiers - they're all type references
This commit is contained in:
@@ -1057,6 +1057,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
*/
|
||||
private void parseThisExpression() {
|
||||
assert _at(THIS_KEYWORD);
|
||||
PsiBuilder.Marker mark = mark();
|
||||
advance(); // THIS_KEYWORD
|
||||
if (at(LT)) {
|
||||
// This may be "this < foo" or "this<foo>", thus the backtracking
|
||||
@@ -1069,13 +1070,14 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
|
||||
if (at(GT)) {
|
||||
advance(); // GT
|
||||
supertype.done(SUPERTYE_QUALIFIER);
|
||||
supertype.drop();
|
||||
}
|
||||
else {
|
||||
supertype.rollbackTo();
|
||||
}
|
||||
myBuilder.restoreNewlinesState();
|
||||
}
|
||||
mark.done(THIS_EXPRESSION);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -35,6 +35,7 @@ JetFile: AnnotatedExpressions.jet
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -726,7 +726,8 @@ JetFile: Properties.jet
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
DOT_QIALIFIED_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('size')
|
||||
|
||||
@@ -231,7 +231,8 @@ JetFile: SimpleExpressions.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
VALUE_PARAMETER
|
||||
@@ -245,8 +246,8 @@ JetFile: SimpleExpressions.jet
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(this)('this')
|
||||
SUPERTYE_QUALIFIER
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
|
||||
@@ -165,7 +165,8 @@ JetFile: BinaryTree.jet
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
DOT_QIALIFIED_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('compare')
|
||||
@@ -263,7 +264,8 @@ JetFile: BinaryTree.jet
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_ARGUMENT
|
||||
@@ -1828,7 +1830,8 @@ JetFile: BinaryTree.jet
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('BinaryTree')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('version')
|
||||
@@ -2391,7 +2394,8 @@ JetFile: BinaryTree.jet
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('BinaryTree')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('version')
|
||||
@@ -2435,7 +2439,8 @@ JetFile: BinaryTree.jet
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('BinaryTree')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('version')
|
||||
|
||||
@@ -480,7 +480,8 @@ JetFile: BitArith.jet
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('and')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
@@ -332,7 +332,8 @@ JetFile: PolymorphicClassObjects.jet
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
LOOP_RANGE
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BODY
|
||||
|
||||
@@ -379,7 +379,8 @@ JetFile: UnionFind.jet
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(PERC)('%')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
@@ -343,7 +343,8 @@ JetFile: ArrayList.jet
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('ArrayList')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('remove')
|
||||
|
||||
@@ -44,7 +44,8 @@ JetFile: HashMap.jet
|
||||
TUPLE
|
||||
PsiElement(LPAR)('(')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(as)('as')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -129,7 +130,8 @@ JetFile: HashMap.jet
|
||||
TUPLE
|
||||
PsiElement(LPAR)('(')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(as)('as')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -353,7 +355,8 @@ JetFile: HashMap.jet
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
|
||||
@@ -184,7 +184,8 @@ JetFile: List.jet
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQEQ)('==')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -235,7 +236,8 @@ JetFile: List.jet
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('List')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
CALL_EXPRESSION
|
||||
PROPERTY
|
||||
|
||||
@@ -120,7 +120,8 @@ JetFile: BinaryHeap.jet
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
DOT_QIALIFIED_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('compare')
|
||||
@@ -132,7 +133,8 @@ JetFile: BinaryHeap.jet
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
DOT_QIALIFIED_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
@@ -227,7 +229,8 @@ JetFile: BinaryHeap.jet
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
DOT_QIALIFIED_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('compare')
|
||||
@@ -239,7 +242,8 @@ JetFile: BinaryHeap.jet
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
DOT_QIALIFIED_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
@@ -266,7 +270,8 @@ JetFile: BinaryHeap.jet
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
DOT_QIALIFIED_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
@@ -305,7 +310,8 @@ JetFile: BinaryHeap.jet
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
DOT_QIALIFIED_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('comparator')
|
||||
@@ -352,7 +358,8 @@ JetFile: BinaryHeap.jet
|
||||
PsiElement(LPAR)('(')
|
||||
CONDITION
|
||||
DOT_QIALIFIED_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('isEmpty')
|
||||
@@ -891,7 +898,8 @@ JetFile: BinaryHeap.jet
|
||||
TUPLE
|
||||
PsiElement(LPAR)('(')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(MINUS)('-')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -924,7 +932,8 @@ JetFile: BinaryHeap.jet
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(MUL)('*')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -956,7 +965,8 @@ JetFile: BinaryHeap.jet
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(MUL)('*')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -1004,7 +1014,8 @@ JetFile: BinaryHeap.jet
|
||||
PsiElement(IDENTIFIER)('data')
|
||||
INDICES
|
||||
PsiElement(LBRACKET)('[')
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n ')
|
||||
PROPERTY_ACCESSOR
|
||||
@@ -1050,7 +1061,8 @@ JetFile: BinaryHeap.jet
|
||||
TUPLE
|
||||
PsiElement(LPAR)('(')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LT)('<')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -1067,7 +1079,8 @@ JetFile: BinaryHeap.jet
|
||||
TUPLE
|
||||
PsiElement(LPAR)('(')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(GTEQ)('>=')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -1134,7 +1147,8 @@ JetFile: BinaryHeap.jet
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_ARGUMENT
|
||||
@@ -1195,7 +1209,8 @@ JetFile: BinaryHeap.jet
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
ARRAY_ACCESS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
INDICES
|
||||
PsiElement(LBRACKET)('[')
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -1204,7 +1219,8 @@ JetFile: BinaryHeap.jet
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
ARRAY_ACCESS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
INDICES
|
||||
PsiElement(LBRACKET)('[')
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -1214,7 +1230,8 @@ JetFile: BinaryHeap.jet
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
ARRAY_ACCESS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
INDICES
|
||||
PsiElement(LBRACKET)('[')
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -1223,7 +1240,8 @@ JetFile: BinaryHeap.jet
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
ARRAY_ACCESS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
INDICES
|
||||
PsiElement(LBRACKET)('[')
|
||||
REFERENCE_EXPRESSION
|
||||
@@ -1267,7 +1285,8 @@ JetFile: BinaryHeap.jet
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
DOT_QIALIFIED_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
THIS_EXPRESSION
|
||||
PsiElement(this)('this')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('size')
|
||||
|
||||
Reference in New Issue
Block a user