From 7fcae647665b014331eeadd2bea906fb994d09c5 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Tue, 27 Dec 2011 15:20:31 +0400 Subject: [PATCH] Parser test data fixed --- compiler/testData/psi/FileStart_ERR.txt | 44 ++- compiler/testData/psi/NamespaceBlock.jet | 29 -- compiler/testData/psi/NamespaceBlock.txt | 146 -------- compiler/testData/psi/NamespaceBlockFirst.txt | 68 ++-- compiler/testData/psi/NamespaceBlock_ERR.jet | 42 --- compiler/testData/psi/NamespaceBlock_ERR.txt | 318 ------------------ compiler/testData/psi/NamespaceModifiers.jet | 10 +- compiler/testData/psi/NamespaceModifiers.txt | 45 +-- compiler/testData/psi/RootNamespace.txt | 197 +++++------ compiler/testData/psi/ShortAnnotations.jet | 1 - compiler/testData/psi/ShortAnnotations.txt | 60 ---- .../checker/RecursiveTypeInference.jet | 10 +- 12 files changed, 175 insertions(+), 795 deletions(-) delete mode 100644 compiler/testData/psi/NamespaceBlock.jet delete mode 100644 compiler/testData/psi/NamespaceBlock.txt delete mode 100644 compiler/testData/psi/NamespaceBlock_ERR.jet delete mode 100644 compiler/testData/psi/NamespaceBlock_ERR.txt diff --git a/compiler/testData/psi/FileStart_ERR.txt b/compiler/testData/psi/FileStart_ERR.txt index 1f3f4e6a14a..bda36bd0a99 100644 --- a/compiler/testData/psi/FileStart_ERR.txt +++ b/compiler/testData/psi/FileStart_ERR.txt @@ -4,19 +4,33 @@ JetFile: FileStart_ERR.jet PsiErrorElement:Expecting namespace or top level declaration PsiElement(DIV)('/') - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('bar') - PsiErrorElement:A namespace block in '{...}' expected - - PsiWhiteSpace('\n') - IMPORT_DIRECTIVE - PsiElement(import)('import') + PsiErrorElement:Expecting namespace or top level declaration + PsiElement(namespace)('package') + PsiWhiteSpace(' ') + MODIFIER_LIST + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') + PsiWhiteSpace('\n') + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('import') PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') \ No newline at end of file + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') + PsiErrorElement:Expecting namespace or top level declaration + \ No newline at end of file diff --git a/compiler/testData/psi/NamespaceBlock.jet b/compiler/testData/psi/NamespaceBlock.jet deleted file mode 100644 index cf3ba05fd99..00000000000 --- a/compiler/testData/psi/NamespaceBlock.jet +++ /dev/null @@ -1,29 +0,0 @@ -package foo.bar.goo - -import foo as bar - -package foof { - import foo.bar.*; - - class Foo {} - - package bar { - class Bar {} - - package ns { - class X - - class Y - } - } -} - - -class Bar {} - -package foo {} - -package bar { - import sdf - -} \ No newline at end of file diff --git a/compiler/testData/psi/NamespaceBlock.txt b/compiler/testData/psi/NamespaceBlock.txt deleted file mode 100644 index 33b0d00d72a..00000000000 --- a/compiler/testData/psi/NamespaceBlock.txt +++ /dev/null @@ -1,146 +0,0 @@ -JetFile: NamespaceBlock.jet - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('goo') - PsiWhiteSpace('\n\n') - IMPORT_DIRECTIVE - PsiElement(import)('import') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiWhiteSpace(' ') - PsiElement(as)('as') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('bar') - PsiWhiteSpace('\n\n') - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('foof') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - NAMESPACE_BODY - IMPORT_DIRECTIVE - PsiElement(import)('import') - PsiWhiteSpace(' ') - DOT_QUALIFIED_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - PsiElement(DOT)('.') - PsiElement(MUL)('*') - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n\n ') - CLASS - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('Foo') - PsiWhiteSpace(' ') - TYPE_PARAMETER_LIST - - CLASS_BODY - PsiElement(LBRACE)('{') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('bar') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - NAMESPACE_BODY - CLASS - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('Bar') - PsiWhiteSpace(' ') - TYPE_PARAMETER_LIST - - CLASS_BODY - PsiElement(LBRACE)('{') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('ns') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - NAMESPACE_BODY - CLASS - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('X') - PsiWhiteSpace('\n\n ') - TYPE_PARAMETER_LIST - - CLASS - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('Y') - PsiWhiteSpace('\n ') - TYPE_PARAMETER_LIST - - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n\n') - CLASS - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('Bar') - TYPE_PARAMETER_LIST - PsiElement(LT)('<') - TYPE_PARAMETER - PsiElement(IDENTIFIER)('T') - PsiElement(GT)('>') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n') - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('foo') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - NAMESPACE_BODY - - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n') - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('bar') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - NAMESPACE_BODY - IMPORT_DIRECTIVE - PsiElement(import)('import') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('sdf') - PsiWhiteSpace('\n\n') - PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/testData/psi/NamespaceBlockFirst.txt b/compiler/testData/psi/NamespaceBlockFirst.txt index fcb33b0afae..8c3fb55c619 100644 --- a/compiler/testData/psi/NamespaceBlockFirst.txt +++ b/compiler/testData/psi/NamespaceBlockFirst.txt @@ -2,37 +2,43 @@ JetFile: NamespaceBlockFirst.jet NAMESPACE NAMESPACE_HEADER - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('foobar') - PsiWhiteSpace(' ') + PsiErrorElement:Expecting namespace or top level declaration + PsiElement(namespace)('package') + PsiWhiteSpace(' ') + MODIFIER_LIST + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foobar') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting namespace or top level declaration PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - NAMESPACE_BODY - PROPERTY - PsiElement(val)('val') - PsiWhiteSpace(' ') + PsiWhiteSpace('\n ') + PROPERTY + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + INTEGER_CONSTANT + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace('\n ') + PROPERTY + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + DOT_QUALIFIED_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foobar') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace('\n ') - PROPERTY - PsiElement(val)('val') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - DOT_QUALIFIED_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foobar') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace('\n') + PsiWhiteSpace('\n') + PsiErrorElement:Expecting namespace or top level declaration PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/testData/psi/NamespaceBlock_ERR.jet b/compiler/testData/psi/NamespaceBlock_ERR.jet deleted file mode 100644 index a22d5edaa88..00000000000 --- a/compiler/testData/psi/NamespaceBlock_ERR.jet +++ /dev/null @@ -1,42 +0,0 @@ -package foo.bar.goo - -import foo as -import foo. -import foo.bar. -import foo. as bar - -package foof { - import foo.bar.* as bar - import foo as ; - import foo. ; - import foo.bar. ; - import foo. as bar ; - import foo.bar.* as bar ; - import foo.bar.* as ; - - package foo - - class Foo {} - package { - class Bar {} - - package ns { - class X - - class Y - } - } -} - -dsfgd - -class Bar {} - -package foo - -package {} - -package bar { - import sdf - -} \ No newline at end of file diff --git a/compiler/testData/psi/NamespaceBlock_ERR.txt b/compiler/testData/psi/NamespaceBlock_ERR.txt deleted file mode 100644 index 8d418eb0f6c..00000000000 --- a/compiler/testData/psi/NamespaceBlock_ERR.txt +++ /dev/null @@ -1,318 +0,0 @@ -JetFile: NamespaceBlock_ERR.jet - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('goo') - PsiWhiteSpace('\n\n') - IMPORT_DIRECTIVE - PsiElement(import)('import') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiWhiteSpace(' ') - PsiElement(as)('as') - PsiWhiteSpace('\n') - PsiElement(IDENTIFIER)('import') - PsiWhiteSpace(' ') - NAMESPACE - MODIFIER_LIST - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - PsiWhiteSpace('\n') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('import') - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - USER_TYPE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - PsiElement(DOT)('.') - PsiWhiteSpace('\n') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('import') - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiErrorElement:Expecting type name - PsiElement(as)('as') - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - PsiWhiteSpace('\n\n') - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('foof') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - NAMESPACE_BODY - IMPORT_DIRECTIVE - PsiElement(import)('import') - PsiWhiteSpace(' ') - DOT_QUALIFIED_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - PsiElement(DOT)('.') - PsiElement(MUL)('*') - PsiWhiteSpace(' ') - PsiErrorElement:Cannot rename a all imported items to one identifier - PsiElement(as)('as') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('bar') - PsiWhiteSpace('\n ') - IMPORT_DIRECTIVE - PsiElement(import)('import') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiWhiteSpace(' ') - PsiElement(as)('as') - PsiErrorElement:Expecting identifier - - PsiWhiteSpace(' ') - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n ') - IMPORT_DIRECTIVE - PsiElement(import)('import') - PsiWhiteSpace(' ') - DOT_QUALIFIED_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiErrorElement:Qualified name must be a '.'-separated identifier list - - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n ') - IMPORT_DIRECTIVE - PsiElement(import)('import') - PsiWhiteSpace(' ') - DOT_QUALIFIED_EXPRESSION - DOT_QUALIFIED_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - PsiElement(DOT)('.') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiErrorElement:Qualified name must be a '.'-separated identifier list - - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n ') - IMPORT_DIRECTIVE - PsiElement(import)('import') - PsiWhiteSpace(' ') - DOT_QUALIFIED_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiErrorElement:Qualified name must be a '.'-separated identifier list - - PsiElement(as)('as') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('bar') - PsiWhiteSpace(' ') - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n ') - IMPORT_DIRECTIVE - PsiElement(import)('import') - PsiWhiteSpace(' ') - DOT_QUALIFIED_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - PsiElement(DOT)('.') - PsiElement(MUL)('*') - PsiWhiteSpace(' ') - PsiErrorElement:Cannot rename a all imported items to one identifier - PsiElement(as)('as') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('bar') - PsiWhiteSpace(' ') - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n ') - IMPORT_DIRECTIVE - PsiElement(import)('import') - PsiWhiteSpace(' ') - DOT_QUALIFIED_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - PsiElement(DOT)('.') - PsiElement(MUL)('*') - PsiWhiteSpace(' ') - PsiErrorElement:Cannot rename a all imported items to one identifier - PsiElement(as)('as') - PsiWhiteSpace(' ') - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n\n ') - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('foo') - PsiErrorElement:A namespace block in '{...}' expected - - PsiWhiteSpace('\n\n ') - CLASS - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('Foo') - PsiWhiteSpace(' ') - TYPE_PARAMETER_LIST - - CLASS_BODY - PsiElement(LBRACE)('{') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiErrorElement:Expecting namespace name - - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - NAMESPACE_BODY - CLASS - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('Bar') - PsiWhiteSpace(' ') - TYPE_PARAMETER_LIST - - CLASS_BODY - PsiElement(LBRACE)('{') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('ns') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - NAMESPACE_BODY - CLASS - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('X') - PsiWhiteSpace('\n\n ') - TYPE_PARAMETER_LIST - - CLASS - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('Y') - PsiWhiteSpace('\n ') - TYPE_PARAMETER_LIST - - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n') - CLASS - MODIFIER_LIST - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('dsfgd') - PsiWhiteSpace('\n\n') - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('Bar') - TYPE_PARAMETER_LIST - PsiElement(LT)('<') - TYPE_PARAMETER - PsiElement(IDENTIFIER)('T') - PsiElement(GT)('>') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n') - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('foo') - PsiErrorElement:A namespace block in '{...}' expected - - PsiWhiteSpace('\n\n') - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiErrorElement:Expecting namespace name - - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - NAMESPACE_BODY - - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n') - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('bar') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - NAMESPACE_BODY - IMPORT_DIRECTIVE - PsiElement(import)('import') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('sdf') - PsiWhiteSpace('\n\n') - PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/testData/psi/NamespaceModifiers.jet b/compiler/testData/psi/NamespaceModifiers.jet index de65a560b82..ebb056dda85 100644 --- a/compiler/testData/psi/NamespaceModifiers.jet +++ b/compiler/testData/psi/NamespaceModifiers.jet @@ -1,9 +1 @@ -public [a] package name; - -[a] package a { - val foo - - private package b { - - } -} \ No newline at end of file +public [a] package name \ No newline at end of file diff --git a/compiler/testData/psi/NamespaceModifiers.txt b/compiler/testData/psi/NamespaceModifiers.txt index 67db2bc7e0c..222d0a86884 100644 --- a/compiler/testData/psi/NamespaceModifiers.txt +++ b/compiler/testData/psi/NamespaceModifiers.txt @@ -16,47 +16,4 @@ JetFile: NamespaceModifiers.jet PsiWhiteSpace(' ') PsiElement(namespace)('package') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('name') - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n\n') - NAMESPACE - MODIFIER_LIST - ANNOTATION - PsiElement(LBRACKET)('[') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiElement(RBRACKET)(']') - PsiWhiteSpace(' ') - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - NAMESPACE_BODY - PROPERTY - PsiElement(val)('val') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('foo') - PsiWhiteSpace('\n\n ') - NAMESPACE - MODIFIER_LIST - PsiElement(private)('private') - PsiWhiteSpace(' ') - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n\n ') - NAMESPACE_BODY - - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n') - PsiElement(RBRACE)('}') \ No newline at end of file + PsiElement(IDENTIFIER)('name') \ No newline at end of file diff --git a/compiler/testData/psi/RootNamespace.txt b/compiler/testData/psi/RootNamespace.txt index 1fd3472ebed..9ca9315f7cf 100644 --- a/compiler/testData/psi/RootNamespace.txt +++ b/compiler/testData/psi/RootNamespace.txt @@ -16,112 +16,119 @@ JetFile: RootNamespace.jet PsiWhiteSpace('\n\n') TYPE_PARAMETER_LIST - NAMESPACE - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('bar') - PsiWhiteSpace(' ') + PsiErrorElement:Expecting namespace or top level declaration + PsiElement(namespace)('package') + PsiWhiteSpace(' ') + MODIFIER_LIST + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting namespace or top level declaration PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - NAMESPACE_BODY - FUN - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('foo') - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - BLOCK - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') + PsiWhiteSpace('\n ') + FUN + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('foo') + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + DOT_QUALIFIED_EXPRESSION + DOT_QUALIFIED_EXPRESSION DOT_QUALIFIED_EXPRESSION - DOT_QUALIFIED_EXPRESSION - DOT_QUALIFIED_EXPRESSION - ROOT_NAMESPACE - PsiElement(namespace)('package') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') + ROOT_NAMESPACE + PsiElement(namespace)('package') PsiElement(DOT)('.') REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('X') - PsiWhiteSpace('\n ') + PsiElement(IDENTIFIER)('foo') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('X') + PsiWhiteSpace('\n ') + DOT_QUALIFIED_EXPRESSION + DOT_QUALIFIED_EXPRESSION DOT_QUALIFIED_EXPRESSION - DOT_QUALIFIED_EXPRESSION - DOT_QUALIFIED_EXPRESSION - ROOT_NAMESPACE - PsiElement(namespace)('package') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') + ROOT_NAMESPACE + PsiElement(namespace)('package') PsiElement(DOT)('.') - CALL_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('X') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - WHEN - PsiElement(when)('when') - PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') + PsiElement(DOT)('.') + CALL_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('X') + VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('e') PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + WHEN + PsiElement(when)('when') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('e') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + WHEN_ENTRY + WHEN_CONDITION_IS_PATTERN + PsiElement(is)('is') PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - WHEN_ENTRY - WHEN_CONDITION_IS_PATTERN - PsiElement(is)('is') - PsiWhiteSpace(' ') - DECOMPOSER_PATTERN + DECOMPOSER_PATTERN + DOT_QUALIFIED_EXPRESSION + DOT_QUALIFIED_EXPRESSION DOT_QUALIFIED_EXPRESSION - DOT_QUALIFIED_EXPRESSION - DOT_QUALIFIED_EXPRESSION - ROOT_NAMESPACE - PsiElement(namespace)('package') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') + ROOT_NAMESPACE + PsiElement(namespace)('package') PsiElement(DOT)('.') REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('X') - PsiWhiteSpace(' ') - DECOMPOSER_ARGUMENT_LIST - PsiElement(HASH)('#') - PsiElement(LPAR)('(') - TUPLE_PATTERN_ENTRY - TYPE_PATTERN - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('x') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - PsiElement(ARROW)('->') - PsiWhiteSpace(' ') - BLOCK - PsiElement(LBRACE)('{') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') + PsiElement(IDENTIFIER)('foo') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') + PsiElement(DOT)('.') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('X') + PsiWhiteSpace(' ') + DECOMPOSER_ARGUMENT_LIST + PsiElement(HASH)('#') + PsiElement(LPAR)('(') + TUPLE_PATTERN_ENTRY + TYPE_PATTERN + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('x') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiElement(ARROW)('->') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n') + PsiErrorElement:Expecting namespace or top level declaration PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/testData/psi/ShortAnnotations.jet b/compiler/testData/psi/ShortAnnotations.jet index e6137d0a754..3109d77a93c 100644 --- a/compiler/testData/psi/ShortAnnotations.jet +++ b/compiler/testData/psi/ShortAnnotations.jet @@ -1,6 +1,5 @@ foo bar(1) buzz(1) zoo package aa -foo bar(1) buzz(1) zoo package a {} foo bar(1) buzz(1) zoo class A foo bar(1) buzz(1) zoo object B foo bar(1) buzz(1) zoo fun a() {} diff --git a/compiler/testData/psi/ShortAnnotations.txt b/compiler/testData/psi/ShortAnnotations.txt index a559bce1ddd..8885d7cc0eb 100644 --- a/compiler/testData/psi/ShortAnnotations.txt +++ b/compiler/testData/psi/ShortAnnotations.txt @@ -54,66 +54,6 @@ JetFile: ShortAnnotations.jet PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('aa') PsiWhiteSpace('\n\n') - NAMESPACE - MODIFIER_LIST - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('buzz') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - TYPE_PROJECTION - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('T') - PsiElement(GT)('>') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('zoo') - PsiWhiteSpace(' ') - NAMESPACE_HEADER - PsiElement(namespace)('package') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - PsiElement(LBRACE)('{') - NAMESPACE_BODY - - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n') CLASS MODIFIER_LIST ANNOTATION_ENTRY diff --git a/idea/testData/checker/RecursiveTypeInference.jet b/idea/testData/checker/RecursiveTypeInference.jet index 8ea96b5c198..fff8972fd72 100644 --- a/idea/testData/checker/RecursiveTypeInference.jet +++ b/idea/testData/checker/RecursiveTypeInference.jet @@ -1,19 +1,19 @@ //package a { val afoo = abar() - fun bar() = foo -} + fun abar() = afoo +//} //package b { fun bfoo() = bbar() - fun bar() = foo() -} + fun bbar() = bfoo() +//} //package c { fun cbazz() = cbar() - fun foo() = bazz() + fun cfoo() = cbazz() fun cbar() = cfoo() //}