Pre- and Post-fixes fixed

This commit is contained in:
Andrey Breslav
2010-12-30 20:09:45 +03:00
parent f3f4a361d0
commit 4c41b1e566
7 changed files with 105 additions and 437 deletions
+3
View File
@@ -9,4 +9,7 @@ fun foo() {
var r
[a] var foo = 4
1
[a] val f
}
+3
View File
@@ -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))
-370
View File
@@ -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)('}')