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
@@ -0,0 +1,35 @@
JetFile: IncompleteWhere.kt
PACKAGE_DIRECTIVE
<empty list>
CLASS
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('Outer')
PsiWhiteSpace(' ')
CLASS_BODY
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
CLASS
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('Inner')
TYPE_PARAMETER_LIST
PsiElement(LT)('<')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('T')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(where)('where')
PsiWhiteSpace('\n')
TYPE_CONSTRAINT_LIST
TYPE_CONSTRAINT
PsiErrorElement:Expecting type parameter name
<empty list>
TYPE_REFERENCE
<empty list>
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
CLASS
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('Next')