KT-5976 Parser recovery is poor on object with parameters

#KT-5976 Fixed
This commit is contained in:
Andrey Breslav
2014-10-14 14:35:43 +04:00
parent d25a858214
commit 391b57077b
41 changed files with 2088 additions and 52 deletions
@@ -0,0 +1,138 @@
JetFile: ConstructorModifiersAndName.kt
PACKAGE_DIRECTIVE
<empty list>
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiErrorElement:An object expression cannot bind a name
PsiElement(IDENTIFIER)('Name')
PsiWhiteSpace(' ')
PsiErrorElement:Constructors are not allowed for objects
PRIMARY_CONSTRUCTOR_MODIFIER_LIST
PsiElement(private)('private')
PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
CLASS_BODY
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiErrorElement:An object expression cannot bind a name
PsiElement(IDENTIFIER)('Name')
PsiWhiteSpace(' ')
PsiErrorElement:Constructors are not allowed for objects
PRIMARY_CONSTRUCTOR_MODIFIER_LIST
PsiElement(private)('private')
PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
DELEGATION_SPECIFIER_LIST
DELEGATOR_SUPER_CLASS
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Bar')
PsiWhiteSpace(' ')
CLASS_BODY
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n\n')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiErrorElement:An object expression cannot bind a name
PsiElement(IDENTIFIER)('Name')
PsiWhiteSpace(' ')
PsiErrorElement:Constructors are not allowed for objects
PRIMARY_CONSTRUCTOR_MODIFIER_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
PsiElement(private)('private')
PsiWhiteSpace(' ')
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
CLASS_BODY
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
OBJECT_LITERAL
OBJECT_DECLARATION
PsiElement(object)('object')
PsiWhiteSpace(' ')
PsiErrorElement:An object expression cannot bind a name
PsiElement(IDENTIFIER)('Name')
PsiWhiteSpace(' ')
PsiErrorElement:Constructors are not allowed for objects
PRIMARY_CONSTRUCTOR_MODIFIER_LIST
PsiElement(private)('private')
PsiWhiteSpace(' ')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
CLASS_BODY
PsiErrorElement:Expecting a class body
<empty list>