KT-165 Make 'Select word' work correctly on ?. in a receiver type

Spliiting-Joining of complex tokens (?. and ?:) added
This commit is contained in:
Andrey Breslav
2011-09-14 11:37:21 +04:00
parent aab4a6b437
commit b973b596b8
13 changed files with 458 additions and 345 deletions
+2 -1
View File
@@ -18,4 +18,5 @@ fun [a()] T.foo<T : fun (a) : b>(a : foo) : bar {}
fun [a()] T.foo<T : [a] fun (a) : b>(a : foo) : bar {}
fun A?.foo() : bar?
fun A?.foo() : bar?
fun A? .foo() : bar?
+27 -1
View File
@@ -587,7 +587,33 @@ JetFile: Functions.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('A')
PsiElement(SAFE_ACCESS)('?.')
PsiElement(QUEST)('?')
PsiElement(DOT)('.')
PsiElement(IDENTIFIER)('foo')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
NULLABLE_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
PsiElement(QUEST)('?')
PsiWhiteSpace('\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
TYPE_REFERENCE
NULLABLE_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('A')
PsiElement(QUEST)('?')
PsiWhiteSpace(' ')
PsiElement(DOT)('.')
PsiElement(IDENTIFIER)('foo')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
+2 -1
View File
@@ -50,4 +50,5 @@ fun foo() {
val IList<T>.lastIndex : Int
get() = this.size - 1
val Int?.opt : Int
val Int?.opt : Int
val Int? .opt : Int
+22 -1
View File
@@ -415,7 +415,28 @@ JetFile: Properties.jet
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(SAFE_ACCESS)('?.')
PsiElement(QUEST)('?')
PsiElement(DOT)('.')
PsiElement(IDENTIFIER)('opt')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiWhiteSpace('\n')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
TYPE_REFERENCE
NULLABLE_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(QUEST)('?')
PsiWhiteSpace(' ')
PsiElement(DOT)('.')
PsiElement(IDENTIFIER)('opt')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')