Pre- and Post-fixes fixed
This commit is contained in:
@@ -74,15 +74,11 @@ multiplicativeExpression
|
|||||||
;
|
;
|
||||||
|
|
||||||
prefixUnaryExpression
|
prefixUnaryExpression
|
||||||
: prefixUnaryOperation postfixUnaryExpression
|
: prefixUnaryOperation* postfixUnaryExpression
|
||||||
;
|
;
|
||||||
|
|
||||||
postfixUnaryExpression
|
postfixUnaryExpression
|
||||||
: memberAccess postfixUnaryOperation
|
: memberAccess postfixUnaryOperation*
|
||||||
;
|
|
||||||
|
|
||||||
memberAccess
|
|
||||||
: atomicExpression memberAccessOperation atomicExpression
|
|
||||||
;
|
;
|
||||||
|
|
||||||
atomicExpression
|
atomicExpression
|
||||||
@@ -120,10 +116,6 @@ declaration
|
|||||||
: typedef
|
: typedef
|
||||||
;
|
;
|
||||||
|
|
||||||
memberAccessOperation
|
|
||||||
: "." : "?." : "#"
|
|
||||||
;
|
|
||||||
|
|
||||||
multiplicativeOperation
|
multiplicativeOperation
|
||||||
: "*" : "/" : "%"
|
: "*" : "/" : "%"
|
||||||
;
|
;
|
||||||
@@ -149,10 +141,6 @@ assignmentOperator
|
|||||||
: "+=" : "-=" : "*=" : "/=" : "%="// TODO: |=, %= and <<= make more sense than |, % or << alone, and so for others
|
: "+=" : "-=" : "*=" : "/=" : "%="// 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
|
unOpExpression
|
||||||
: expression postfixUnaryOperation
|
: expression postfixUnaryOperation
|
||||||
: prefixUnaryOperation expression
|
: prefixUnaryOperation expression
|
||||||
@@ -168,8 +156,13 @@ prefixUnaryOperation
|
|||||||
postfixUnaryOperation
|
postfixUnaryOperation
|
||||||
: "++" : "--"
|
: "++" : "--"
|
||||||
: typeArguments? valueArguments
|
: typeArguments? valueArguments
|
||||||
// : typeArguments // TODO:
|
: typeArguments
|
||||||
: arrayAccess
|
: arrayAccess
|
||||||
|
: memberAccessOperation atomicExpression
|
||||||
|
;
|
||||||
|
|
||||||
|
memberAccessOperation
|
||||||
|
: "." : "?." : "#"
|
||||||
;
|
;
|
||||||
|
|
||||||
functionCall
|
functionCall
|
||||||
|
|||||||
@@ -98,6 +98,9 @@ public interface JetNodeTypes {
|
|||||||
JetNodeType CALL_EXPRESSION = new JetNodeType("CALL_EXPRESSION");
|
JetNodeType CALL_EXPRESSION = new JetNodeType("CALL_EXPRESSION");
|
||||||
JetNodeType ARRAY_ACCESS_EXPRESSION = new JetNodeType("ARRAY_ACCESS_EXPRESSION");
|
JetNodeType ARRAY_ACCESS_EXPRESSION = new JetNodeType("ARRAY_ACCESS_EXPRESSION");
|
||||||
JetNodeType INDICES = new JetNodeType("INDICES");
|
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");
|
IElementType NAMESPACE_NAME = new JetNodeType("NAMESPACE_NAME");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,15 +33,14 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
|||||||
|
|
||||||
@SuppressWarnings({"UnusedDeclaration"})
|
@SuppressWarnings({"UnusedDeclaration"})
|
||||||
private enum Precedence {
|
private enum Precedence {
|
||||||
MEMBER_ACCESS(DOT, HASH, SAFE_ACCESS) {
|
// MEMBER_ACCESS(DOT, HASH, SAFE_ACCESS) {
|
||||||
@Override
|
// @Override
|
||||||
public void parseHigherPrecedence(JetExpressionParsing parsing) {
|
// public void parseHigherPrecedence(JetExpressionParsing parsing) {
|
||||||
parsing.parseAtomicExpression();
|
// parsing.parseAtomicExpression();
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
// TODO: wrong priority for call: Random.nextInt().isOdd
|
POSTFIX(PLUSPLUS, MINUSMINUS), // typeArguments? valueArguments : typeArguments : arrayAccess
|
||||||
POSTFIX(PLUSPLUS, MINUSMINUS), // typeArguments? valueArguments : arrayAccess
|
|
||||||
|
|
||||||
PREFIX(MINUS, PLUS, MINUSMINUS, PLUSPLUS, EXCL) { // attributes
|
PREFIX(MINUS, PLUS, MINUSMINUS, PLUSPLUS, EXCL) { // attributes
|
||||||
|
|
||||||
@@ -131,7 +130,8 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
|||||||
* see the precedence table
|
* see the precedence table
|
||||||
*/
|
*/
|
||||||
private void parseBinaryExpression(Precedence precedence) {
|
private void parseBinaryExpression(Precedence precedence) {
|
||||||
// System.out.println(precedence.name() + " at " + tt());
|
// System.out.println(precedence.name() + " at " + myBuilder.getTokenText());
|
||||||
|
|
||||||
PsiBuilder.Marker expression = mark();
|
PsiBuilder.Marker expression = mark();
|
||||||
|
|
||||||
precedence.parseHigherPrecedence(this);
|
precedence.parseHigherPrecedence(this);
|
||||||
@@ -147,21 +147,24 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* operation? expression
|
* operation? prefixExpression
|
||||||
*/
|
*/
|
||||||
private void parsePrefixExpression() {
|
private void parsePrefixExpression() {
|
||||||
// System.out.println("pre at " + tt());
|
// System.out.println("pre at " + myBuilder.getTokenText());
|
||||||
if (at(LBRACKET)) {
|
if (at(LBRACKET)) {
|
||||||
if (!parseLocalDeclaration()) {
|
if (!parseLocalDeclaration()) {
|
||||||
PsiBuilder.Marker attributes = mark();
|
PsiBuilder.Marker expression = mark();
|
||||||
myJetParsing.parseAttributeList();
|
myJetParsing.parseAttributeList();
|
||||||
parsePostfixExpression();
|
parsePrefixExpression();
|
||||||
attributes.done(ANNOTATED_EXPRESSION);
|
expression.done(ANNOTATED_EXPRESSION);
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} else if (atSet(Precedence.PREFIX.getOperations())) {
|
} else if (atSet(Precedence.PREFIX.getOperations())) {
|
||||||
PsiBuilder.Marker expression = mark();
|
PsiBuilder.Marker expression = mark();
|
||||||
advance(); // operation
|
advance(); // operation
|
||||||
parsePostfixExpression();
|
|
||||||
|
parsePrefixExpression();
|
||||||
expression.done(PREFIX_EXPRESSION);
|
expression.done(PREFIX_EXPRESSION);
|
||||||
} else {
|
} else {
|
||||||
parsePostfixExpression();
|
parsePostfixExpression();
|
||||||
@@ -172,41 +175,63 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
|||||||
* expression operation?
|
* expression operation?
|
||||||
*/
|
*/
|
||||||
private void parsePostfixExpression() {
|
private void parsePostfixExpression() {
|
||||||
// System.out.println("post at " + tt());
|
// System.out.println("post at " + myBuilder.getTokenText());
|
||||||
// TODO: call with a closure outside parentheses
|
// TODO: call with a closure outside parentheses
|
||||||
|
|
||||||
PsiBuilder.Marker expression = mark();
|
PsiBuilder.Marker expression = mark();
|
||||||
parseBinaryExpression(Precedence.MEMBER_ACCESS);
|
// parseBinaryExpression(Precedence.MEMBER_ACCESS);
|
||||||
if (myBuilder.eolInLastWhitespace()) {
|
parseAtomicExpression();
|
||||||
expression.drop();
|
while (true) {
|
||||||
} else if (at(LBRACKET)) {
|
if (myBuilder.eolInLastWhitespace()) {
|
||||||
parseArrayAccess();
|
break;
|
||||||
expression.done(ARRAY_ACCESS_EXPRESSION);
|
} else if (at(LBRACKET)) {
|
||||||
} else if (atSet(Precedence.POSTFIX.getOperations())) {
|
parseArrayAccess();
|
||||||
advance(); // operation
|
expression.done(ARRAY_ACCESS_EXPRESSION);
|
||||||
expression.done(POSTFIX_EXPRESSION);
|
} else if (atSet(Precedence.POSTFIX.getOperations())) {
|
||||||
} else if (at(LPAR)) {
|
advance(); // operation
|
||||||
parseValueArgumentList();
|
expression.done(POSTFIX_EXPRESSION);
|
||||||
expression.done(CALL_EXPRESSION);
|
} else if (at(LPAR)) {
|
||||||
} 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...
|
|
||||||
parseValueArgumentList();
|
parseValueArgumentList();
|
||||||
expression.done(CALL_EXPRESSION);
|
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 {
|
} else {
|
||||||
expression.drop();
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
expression = expression.precede();
|
||||||
expression.drop();
|
|
||||||
}
|
}
|
||||||
|
expression.drop();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -227,7 +252,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
|||||||
* ;
|
* ;
|
||||||
*/
|
*/
|
||||||
private void parseAtomicExpression() {
|
private void parseAtomicExpression() {
|
||||||
// System.out.println("atom at " + tt());
|
// System.out.println("atom at " + myBuilder.getTokenText());
|
||||||
|
|
||||||
|
|
||||||
if (at(LPAR)) {
|
if (at(LPAR)) {
|
||||||
|
|||||||
@@ -63,14 +63,25 @@ public class SemanticWhitespaceAwarePsiBuilderImpl extends PsiBuilderAdapter imp
|
|||||||
// TODO: Overhead
|
// TODO: Overhead
|
||||||
@Override
|
@Override
|
||||||
public Marker mark() {
|
public Marker mark() {
|
||||||
return new MarkerAdapter(super.mark()) {
|
return new MarkerWrapper(super.mark());
|
||||||
private final boolean eolInLastWhitespace = eolInLastWhitespace();
|
}
|
||||||
|
|
||||||
@Override
|
private class MarkerWrapper extends MarkerAdapter {
|
||||||
public void rollbackTo() {
|
private final boolean eolInLastWhitespace = eolInLastWhitespace();
|
||||||
super.rollbackTo();
|
|
||||||
myEOLInLastWhitespace = 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
|
var r
|
||||||
|
|
||||||
[a] var foo = 4
|
[a] var foo = 4
|
||||||
|
|
||||||
|
1
|
||||||
|
[a] val f
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
fun foo() {
|
fun foo() {
|
||||||
|
b().x
|
||||||
|
x++ . 4
|
||||||
|
++ -- ! a
|
||||||
f(foo<a, (b>(x)))
|
f(foo<a, (b>(x)))
|
||||||
f(foo<a, b>(x))
|
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