Recover on EOL for imports

This commit is contained in:
Nikolay Krasko
2012-08-24 00:12:39 +04:00
parent 7419b237ba
commit 1a12ef9e07
6 changed files with 67 additions and 1 deletions
@@ -0,0 +1,6 @@
import some.test.
// Some
// SomeOther
object StyleSheetOrigin {}
@@ -0,0 +1,30 @@
JetFile: ImportRecovery.jet
NAMESPACE_HEADER
<empty list>
IMPORT_DIRECTIVE
PsiElement(import)('import')
PsiWhiteSpace(' ')
DOT_QUALIFIED_EXPRESSION
DOT_QUALIFIED_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('some')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('test')
PsiElement(DOT)('.')
PsiErrorElement:Qualified name must be a '.'-separated identifier list
<empty list>
PsiWhiteSpace('\n\n')
PsiComment(EOL_COMMENT)('// Some')
PsiWhiteSpace('\n')
PsiComment(EOL_COMMENT)('// SomeOther')
PsiWhiteSpace('\n\n')
OBJECT_DECLARATION
PsiElement(object)('object')
PsiWhiteSpace(' ')
OBJECT_DECLARATION_NAME
PsiElement(IDENTIFIER)('StyleSheetOrigin')
PsiWhiteSpace(' ')
CLASS_BODY
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
@@ -0,0 +1,3 @@
package some. // Hello
val a = 12
@@ -0,0 +1,21 @@
JetFile: PackageRecovery.jet
NAMESPACE_HEADER
PsiElement(package)('package')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('some')
PsiElement(DOT)('.')
PsiErrorElement:Package name must be a '.'-separated identifier list placed on a single line
<empty list>
PsiWhiteSpace(' ')
PsiComment(EOL_COMMENT)('// Hello')
PsiWhiteSpace('\n\n')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('a')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('12')