Pre- and Post-fixes fixed
This commit is contained in:
@@ -74,15 +74,11 @@ multiplicativeExpression
|
||||
;
|
||||
|
||||
prefixUnaryExpression
|
||||
: prefixUnaryOperation postfixUnaryExpression
|
||||
: prefixUnaryOperation* postfixUnaryExpression
|
||||
;
|
||||
|
||||
postfixUnaryExpression
|
||||
: memberAccess postfixUnaryOperation
|
||||
;
|
||||
|
||||
memberAccess
|
||||
: atomicExpression memberAccessOperation atomicExpression
|
||||
: memberAccess postfixUnaryOperation*
|
||||
;
|
||||
|
||||
atomicExpression
|
||||
@@ -120,10 +116,6 @@ declaration
|
||||
: typedef
|
||||
;
|
||||
|
||||
memberAccessOperation
|
||||
: "." : "?." : "#"
|
||||
;
|
||||
|
||||
multiplicativeOperation
|
||||
: "*" : "/" : "%"
|
||||
;
|
||||
@@ -149,10 +141,6 @@ assignmentOperator
|
||||
: "+=" : "-=" : "*=" : "/=" : "%="// TODO: |=, %= and <<= make more sense than |, % or << alone, and so for others
|
||||
;
|
||||
|
||||
assignment
|
||||
: memberAccessExpression assignmentOperator expression // Assignment to functions prohibited by a semantic check
|
||||
;
|
||||
|
||||
unOpExpression
|
||||
: expression postfixUnaryOperation
|
||||
: prefixUnaryOperation expression
|
||||
@@ -168,8 +156,13 @@ prefixUnaryOperation
|
||||
postfixUnaryOperation
|
||||
: "++" : "--"
|
||||
: typeArguments? valueArguments
|
||||
// : typeArguments // TODO:
|
||||
: typeArguments
|
||||
: arrayAccess
|
||||
: memberAccessOperation atomicExpression
|
||||
;
|
||||
|
||||
memberAccessOperation
|
||||
: "." : "?." : "#"
|
||||
;
|
||||
|
||||
functionCall
|
||||
|
||||
@@ -98,6 +98,9 @@ public interface JetNodeTypes {
|
||||
JetNodeType CALL_EXPRESSION = new JetNodeType("CALL_EXPRESSION");
|
||||
JetNodeType ARRAY_ACCESS_EXPRESSION = new JetNodeType("ARRAY_ACCESS_EXPRESSION");
|
||||
JetNodeType INDICES = new JetNodeType("INDICES");
|
||||
JetNodeType DOT_QIALIFIED_EXPRESSION = new JetNodeType("DOT_QIALIFIED_EXPRESSION");
|
||||
JetNodeType HASH_QIALIFIED_EXPRESSION = new JetNodeType("HASH_QIALIFIED_EXPRESSION");
|
||||
JetNodeType SAFE_ACCESS_EXPRESSION = new JetNodeType("SAFE_ACCESS_EXPRESSION");
|
||||
|
||||
IElementType NAMESPACE_NAME = new JetNodeType("NAMESPACE_NAME");
|
||||
}
|
||||
|
||||
@@ -33,15 +33,14 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
|
||||
@SuppressWarnings({"UnusedDeclaration"})
|
||||
private enum Precedence {
|
||||
MEMBER_ACCESS(DOT, HASH, SAFE_ACCESS) {
|
||||
@Override
|
||||
public void parseHigherPrecedence(JetExpressionParsing parsing) {
|
||||
parsing.parseAtomicExpression();
|
||||
}
|
||||
},
|
||||
|
||||
// TODO: wrong priority for call: Random.nextInt().isOdd
|
||||
POSTFIX(PLUSPLUS, MINUSMINUS), // typeArguments? valueArguments : arrayAccess
|
||||
// MEMBER_ACCESS(DOT, HASH, SAFE_ACCESS) {
|
||||
// @Override
|
||||
// public void parseHigherPrecedence(JetExpressionParsing parsing) {
|
||||
// parsing.parseAtomicExpression();
|
||||
// }
|
||||
// },
|
||||
//
|
||||
POSTFIX(PLUSPLUS, MINUSMINUS), // typeArguments? valueArguments : typeArguments : arrayAccess
|
||||
|
||||
PREFIX(MINUS, PLUS, MINUSMINUS, PLUSPLUS, EXCL) { // attributes
|
||||
|
||||
@@ -131,7 +130,8 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
* see the precedence table
|
||||
*/
|
||||
private void parseBinaryExpression(Precedence precedence) {
|
||||
// System.out.println(precedence.name() + " at " + tt());
|
||||
// System.out.println(precedence.name() + " at " + myBuilder.getTokenText());
|
||||
|
||||
PsiBuilder.Marker expression = mark();
|
||||
|
||||
precedence.parseHigherPrecedence(this);
|
||||
@@ -147,21 +147,24 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
}
|
||||
|
||||
/*
|
||||
* operation? expression
|
||||
* operation? prefixExpression
|
||||
*/
|
||||
private void parsePrefixExpression() {
|
||||
// System.out.println("pre at " + tt());
|
||||
// System.out.println("pre at " + myBuilder.getTokenText());
|
||||
if (at(LBRACKET)) {
|
||||
if (!parseLocalDeclaration()) {
|
||||
PsiBuilder.Marker attributes = mark();
|
||||
PsiBuilder.Marker expression = mark();
|
||||
myJetParsing.parseAttributeList();
|
||||
parsePostfixExpression();
|
||||
attributes.done(ANNOTATED_EXPRESSION);
|
||||
parsePrefixExpression();
|
||||
expression.done(ANNOTATED_EXPRESSION);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else if (atSet(Precedence.PREFIX.getOperations())) {
|
||||
PsiBuilder.Marker expression = mark();
|
||||
advance(); // operation
|
||||
parsePostfixExpression();
|
||||
|
||||
parsePrefixExpression();
|
||||
expression.done(PREFIX_EXPRESSION);
|
||||
} else {
|
||||
parsePostfixExpression();
|
||||
@@ -172,41 +175,63 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
* expression operation?
|
||||
*/
|
||||
private void parsePostfixExpression() {
|
||||
// System.out.println("post at " + tt());
|
||||
// System.out.println("post at " + myBuilder.getTokenText());
|
||||
// TODO: call with a closure outside parentheses
|
||||
|
||||
PsiBuilder.Marker expression = mark();
|
||||
parseBinaryExpression(Precedence.MEMBER_ACCESS);
|
||||
if (myBuilder.eolInLastWhitespace()) {
|
||||
expression.drop();
|
||||
} else if (at(LBRACKET)) {
|
||||
parseArrayAccess();
|
||||
expression.done(ARRAY_ACCESS_EXPRESSION);
|
||||
} else if (atSet(Precedence.POSTFIX.getOperations())) {
|
||||
advance(); // operation
|
||||
expression.done(POSTFIX_EXPRESSION);
|
||||
} else if (at(LPAR)) {
|
||||
parseValueArgumentList();
|
||||
expression.done(CALL_EXPRESSION);
|
||||
} else if (at(LT)) {
|
||||
// TODO: be more clever: f(foo<a, (a + 1), b>(c)) is not a function call
|
||||
int gtPos = matchTokenStreamPredicate(new FirstBefore(new At(GT), new AtSet(TYPE_ARGUMENT_LIST_STOPPERS, false)) {
|
||||
@Override
|
||||
public boolean isTopLevel(int openAngleBrackets, int openBrackets, int openBraces, int openParentheses) {
|
||||
return openAngleBrackets == 1 && openBrackets == 0 && openBraces == 0 && openParentheses == 0;
|
||||
}
|
||||
});
|
||||
if (gtPos >= 0) {
|
||||
myJetParsing.parseTypeArgumentList();
|
||||
// if (at(LPAR)) parseValueArgumentList(); TODO : we can do this...
|
||||
// parseBinaryExpression(Precedence.MEMBER_ACCESS);
|
||||
parseAtomicExpression();
|
||||
while (true) {
|
||||
if (myBuilder.eolInLastWhitespace()) {
|
||||
break;
|
||||
} else if (at(LBRACKET)) {
|
||||
parseArrayAccess();
|
||||
expression.done(ARRAY_ACCESS_EXPRESSION);
|
||||
} else if (atSet(Precedence.POSTFIX.getOperations())) {
|
||||
advance(); // operation
|
||||
expression.done(POSTFIX_EXPRESSION);
|
||||
} else if (at(LPAR)) {
|
||||
parseValueArgumentList();
|
||||
expression.done(CALL_EXPRESSION);
|
||||
} else if (at(LT)) {
|
||||
// TODO: be more clever: f(foo<a, (a + 1), b>(c)) is not a function call
|
||||
int gtPos = matchTokenStreamPredicate(new FirstBefore(new At(GT), new AtSet(TYPE_ARGUMENT_LIST_STOPPERS, false)) {
|
||||
@Override
|
||||
public boolean isTopLevel(int openAngleBrackets, int openBrackets, int openBraces, int openParentheses) {
|
||||
return openAngleBrackets == 1 && openBrackets == 0 && openBraces == 0 && openParentheses == 0;
|
||||
}
|
||||
});
|
||||
if (gtPos >= 0) {
|
||||
myJetParsing.parseTypeArgumentList();
|
||||
if (at(LPAR)) parseValueArgumentList();
|
||||
expression.done(CALL_EXPRESSION);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} else if (at(DOT)) {
|
||||
advance(); // DOT
|
||||
|
||||
parseAtomicExpression();
|
||||
|
||||
expression.done(DOT_QIALIFIED_EXPRESSION);
|
||||
} else if (at(SAFE_ACCESS)) {
|
||||
advance(); // SAFE_ACCESS
|
||||
|
||||
parseAtomicExpression();
|
||||
|
||||
expression.done(SAFE_ACCESS_EXPRESSION);
|
||||
} else if (at(HASH)) {
|
||||
advance(); // HASH
|
||||
|
||||
expect(IDENTIFIER, "Expecting property or function name");
|
||||
|
||||
expression.done(HASH_QIALIFIED_EXPRESSION);
|
||||
} else {
|
||||
expression.drop();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
expression.drop();
|
||||
expression = expression.precede();
|
||||
}
|
||||
expression.drop();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -227,7 +252,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
* ;
|
||||
*/
|
||||
private void parseAtomicExpression() {
|
||||
// System.out.println("atom at " + tt());
|
||||
// System.out.println("atom at " + myBuilder.getTokenText());
|
||||
|
||||
|
||||
if (at(LPAR)) {
|
||||
|
||||
@@ -63,14 +63,25 @@ public class SemanticWhitespaceAwarePsiBuilderImpl extends PsiBuilderAdapter imp
|
||||
// TODO: Overhead
|
||||
@Override
|
||||
public Marker mark() {
|
||||
return new MarkerAdapter(super.mark()) {
|
||||
private final boolean eolInLastWhitespace = eolInLastWhitespace();
|
||||
return new MarkerWrapper(super.mark());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rollbackTo() {
|
||||
super.rollbackTo();
|
||||
myEOLInLastWhitespace = eolInLastWhitespace;
|
||||
}
|
||||
};
|
||||
private class MarkerWrapper extends MarkerAdapter {
|
||||
private final boolean eolInLastWhitespace = eolInLastWhitespace();
|
||||
|
||||
public MarkerWrapper(Marker delegate) {
|
||||
super(delegate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rollbackTo() {
|
||||
super.rollbackTo();
|
||||
myEOLInLastWhitespace = eolInLastWhitespace;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Marker precede() {
|
||||
return new MarkerWrapper(super.precede());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,7 @@ fun foo() {
|
||||
var r
|
||||
|
||||
[a] var foo = 4
|
||||
|
||||
1
|
||||
[a] val f
|
||||
}
|
||||
@@ -1,4 +1,7 @@
|
||||
fun foo() {
|
||||
b().x
|
||||
x++ . 4
|
||||
++ -- ! a
|
||||
f(foo<a, (b>(x)))
|
||||
f(foo<a, b>(x))
|
||||
f((foo<a), b>(x))
|
||||
|
||||
@@ -1,370 +0,0 @@
|
||||
JetFile: Precedence.jet
|
||||
NAMESPACE
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_PARAMETER_LIST
|
||||
<empty list>
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
CALL_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(LT)('<')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_ARGUMENT
|
||||
TUPLE
|
||||
PsiElement(LPAR)('(')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(GT)('>')
|
||||
TUPLE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
CALL_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
CALL_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_ARGUMENT_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(GT)('>')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
CALL_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
TUPLE
|
||||
PsiElement(LPAR)('(')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(LT)('<')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_ARGUMENT
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(GT)('>')
|
||||
TUPLE
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
CALL_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(LT)('<')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_ARGUMENT
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(PLUS)('+')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(PLUS)('+')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(MUL)('*')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(PLUS)('+')
|
||||
PsiWhiteSpace(' ')
|
||||
TUPLE
|
||||
PsiElement(LPAR)('(')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(MUL)('*')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(PLUS)('+')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(MUL)('*')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(PLUS)('+')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(MUL)('*')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('d')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(PLUS)('+')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(PLUS)('+')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
POSTFIX_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(PLUSPLUS)('++')
|
||||
PsiWhiteSpace('\n ')
|
||||
PREFIX_EXPRESSION
|
||||
PsiElement(MINUSMINUS)('--')
|
||||
POSTFIX_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(PLUSPLUS)('++')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
PREFIX_EXPRESSION
|
||||
PsiElement(MINUSMINUS)('--')
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(MUL)('*')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(PLUS)('+')
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(RANGE)('..')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(MINUS)('-')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiElement(RANGE)('..')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('2')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('2')
|
||||
PsiElement(RANGE)('..')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('3')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('2')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ELVIS)('?:')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('3')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ELVIS)('?:')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(ELVIS)('?:')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LT)('<')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LT)('<')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQEQ)('==')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EXCLEQ)('!=')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ANDAND)('&&')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(OROR)('||')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ANDAND)('&&')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(OROR)('||')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('c')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
Reference in New Issue
Block a user