Corrected parser: incomplete code should never cause brace disbalance

Fixed KT-7539 fq name inserted when completing nested traits name

 #KT-7539
This commit is contained in:
Valentin Kipyatkov
2015-05-15 01:08:18 +03:00
parent c8b1dd6425
commit 60b0236101
66 changed files with 1335 additions and 402 deletions
+22 -8
View File
@@ -6,8 +6,13 @@ JetFile: Properties_ERR.kt
PsiWhiteSpace(' ')
PsiErrorElement:Expecting property name or receiver type
PsiElement(MINUS)('-')
PsiWhiteSpace(' ')
PsiErrorElement:Property getter or setter expected
<empty list>
PsiWhiteSpace(' ')
FUN
PsiErrorElement:Expecting a top level declaration
<empty list>
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
@@ -15,8 +20,13 @@ JetFile: Properties_ERR.kt
PsiElement(var)('var')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('f')
PsiWhiteSpace(' ')
PsiErrorElement:Property getter or setter expected
<empty list>
PsiWhiteSpace(' ')
FUN
PsiErrorElement:Expecting a top level declaration
<empty list>
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
@@ -159,10 +169,12 @@ JetFile: Properties_ERR.kt
PsiErrorElement:Expecting a top level declaration
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiErrorElement:Expecting a top level declaration
PsiElement(LBRACE)('{')
PsiErrorElement:Expecting a top level declaration
PsiElement(RBRACE)('}')
FUN
PsiErrorElement:Expecting a top level declaration
<empty list>
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n ')
PsiErrorElement:Expecting a top level declaration
PsiElement(LPAR)('(')
@@ -209,6 +221,8 @@ JetFile: Properties_ERR.kt
PsiElement(get)('get')
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiErrorElement:Expecting function body
PsiElement(MINUS)('-')
<empty list>
PsiWhiteSpace(' ')
PsiErrorElement:Property getter or setter expected
PsiElement(MINUS)('-')