diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/CodegenUtil.java b/compiler/backend/src/org/jetbrains/jet/codegen/CodegenUtil.java index fc16f243eab..e597e5967aa 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/CodegenUtil.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/CodegenUtil.java @@ -4,15 +4,13 @@ import com.intellij.psi.util.PsiTreeUtil; import gnu.trove.THashSet; import org.jetbrains.jet.lang.descriptors.*; import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor; -import org.jetbrains.jet.lang.psi.JetClass; -import org.jetbrains.jet.lang.psi.JetNamedDeclaration; -import org.jetbrains.jet.lang.psi.JetNamespace; +import org.jetbrains.jet.lang.psi.*; import org.jetbrains.jet.lang.resolve.calls.ExpressionAsFunctionDescriptor; -import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor; import org.jetbrains.jet.lang.types.JetStandardClasses; import org.jetbrains.jet.lang.types.JetType; import java.util.Collections; +import java.util.Iterator; import java.util.List; import java.util.Set; @@ -115,10 +113,22 @@ public class CodegenUtil { if (parent != null) { String parentFQName = getFQName(parent); if (parentFQName.length() > 0) { - return parentFQName + "." + jetNamespace.getName(); + return parentFQName + "." + getFQName(jetNamespace.getHeader()); } } - return jetNamespace.getName(); // TODO: Must include module root namespace + return getFQName(jetNamespace.getHeader()); // TODO: Must include module root namespace + } + + private static String getFQName(JetNamespaceHeader header) { + StringBuilder builder = new StringBuilder(); + for (Iterator iterator = header.getParentNamespaceNames().iterator(); iterator.hasNext(); ) { + JetSimpleNameExpression nameExpression = iterator.next(); + builder.append(nameExpression.getReferencedName()); + builder.append("."); + } +// PsiElement nameIdentifier = header.getNameIdentifier(); + builder.append(header.getName()); + return builder.toString(); } public static String getFQName(JetClass jetClass) { diff --git a/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java b/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java index 0f694b7e8e5..eebdbc8085e 100644 --- a/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java +++ b/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java @@ -142,5 +142,5 @@ public interface JetNodeTypes { JetNodeType WHEN_CONDITION_IN_RANGE = new JetNodeType("WHEN_CONDITION_IN_RANGE", JetWhenConditionInRange.class); JetNodeType WHEN_CONDITION_IS_PATTERN = new JetNodeType("WHEN_CONDITION_IS_PATTERN", JetWhenConditionIsPattern.class); - JetNodeType NAMESPACE_NAME = new JetNodeType("NAMESPACE_NAME", JetContainerNode.class); + JetNodeType NAMESPACE_HEADER = new JetNodeType("NAMESPACE_HEADER", JetNamespaceHeader.class); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetParsing.java b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetParsing.java index 814752f7eaa..479849c88c7 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetParsing.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetParsing.java @@ -115,17 +115,18 @@ public class JetParsing extends AbstractJetParsing { * : modifiers "namespace" SimpleName{"."} SEMI? * ; */ + PsiBuilder.Marker namespaceHeader = mark(); PsiBuilder.Marker firstEntry = mark(); parseModifierList(MODIFIER_LIST, true); if (at(NAMESPACE_KEYWORD)) { advance(); // NAMESPACE_KEYWORD - parseNamespaceName(); if (at(LBRACE)) { // Because it's blocked namespace and it will be parsed as one of top level objects firstEntry.rollbackTo(); + namespaceHeader.done(NAMESPACE_HEADER); return; } @@ -135,6 +136,7 @@ public class JetParsing extends AbstractJetParsing { } else { firstEntry.rollbackTo(); } + namespaceHeader.done(NAMESPACE_HEADER); // TODO: Duplicate with parsing imports in parseToplevelDeclarations while (at(IMPORT_KEYWORD)) { @@ -145,12 +147,18 @@ public class JetParsing extends AbstractJetParsing { /* SimpleName{"."} */ private void parseNamespaceName() { PsiBuilder.Marker nsName = mark(); - expect(IDENTIFIER, "Expecting qualified name", NAMESPACE_NAME_RECOVERY_SET); - while (!eol() && at(DOT)) { - advance(); // DOT + while (true) { expect(IDENTIFIER, "Namespace name must be a '.'-separated identifier list", NAMESPACE_NAME_RECOVERY_SET); + if (at(DOT)) { + nsName.done(REFERENCE_EXPRESSION); + advance(); // DOT + nsName = mark(); + } + else { + nsName.drop(); + break; + } } - nsName.done(NAMESPACE_NAME); } /* @@ -378,6 +386,7 @@ public class JetParsing extends AbstractJetParsing { */ private JetNodeType parseNamespaceBlock() { assert _at(NAMESPACE_KEYWORD); + PsiBuilder.Marker namespaceHeader = mark(); advance(); // NAMESPACE_KEYWORD if (at(LBRACE)) { @@ -386,6 +395,7 @@ public class JetParsing extends AbstractJetParsing { else { parseNamespaceName(); } + namespaceHeader.done(NAMESPACE_HEADER); if (!at(LBRACE)) { error("A namespace block in '{...}' expected"); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetAnnotatedExpression.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetAnnotatedExpression.java index 139b9c20cba..66584c33157 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetAnnotatedExpression.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetAnnotatedExpression.java @@ -2,6 +2,7 @@ package org.jetbrains.jet.lang.psi; import com.intellij.lang.ASTNode; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.JetNodeTypes; import java.util.ArrayList; @@ -26,6 +27,7 @@ public class JetAnnotatedExpression extends JetExpression { return visitor.visitAnnotatedExpression(this, data); } + @Nullable public JetExpression getBaseExpression() { return findChildByClass(JetExpression.class); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamespace.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamespace.java index 7be4847303e..aa82f6a2b35 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamespace.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamespace.java @@ -39,18 +39,23 @@ public class JetNamespace extends JetNamedDeclaration { } public String getName() { - PsiElement nameIdentifier = getNameIdentifier(); - return nameIdentifier != null ? nameIdentifier.getText() : ""; + String name = super.getName(); + return name == null ? "" : name; + } + + @NotNull + public JetNamespaceHeader getHeader() { + return (JetNamespaceHeader) findChildByType(JetNodeTypes.NAMESPACE_HEADER); } @Override public PsiElement getNameIdentifier() { - return findChildByType(JetNodeTypes.NAMESPACE_NAME); + return getHeader().getNameIdentifier(); } @Override public PsiElement setName(@NonNls @NotNull String name) throws IncorrectOperationException { - throw new UnsupportedOperationException(); // TODO + throw new UnsupportedOperationException(); } } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamespaceHeader.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamespaceHeader.java new file mode 100644 index 00000000000..c2f113fa3b7 --- /dev/null +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamespaceHeader.java @@ -0,0 +1,35 @@ +package org.jetbrains.jet.lang.psi; + +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElement; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.jet.JetNodeTypes; +import org.jetbrains.jet.lexer.JetTokens; + +import java.util.List; + +/** + * @author abreslav + */ +public class JetNamespaceHeader extends JetElement { + public JetNamespaceHeader(@NotNull ASTNode node) { + super(node); + } + + @NotNull + public List getParentNamespaceNames() { + return findChildrenByType(JetNodeTypes.REFERENCE_EXPRESSION); + } + + @Nullable + public PsiElement getNameIdentifier() { + return findChildByType(JetTokens.IDENTIFIER); + } + + @Override + public String getName() { + PsiElement nameIdentifier = getNameIdentifier(); + return nameIdentifier == null ? "" : nameIdentifier.getText(); + } +} diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TypeHierarchyResolver.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TypeHierarchyResolver.java index 2585e655d35..61d117433f4 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TypeHierarchyResolver.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TypeHierarchyResolver.java @@ -69,19 +69,7 @@ public class TypeHierarchyResolver { declaration.accept(new JetVisitorVoid() { @Override public void visitNamespace(JetNamespace namespace) { - String name = JetPsiUtil.safeName(namespace.getName()); - - NamespaceDescriptorImpl namespaceDescriptor = owner.getNamespace(name); - if (namespaceDescriptor == null) { - namespaceDescriptor = new NamespaceDescriptorImpl( - owner.getOriginal(), - Collections.emptyList(), // TODO: annotations - name - ); - namespaceDescriptor.initialize(new WritableScopeImpl(JetScope.EMPTY, namespaceDescriptor, new TraceBasedRedeclarationHandler(context.getTrace())).setDebugName("Namespace member scope")); - owner.addNamespace(namespaceDescriptor); - context.getTrace().record(BindingContext.NAMESPACE, namespace, namespaceDescriptor); - } + NamespaceDescriptorImpl namespaceDescriptor = createNamespaceDescriptorPathIfNeeded(namespace, owner); context.getNamespaceDescriptors().put(namespace, namespaceDescriptor); WriteThroughScope namespaceScope = new WriteThroughScope(outerScope, namespaceDescriptor.getMemberScope(), new TraceBasedRedeclarationHandler(context.getTrace())); @@ -202,6 +190,35 @@ public class TypeHierarchyResolver { } } + private NamespaceDescriptorImpl createNamespaceDescriptorPathIfNeeded(JetNamespace namespace, NamespaceLike owner) { + NamespaceLike currentOwner = owner; + for (JetSimpleNameExpression nameExpression : namespace.getHeader().getParentNamespaceNames()) { + currentOwner = createNamespaceDescriptorIfNeeded(null, currentOwner, JetPsiUtil.safeName(nameExpression.getReferencedName())); + context.getTrace().record(REFERENCE_TARGET, nameExpression, currentOwner); + } + + String name = JetPsiUtil.safeName(namespace.getName()); + return createNamespaceDescriptorIfNeeded(namespace, currentOwner, name); + } + + @NotNull + private NamespaceDescriptorImpl createNamespaceDescriptorIfNeeded(@Nullable JetNamespace namespace, @NotNull NamespaceLike owner, @NotNull String name) { + NamespaceDescriptorImpl namespaceDescriptor = owner.getNamespace(name); + if (namespaceDescriptor == null) { + namespaceDescriptor = new NamespaceDescriptorImpl( + owner.getOriginal(), + Collections.emptyList(), // TODO: annotations + name + ); + namespaceDescriptor.initialize(new WritableScopeImpl(JetScope.EMPTY, namespaceDescriptor, new TraceBasedRedeclarationHandler(context.getTrace())).setDebugName("Namespace member scope")); + owner.addNamespace(namespaceDescriptor); + if (namespace != null) { + context.getTrace().record(BindingContext.NAMESPACE, namespace, namespaceDescriptor); + } + } + return namespaceDescriptor; + } + @NotNull private ClassKind getClassKind(@NotNull JetClass jetClass) { if (jetClass.isTrait()) return ClassKind.TRAIT; diff --git a/compiler/testData/checkerWithErrorTypes/quick/regressions/kt691.jet b/compiler/testData/checkerWithErrorTypes/quick/regressions/kt691.jet new file mode 100644 index 00000000000..e7194b099c9 --- /dev/null +++ b/compiler/testData/checkerWithErrorTypes/quick/regressions/kt691.jet @@ -0,0 +1,2 @@ +// KT-691 Allow to create nested namespaces with dot delimiter +namespace foo.bar.buz \ No newline at end of file diff --git a/compiler/testData/psi/AnnotatedExpressions.txt b/compiler/testData/psi/AnnotatedExpressions.txt index ff61f69c15d..e7be13766ce 100644 --- a/compiler/testData/psi/AnnotatedExpressions.txt +++ b/compiler/testData/psi/AnnotatedExpressions.txt @@ -1,5 +1,7 @@ JetFile: AnnotatedExpressions.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/AnonymousInitializer.txt b/compiler/testData/psi/AnonymousInitializer.txt index 5ef0ef3d0a3..cd55dd9b27c 100644 --- a/compiler/testData/psi/AnonymousInitializer.txt +++ b/compiler/testData/psi/AnonymousInitializer.txt @@ -1,5 +1,7 @@ JetFile: AnonymousInitializer.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/Attributes.txt b/compiler/testData/psi/Attributes.txt index 150a51c535c..6cb067b94eb 100644 --- a/compiler/testData/psi/Attributes.txt +++ b/compiler/testData/psi/Attributes.txt @@ -1,11 +1,13 @@ JetFile: Attributes.jet NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME - PsiElement(IDENTIFIER)('foo') + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('bar') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') PsiElement(DOT)('.') PsiElement(IDENTIFIER)('goo') PsiWhiteSpace('\n\n') diff --git a/compiler/testData/psi/AttributesOnPatterns.txt b/compiler/testData/psi/AttributesOnPatterns.txt index a20e639e803..545e0b1f3b1 100644 --- a/compiler/testData/psi/AttributesOnPatterns.txt +++ b/compiler/testData/psi/AttributesOnPatterns.txt @@ -1,5 +1,7 @@ JetFile: AttributesOnPatterns.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/Attributes_ERR.txt b/compiler/testData/psi/Attributes_ERR.txt index 99f597d7dc9..0f8116df665 100644 --- a/compiler/testData/psi/Attributes_ERR.txt +++ b/compiler/testData/psi/Attributes_ERR.txt @@ -1,11 +1,13 @@ JetFile: Attributes_ERR.jet NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME - PsiElement(IDENTIFIER)('foo') + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('bar') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') PsiElement(DOT)('.') PsiElement(IDENTIFIER)('goo') PsiWhiteSpace('\n\n') diff --git a/compiler/testData/psi/BabySteps.txt b/compiler/testData/psi/BabySteps.txt index 959b9d0b58b..fbdf8deeafb 100644 --- a/compiler/testData/psi/BabySteps.txt +++ b/compiler/testData/psi/BabySteps.txt @@ -1,8 +1,8 @@ JetFile: BabySteps.jet NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('foo') PsiWhiteSpace('\n\n') CLASS diff --git a/compiler/testData/psi/BabySteps_ERR.txt b/compiler/testData/psi/BabySteps_ERR.txt index b6c52df6421..9f0a5ea788b 100644 --- a/compiler/testData/psi/BabySteps_ERR.txt +++ b/compiler/testData/psi/BabySteps_ERR.txt @@ -1,8 +1,8 @@ JetFile: BabySteps_ERR.jet NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('foo') PsiWhiteSpace('\n\n') CLASS diff --git a/compiler/testData/psi/ByCaluses.txt b/compiler/testData/psi/ByCaluses.txt index f4e7ac5c5ef..0778b080397 100644 --- a/compiler/testData/psi/ByCaluses.txt +++ b/compiler/testData/psi/ByCaluses.txt @@ -1,5 +1,7 @@ JetFile: ByCaluses.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/CallWithManyClosures.txt b/compiler/testData/psi/CallWithManyClosures.txt index cfa70841880..d7516b299ae 100644 --- a/compiler/testData/psi/CallWithManyClosures.txt +++ b/compiler/testData/psi/CallWithManyClosures.txt @@ -1,5 +1,7 @@ JetFile: CallWithManyClosures.jet NAMESPACE + NAMESPACE_HEADER + PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/CallsInWhen.txt b/compiler/testData/psi/CallsInWhen.txt index c3992ac542b..4bde9526e87 100644 --- a/compiler/testData/psi/CallsInWhen.txt +++ b/compiler/testData/psi/CallsInWhen.txt @@ -1,5 +1,7 @@ JetFile: CallsInWhen.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/Constructors.txt b/compiler/testData/psi/Constructors.txt index 399347a748b..1a133292303 100644 --- a/compiler/testData/psi/Constructors.txt +++ b/compiler/testData/psi/Constructors.txt @@ -1,5 +1,7 @@ JetFile: Constructors.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/ControlStructures.txt b/compiler/testData/psi/ControlStructures.txt index 8b7e70fd7d0..7f0b690968b 100644 --- a/compiler/testData/psi/ControlStructures.txt +++ b/compiler/testData/psi/ControlStructures.txt @@ -1,5 +1,7 @@ JetFile: ControlStructures.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/EOLsInComments.txt b/compiler/testData/psi/EOLsInComments.txt index c74b9a17704..5aed3791303 100644 --- a/compiler/testData/psi/EOLsInComments.txt +++ b/compiler/testData/psi/EOLsInComments.txt @@ -1,5 +1,7 @@ JetFile: EOLsInComments.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/EOLsOnRollback.txt b/compiler/testData/psi/EOLsOnRollback.txt index 57452bcd20b..6e085ffa275 100644 --- a/compiler/testData/psi/EOLsOnRollback.txt +++ b/compiler/testData/psi/EOLsOnRollback.txt @@ -1,5 +1,7 @@ JetFile: EOLsOnRollback.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/EmptyFile.txt b/compiler/testData/psi/EmptyFile.txt index 9cc81e6e40b..3630ef98bd5 100644 --- a/compiler/testData/psi/EmptyFile.txt +++ b/compiler/testData/psi/EmptyFile.txt @@ -1,3 +1,4 @@ JetFile: EmptyFile.jet NAMESPACE - \ No newline at end of file + NAMESPACE_HEADER + \ No newline at end of file diff --git a/compiler/testData/psi/Enums.txt b/compiler/testData/psi/Enums.txt index 0d99c824222..dfadca48ef1 100644 --- a/compiler/testData/psi/Enums.txt +++ b/compiler/testData/psi/Enums.txt @@ -1,5 +1,7 @@ JetFile: Enums.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(enum)('enum') diff --git a/compiler/testData/psi/Expressions_ERR.txt b/compiler/testData/psi/Expressions_ERR.txt index 456496b2c99..a9b043e82a6 100644 --- a/compiler/testData/psi/Expressions_ERR.txt +++ b/compiler/testData/psi/Expressions_ERR.txt @@ -1,5 +1,7 @@ JetFile: Expressions_ERR.jet NAMESPACE + NAMESPACE_HEADER + PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/FileStart_ERR.txt b/compiler/testData/psi/FileStart_ERR.txt index c1c82dcfa0e..87894ee76dd 100644 --- a/compiler/testData/psi/FileStart_ERR.txt +++ b/compiler/testData/psi/FileStart_ERR.txt @@ -1,12 +1,15 @@ JetFile: FileStart_ERR.jet NAMESPACE + NAMESPACE_HEADER + PsiErrorElement:Expecting namespace or top level declaration PsiElement(DIV)('/') NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME - PsiElement(IDENTIFIER)('foo') + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') PsiElement(DOT)('.') PsiElement(IDENTIFIER)('bar') PsiErrorElement:A namespace block in '{...}' expected diff --git a/compiler/testData/psi/FunctionCalls.txt b/compiler/testData/psi/FunctionCalls.txt index c41151760ca..94f67c99444 100644 --- a/compiler/testData/psi/FunctionCalls.txt +++ b/compiler/testData/psi/FunctionCalls.txt @@ -1,5 +1,7 @@ JetFile: FunctionCalls.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/FunctionLiterals.txt b/compiler/testData/psi/FunctionLiterals.txt index 134e6ffc835..7bf48210b76 100644 --- a/compiler/testData/psi/FunctionLiterals.txt +++ b/compiler/testData/psi/FunctionLiterals.txt @@ -1,5 +1,7 @@ JetFile: FunctionLiterals.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/FunctionLiterals_ERR.txt b/compiler/testData/psi/FunctionLiterals_ERR.txt index 846d93a7a81..36f5a5db19b 100644 --- a/compiler/testData/psi/FunctionLiterals_ERR.txt +++ b/compiler/testData/psi/FunctionLiterals_ERR.txt @@ -1,5 +1,7 @@ JetFile: FunctionLiterals_ERR.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/FunctionTypes.txt b/compiler/testData/psi/FunctionTypes.txt index 1031efe47ac..47e8aa32ae6 100644 --- a/compiler/testData/psi/FunctionTypes.txt +++ b/compiler/testData/psi/FunctionTypes.txt @@ -1,5 +1,7 @@ JetFile: FunctionTypes.jet NAMESPACE + NAMESPACE_HEADER + TYPEDEF PsiElement(type)('type') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/FunctionTypes_ERR.txt b/compiler/testData/psi/FunctionTypes_ERR.txt index 2278bfb4388..80d5db63e38 100644 --- a/compiler/testData/psi/FunctionTypes_ERR.txt +++ b/compiler/testData/psi/FunctionTypes_ERR.txt @@ -1,5 +1,7 @@ JetFile: FunctionTypes_ERR.jet NAMESPACE + NAMESPACE_HEADER + TYPEDEF PsiElement(type)('type') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/Functions.txt b/compiler/testData/psi/Functions.txt index 811bf8d332c..9626affdd1a 100644 --- a/compiler/testData/psi/Functions.txt +++ b/compiler/testData/psi/Functions.txt @@ -1,5 +1,7 @@ JetFile: Functions.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/Functions_ERR.txt b/compiler/testData/psi/Functions_ERR.txt index 03213365ddb..9ed648f699f 100644 --- a/compiler/testData/psi/Functions_ERR.txt +++ b/compiler/testData/psi/Functions_ERR.txt @@ -1,5 +1,7 @@ JetFile: Functions_ERR.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/HangOnLonelyModifier.txt b/compiler/testData/psi/HangOnLonelyModifier.txt index 954cac7d2e8..6db3474d4f1 100644 --- a/compiler/testData/psi/HangOnLonelyModifier.txt +++ b/compiler/testData/psi/HangOnLonelyModifier.txt @@ -1,5 +1,7 @@ JetFile: HangOnLonelyModifier.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/IfWithPropery.txt b/compiler/testData/psi/IfWithPropery.txt index 6e3d344b660..96405038e50 100644 --- a/compiler/testData/psi/IfWithPropery.txt +++ b/compiler/testData/psi/IfWithPropery.txt @@ -1,5 +1,7 @@ JetFile: IfWithPropery.jet NAMESPACE + NAMESPACE_HEADER + PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/ImportSoftKW.txt b/compiler/testData/psi/ImportSoftKW.txt index fced8d0f720..ca54b63c6c6 100644 --- a/compiler/testData/psi/ImportSoftKW.txt +++ b/compiler/testData/psi/ImportSoftKW.txt @@ -1,5 +1,7 @@ JetFile: ImportSoftKW.jet NAMESPACE + NAMESPACE_HEADER + IMPORT_DIRECTIVE PsiElement(import)('import') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/Imports.txt b/compiler/testData/psi/Imports.txt index 15bdd19d078..b80711ff1a2 100644 --- a/compiler/testData/psi/Imports.txt +++ b/compiler/testData/psi/Imports.txt @@ -1,11 +1,13 @@ JetFile: Imports.jet NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME - PsiElement(IDENTIFIER)('foo') + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('bar') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') PsiElement(DOT)('.') PsiElement(IDENTIFIER)('goo') PsiWhiteSpace('\n\n') diff --git a/compiler/testData/psi/Imports_ERR.txt b/compiler/testData/psi/Imports_ERR.txt index 5ad833b88df..7e96a0f9b6a 100644 --- a/compiler/testData/psi/Imports_ERR.txt +++ b/compiler/testData/psi/Imports_ERR.txt @@ -1,11 +1,13 @@ JetFile: Imports_ERR.jet NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME - PsiElement(IDENTIFIER)('foo') + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('bar') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') PsiElement(DOT)('.') PsiElement(IDENTIFIER)('goo') PsiWhiteSpace('\n\n') diff --git a/compiler/testData/psi/Labels.txt b/compiler/testData/psi/Labels.txt index 118356f871c..0a6972637ed 100644 --- a/compiler/testData/psi/Labels.txt +++ b/compiler/testData/psi/Labels.txt @@ -1,5 +1,7 @@ JetFile: Labels.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/LocalDeclarations.txt b/compiler/testData/psi/LocalDeclarations.txt index 67d9ad685fd..d9a4c472683 100644 --- a/compiler/testData/psi/LocalDeclarations.txt +++ b/compiler/testData/psi/LocalDeclarations.txt @@ -1,5 +1,7 @@ JetFile: LocalDeclarations.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/ModifierAsSelector.txt b/compiler/testData/psi/ModifierAsSelector.txt index 6f276e0dc0d..ccdf846073b 100644 --- a/compiler/testData/psi/ModifierAsSelector.txt +++ b/compiler/testData/psi/ModifierAsSelector.txt @@ -2,6 +2,8 @@ JetFile: ModifierAsSelector.jet PsiComment(EOL_COMMENT)('// JET-1') PsiWhiteSpace('\n\n') NAMESPACE + NAMESPACE_HEADER + PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/NamespaceBlock.txt b/compiler/testData/psi/NamespaceBlock.txt index 73f6e8c6e2d..1d32e0b59c6 100644 --- a/compiler/testData/psi/NamespaceBlock.txt +++ b/compiler/testData/psi/NamespaceBlock.txt @@ -1,11 +1,13 @@ JetFile: NamespaceBlock.jet NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME - PsiElement(IDENTIFIER)('foo') + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('bar') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') PsiElement(DOT)('.') PsiElement(IDENTIFIER)('goo') PsiWhiteSpace('\n\n') @@ -20,9 +22,9 @@ JetFile: NamespaceBlock.jet PsiElement(IDENTIFIER)('bar') PsiWhiteSpace('\n\n') NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('foof') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') @@ -53,9 +55,9 @@ JetFile: NamespaceBlock.jet PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('bar') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') @@ -73,9 +75,9 @@ JetFile: NamespaceBlock.jet PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('ns') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') @@ -116,9 +118,9 @@ JetFile: NamespaceBlock.jet PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('foo') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') @@ -127,9 +129,9 @@ JetFile: NamespaceBlock.jet PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('bar') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') diff --git a/compiler/testData/psi/NamespaceBlockFirst.txt b/compiler/testData/psi/NamespaceBlockFirst.txt index a115f637a28..daf5656d2ab 100644 --- a/compiler/testData/psi/NamespaceBlockFirst.txt +++ b/compiler/testData/psi/NamespaceBlockFirst.txt @@ -1,9 +1,11 @@ JetFile: NamespaceBlockFirst.jet NAMESPACE + NAMESPACE_HEADER + NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('foobar') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') diff --git a/compiler/testData/psi/NamespaceBlock_ERR.txt b/compiler/testData/psi/NamespaceBlock_ERR.txt index 12e6c6278ae..1675b5bb0bc 100644 --- a/compiler/testData/psi/NamespaceBlock_ERR.txt +++ b/compiler/testData/psi/NamespaceBlock_ERR.txt @@ -1,11 +1,13 @@ JetFile: NamespaceBlock_ERR.jet NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME - PsiElement(IDENTIFIER)('foo') + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('bar') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') PsiElement(DOT)('.') PsiElement(IDENTIFIER)('goo') PsiWhiteSpace('\n\n') @@ -69,9 +71,9 @@ JetFile: NamespaceBlock_ERR.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('bar') PsiWhiteSpace('\n\n') - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('foof') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') @@ -190,9 +192,9 @@ JetFile: NamespaceBlock_ERR.jet PsiElement(SEMICOLON)(';') PsiWhiteSpace('\n\n ') NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('foo') PsiErrorElement:A namespace block in '{...}' expected @@ -209,9 +211,10 @@ JetFile: NamespaceBlock_ERR.jet PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') NAMESPACE - PsiElement(namespace)('namespace') - PsiErrorElement:Expecting namespace name - + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiErrorElement:Expecting namespace name + PsiWhiteSpace(' ') PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') @@ -228,9 +231,9 @@ JetFile: NamespaceBlock_ERR.jet PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('ns') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') @@ -279,17 +282,18 @@ JetFile: NamespaceBlock_ERR.jet PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('foo') PsiErrorElement:A namespace block in '{...}' expected PsiWhiteSpace('\n\n') NAMESPACE - PsiElement(namespace)('namespace') - PsiErrorElement:Expecting namespace name - + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiErrorElement:Expecting namespace name + PsiWhiteSpace(' ') PsiElement(LBRACE)('{') NAMESPACE_BODY @@ -297,9 +301,9 @@ JetFile: NamespaceBlock_ERR.jet PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('bar') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') diff --git a/compiler/testData/psi/NamespaceModifiers.txt b/compiler/testData/psi/NamespaceModifiers.txt index c167504da98..6dc1a3459f4 100644 --- a/compiler/testData/psi/NamespaceModifiers.txt +++ b/compiler/testData/psi/NamespaceModifiers.txt @@ -1,23 +1,23 @@ JetFile: NamespaceModifiers.jet NAMESPACE - MODIFIER_LIST - PsiElement(public)('public') + NAMESPACE_HEADER + MODIFIER_LIST + PsiElement(public)('public') + PsiWhiteSpace(' ') + ANNOTATION + PsiElement(LBRACKET)('[') + ANNOTATION_ENTRY + CONSTRUCTOR_CALLEE + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiElement(RBRACKET)(']') + PsiWhiteSpace(' ') + PsiElement(namespace)('namespace') PsiWhiteSpace(' ') - ANNOTATION - PsiElement(LBRACKET)('[') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiElement(RBRACKET)(']') - PsiWhiteSpace(' ') - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME PsiElement(IDENTIFIER)('name') - PsiElement(SEMICOLON)(';') + PsiElement(SEMICOLON)(';') PsiWhiteSpace('\n\n') NAMESPACE MODIFIER_LIST @@ -31,9 +31,9 @@ JetFile: NamespaceModifiers.jet PsiElement(IDENTIFIER)('a') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') @@ -48,9 +48,9 @@ JetFile: NamespaceModifiers.jet MODIFIER_LIST PsiElement(private)('private') PsiWhiteSpace(' ') - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') diff --git a/compiler/testData/psi/NewLinesValidOperations.txt b/compiler/testData/psi/NewLinesValidOperations.txt index 22e86010779..7896a744e9e 100644 --- a/compiler/testData/psi/NewLinesValidOperations.txt +++ b/compiler/testData/psi/NewLinesValidOperations.txt @@ -1,5 +1,7 @@ JetFile: NewLinesValidOperations.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/NewlinesInParentheses.txt b/compiler/testData/psi/NewlinesInParentheses.txt index 2beb4a1aea6..95f9c053518 100644 --- a/compiler/testData/psi/NewlinesInParentheses.txt +++ b/compiler/testData/psi/NewlinesInParentheses.txt @@ -1,5 +1,7 @@ JetFile: NewlinesInParentheses.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/NotIsAndNotIn.txt b/compiler/testData/psi/NotIsAndNotIn.txt index 8d5c36ce4d1..e7c307344a7 100644 --- a/compiler/testData/psi/NotIsAndNotIn.txt +++ b/compiler/testData/psi/NotIsAndNotIn.txt @@ -1,5 +1,7 @@ JetFile: NotIsAndNotIn.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/Precedence.txt b/compiler/testData/psi/Precedence.txt index 93567f53e3b..5ba29479d36 100644 --- a/compiler/testData/psi/Precedence.txt +++ b/compiler/testData/psi/Precedence.txt @@ -1,5 +1,7 @@ JetFile: Precedence.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/PredicateExpression.txt b/compiler/testData/psi/PredicateExpression.txt index 5992038b6fa..10bd6c000e3 100644 --- a/compiler/testData/psi/PredicateExpression.txt +++ b/compiler/testData/psi/PredicateExpression.txt @@ -1,5 +1,7 @@ JetFile: PredicateExpression.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/PrimaryConstructorModifiers_ERR.txt b/compiler/testData/psi/PrimaryConstructorModifiers_ERR.txt index 090d5cf7366..29d2758db0a 100644 --- a/compiler/testData/psi/PrimaryConstructorModifiers_ERR.txt +++ b/compiler/testData/psi/PrimaryConstructorModifiers_ERR.txt @@ -1,5 +1,7 @@ JetFile: PrimaryConstructorModifiers_ERR.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/Properties.txt b/compiler/testData/psi/Properties.txt index 17287b0a841..7a28c7ad671 100644 --- a/compiler/testData/psi/Properties.txt +++ b/compiler/testData/psi/Properties.txt @@ -1,5 +1,7 @@ JetFile: Properties.jet NAMESPACE + NAMESPACE_HEADER + PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/PropertiesFollowedByInitializers.txt b/compiler/testData/psi/PropertiesFollowedByInitializers.txt index d3171c40810..d297486d1ab 100644 --- a/compiler/testData/psi/PropertiesFollowedByInitializers.txt +++ b/compiler/testData/psi/PropertiesFollowedByInitializers.txt @@ -1,5 +1,7 @@ JetFile: PropertiesFollowedByInitializers.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/Properties_ERR.txt b/compiler/testData/psi/Properties_ERR.txt index b4a8fc99fb2..7105c2c18b5 100644 --- a/compiler/testData/psi/Properties_ERR.txt +++ b/compiler/testData/psi/Properties_ERR.txt @@ -1,5 +1,7 @@ JetFile: Properties_ERR.jet NAMESPACE + NAMESPACE_HEADER + PROPERTY PsiElement(var)('var') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/QuotedIdentifiers.txt b/compiler/testData/psi/QuotedIdentifiers.txt index 43788d8c138..53cd3c4755d 100644 --- a/compiler/testData/psi/QuotedIdentifiers.txt +++ b/compiler/testData/psi/QuotedIdentifiers.txt @@ -1,5 +1,7 @@ JetFile: QuotedIdentifiers.jet NAMESPACE + NAMESPACE_HEADER + FUN MODIFIER_LIST ANNOTATION @@ -57,4 +59,4 @@ JetFile: QuotedIdentifiers.jet PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('`1`') TYPE_PARAMETER_LIST - + \ No newline at end of file diff --git a/compiler/testData/psi/RootNamespace.txt b/compiler/testData/psi/RootNamespace.txt index 4b1f87ba7ea..33f37629a7f 100644 --- a/compiler/testData/psi/RootNamespace.txt +++ b/compiler/testData/psi/RootNamespace.txt @@ -1,12 +1,13 @@ JetFile: RootNamespace.jet NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME - PsiElement(IDENTIFIER)('foo') + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') PsiElement(DOT)('.') PsiElement(IDENTIFIER)('bar') - PsiElement(SEMICOLON)(';') + PsiElement(SEMICOLON)(';') PsiWhiteSpace('\n\n') CLASS PsiElement(class)('class') @@ -16,10 +17,11 @@ JetFile: RootNamespace.jet TYPE_PARAMETER_LIST NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME - PsiElement(IDENTIFIER)('foo') + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') PsiElement(DOT)('.') PsiElement(IDENTIFIER)('bar') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/SemicolonAfterIf.txt b/compiler/testData/psi/SemicolonAfterIf.txt index fc8ce749f01..d986a16552b 100644 --- a/compiler/testData/psi/SemicolonAfterIf.txt +++ b/compiler/testData/psi/SemicolonAfterIf.txt @@ -1,5 +1,7 @@ JetFile: SemicolonAfterIf.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/ShortAnnotations.txt b/compiler/testData/psi/ShortAnnotations.txt index cf2cafe2284..cc795b1920f 100644 --- a/compiler/testData/psi/ShortAnnotations.txt +++ b/compiler/testData/psi/ShortAnnotations.txt @@ -1,57 +1,57 @@ JetFile: ShortAnnotations.jet NAMESPACE - MODIFIER_LIST - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') + NAMESPACE_HEADER + 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(' ') - 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)(')') + PsiElement(namespace)('namespace') 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(' ') - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME PsiElement(IDENTIFIER)('aa') PsiWhiteSpace('\n\n') NAMESPACE @@ -104,9 +104,9 @@ JetFile: ShortAnnotations.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('zoo') PsiWhiteSpace(' ') - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') PsiElement(LBRACE)('{') diff --git a/compiler/testData/psi/SimpleClassMembers.txt b/compiler/testData/psi/SimpleClassMembers.txt index 8763cc9a78e..01652bba308 100644 --- a/compiler/testData/psi/SimpleClassMembers.txt +++ b/compiler/testData/psi/SimpleClassMembers.txt @@ -1,5 +1,7 @@ JetFile: SimpleClassMembers.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/SimpleClassMembers_ERR.txt b/compiler/testData/psi/SimpleClassMembers_ERR.txt index 5f9530a1671..b48c1f557b1 100644 --- a/compiler/testData/psi/SimpleClassMembers_ERR.txt +++ b/compiler/testData/psi/SimpleClassMembers_ERR.txt @@ -1,5 +1,7 @@ JetFile: SimpleClassMembers_ERR.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/SimpleExpressions.txt b/compiler/testData/psi/SimpleExpressions.txt index 16219eac0b0..45ce1f23b2f 100644 --- a/compiler/testData/psi/SimpleExpressions.txt +++ b/compiler/testData/psi/SimpleExpressions.txt @@ -1,5 +1,7 @@ JetFile: SimpleExpressions.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/SimpleModifiers.txt b/compiler/testData/psi/SimpleModifiers.txt index aca1212c64b..4df3f2f9c98 100644 --- a/compiler/testData/psi/SimpleModifiers.txt +++ b/compiler/testData/psi/SimpleModifiers.txt @@ -1,11 +1,13 @@ JetFile: SimpleModifiers.jet NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME - PsiElement(IDENTIFIER)('foo') + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('bar') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') PsiElement(DOT)('.') PsiElement(IDENTIFIER)('goo') PsiWhiteSpace('\n\n') diff --git a/compiler/testData/psi/SoftKeywords.txt b/compiler/testData/psi/SoftKeywords.txt index eb76e1c326c..01fccd725d8 100644 --- a/compiler/testData/psi/SoftKeywords.txt +++ b/compiler/testData/psi/SoftKeywords.txt @@ -1,11 +1,13 @@ JetFile: SoftKeywords.jet NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME - PsiElement(IDENTIFIER)('foo') + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('bar') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') PsiElement(DOT)('.') PsiElement(IDENTIFIER)('goo') PsiWhiteSpace('\n\n') diff --git a/compiler/testData/psi/SoftKeywordsInTypeArguments.txt b/compiler/testData/psi/SoftKeywordsInTypeArguments.txt index ebaa0fcb051..6f88bc2d16e 100644 --- a/compiler/testData/psi/SoftKeywordsInTypeArguments.txt +++ b/compiler/testData/psi/SoftKeywordsInTypeArguments.txt @@ -1,5 +1,7 @@ JetFile: SoftKeywordsInTypeArguments.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/StringTemplates.txt b/compiler/testData/psi/StringTemplates.txt index f393dac23ea..1fc2653edcb 100644 --- a/compiler/testData/psi/StringTemplates.txt +++ b/compiler/testData/psi/StringTemplates.txt @@ -1,5 +1,7 @@ JetFile: StringTemplates.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/Super.txt b/compiler/testData/psi/Super.txt index c9cd569dcaa..37b48197ade 100644 --- a/compiler/testData/psi/Super.txt +++ b/compiler/testData/psi/Super.txt @@ -2,6 +2,8 @@ JetFile: Super.jet PsiComment(EOL_COMMENT)('// KT-156 Fix the this syntax') PsiWhiteSpace('\n') NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/ThisType.txt b/compiler/testData/psi/ThisType.txt index dfbca2d3240..99abcb37b6b 100644 --- a/compiler/testData/psi/ThisType.txt +++ b/compiler/testData/psi/ThisType.txt @@ -1,5 +1,7 @@ JetFile: ThisType.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/TupleTypes.txt b/compiler/testData/psi/TupleTypes.txt index 8ed6a23a10a..cb44ded1528 100644 --- a/compiler/testData/psi/TupleTypes.txt +++ b/compiler/testData/psi/TupleTypes.txt @@ -1,5 +1,7 @@ JetFile: TupleTypes.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/TupleTypes_ERR.txt b/compiler/testData/psi/TupleTypes_ERR.txt index 5a2e46aa6eb..5b984020566 100644 --- a/compiler/testData/psi/TupleTypes_ERR.txt +++ b/compiler/testData/psi/TupleTypes_ERR.txt @@ -1,5 +1,7 @@ JetFile: TupleTypes_ERR.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/TuplesWithLabeledEntries.txt b/compiler/testData/psi/TuplesWithLabeledEntries.txt index b1f0de58d24..bb38c8417a9 100644 --- a/compiler/testData/psi/TuplesWithLabeledEntries.txt +++ b/compiler/testData/psi/TuplesWithLabeledEntries.txt @@ -1,5 +1,7 @@ JetFile: TuplesWithLabeledEntries.jet NAMESPACE + NAMESPACE_HEADER + PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/TypeAnnotations.txt b/compiler/testData/psi/TypeAnnotations.txt index ad5453b1cf0..573f4afb5a6 100644 --- a/compiler/testData/psi/TypeAnnotations.txt +++ b/compiler/testData/psi/TypeAnnotations.txt @@ -1,5 +1,7 @@ JetFile: TypeAnnotations.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/TypeConstraints.txt b/compiler/testData/psi/TypeConstraints.txt index a7b245da2ed..8f1d93ed4bd 100644 --- a/compiler/testData/psi/TypeConstraints.txt +++ b/compiler/testData/psi/TypeConstraints.txt @@ -1,5 +1,7 @@ JetFile: TypeConstraints.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/TypeDef.txt b/compiler/testData/psi/TypeDef.txt index 9fc34848eab..f55ffb3a657 100644 --- a/compiler/testData/psi/TypeDef.txt +++ b/compiler/testData/psi/TypeDef.txt @@ -1,11 +1,13 @@ JetFile: TypeDef.jet NAMESPACE - PsiElement(namespace)('namespace') - PsiWhiteSpace(' ') - NAMESPACE_NAME - PsiElement(IDENTIFIER)('foo') + NAMESPACE_HEADER + PsiElement(namespace)('namespace') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('bar') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('bar') PsiElement(DOT)('.') PsiElement(IDENTIFIER)('goo') PsiWhiteSpace('\n\n') diff --git a/compiler/testData/psi/TypeDef_ERR.txt b/compiler/testData/psi/TypeDef_ERR.txt index e005e0664bb..4a7f784651d 100644 --- a/compiler/testData/psi/TypeDef_ERR.txt +++ b/compiler/testData/psi/TypeDef_ERR.txt @@ -1,5 +1,7 @@ JetFile: TypeDef_ERR.jet NAMESPACE + NAMESPACE_HEADER + TYPEDEF PsiElement(type)('type') PsiErrorElement:Type name expected diff --git a/compiler/testData/psi/TypeExpressionAmbiguities_ERR.txt b/compiler/testData/psi/TypeExpressionAmbiguities_ERR.txt index 433bb1c6922..b6eea49385d 100644 --- a/compiler/testData/psi/TypeExpressionAmbiguities_ERR.txt +++ b/compiler/testData/psi/TypeExpressionAmbiguities_ERR.txt @@ -1,5 +1,7 @@ JetFile: TypeExpressionAmbiguities_ERR.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/TypeParametersBeforeName.txt b/compiler/testData/psi/TypeParametersBeforeName.txt index 7f719787d19..345481b0c8f 100644 --- a/compiler/testData/psi/TypeParametersBeforeName.txt +++ b/compiler/testData/psi/TypeParametersBeforeName.txt @@ -1,5 +1,7 @@ JetFile: TypeParametersBeforeName.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/When.txt b/compiler/testData/psi/When.txt index 7abeb1afcb3..c78e94c6686 100644 --- a/compiler/testData/psi/When.txt +++ b/compiler/testData/psi/When.txt @@ -1,5 +1,7 @@ JetFile: When.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/When_ERR.txt b/compiler/testData/psi/When_ERR.txt index 64b931828e9..08dede49af4 100644 --- a/compiler/testData/psi/When_ERR.txt +++ b/compiler/testData/psi/When_ERR.txt @@ -1,5 +1,7 @@ JetFile: When_ERR.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/AnonymousObjects.txt b/compiler/testData/psi/examples/AnonymousObjects.txt index bab77c6c07b..1847e605f81 100644 --- a/compiler/testData/psi/examples/AnonymousObjects.txt +++ b/compiler/testData/psi/examples/AnonymousObjects.txt @@ -1,5 +1,7 @@ JetFile: AnonymousObjects.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/BinaryTree.txt b/compiler/testData/psi/examples/BinaryTree.txt index 41e839f7454..af51d25fcf8 100644 --- a/compiler/testData/psi/examples/BinaryTree.txt +++ b/compiler/testData/psi/examples/BinaryTree.txt @@ -1,5 +1,7 @@ JetFile: BinaryTree.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/BitArith.txt b/compiler/testData/psi/examples/BitArith.txt index dba6f016498..0991ff593b6 100644 --- a/compiler/testData/psi/examples/BitArith.txt +++ b/compiler/testData/psi/examples/BitArith.txt @@ -1,5 +1,7 @@ JetFile: BitArith.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/Builder.txt b/compiler/testData/psi/examples/Builder.txt index 3f34447a17d..2be62e21682 100644 --- a/compiler/testData/psi/examples/Builder.txt +++ b/compiler/testData/psi/examples/Builder.txt @@ -1,5 +1,7 @@ JetFile: Builder.jet NAMESPACE + NAMESPACE_HEADER + PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/Color.txt b/compiler/testData/psi/examples/Color.txt index 76c5d33a5da..f11a62f5f02 100644 --- a/compiler/testData/psi/examples/Color.txt +++ b/compiler/testData/psi/examples/Color.txt @@ -1,5 +1,7 @@ JetFile: Color.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(enum)('enum') diff --git a/compiler/testData/psi/examples/FunctionsAndTypes.txt b/compiler/testData/psi/examples/FunctionsAndTypes.txt index 6b2c0dfd160..ca829289aac 100644 --- a/compiler/testData/psi/examples/FunctionsAndTypes.txt +++ b/compiler/testData/psi/examples/FunctionsAndTypes.txt @@ -1,5 +1,7 @@ JetFile: FunctionsAndTypes.jet NAMESPACE + NAMESPACE_HEADER + TYPEDEF PsiElement(type)('type') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/Graph.txt b/compiler/testData/psi/examples/Graph.txt index a21315c0896..2cb4dd908c6 100644 --- a/compiler/testData/psi/examples/Graph.txt +++ b/compiler/testData/psi/examples/Graph.txt @@ -1,5 +1,7 @@ JetFile: Graph.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/IPushPop.txt b/compiler/testData/psi/examples/IPushPop.txt index ba028b8aa59..5ae4e0e28fd 100644 --- a/compiler/testData/psi/examples/IPushPop.txt +++ b/compiler/testData/psi/examples/IPushPop.txt @@ -1,5 +1,7 @@ JetFile: IPushPop.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/LINQ.txt b/compiler/testData/psi/examples/LINQ.txt index e066a2a3c28..98e0b166b64 100644 --- a/compiler/testData/psi/examples/LINQ.txt +++ b/compiler/testData/psi/examples/LINQ.txt @@ -1,5 +1,7 @@ JetFile: LINQ.jet NAMESPACE + NAMESPACE_HEADER + FUN PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/PolymorphicClassObjects.txt b/compiler/testData/psi/examples/PolymorphicClassObjects.txt index 0ecb4dce0fe..9a59c5766da 100644 --- a/compiler/testData/psi/examples/PolymorphicClassObjects.txt +++ b/compiler/testData/psi/examples/PolymorphicClassObjects.txt @@ -1,5 +1,7 @@ JetFile: PolymorphicClassObjects.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/Queue.txt b/compiler/testData/psi/examples/Queue.txt index 335c7217d56..ceee4f838c4 100644 --- a/compiler/testData/psi/examples/Queue.txt +++ b/compiler/testData/psi/examples/Queue.txt @@ -1,5 +1,7 @@ JetFile: Queue.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/Stack.txt b/compiler/testData/psi/examples/Stack.txt index 6a90e15f08e..792dd9c5f01 100644 --- a/compiler/testData/psi/examples/Stack.txt +++ b/compiler/testData/psi/examples/Stack.txt @@ -1,5 +1,7 @@ JetFile: Stack.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/UnionFind.txt b/compiler/testData/psi/examples/UnionFind.txt index a349879dc7d..30d3e98e16a 100644 --- a/compiler/testData/psi/examples/UnionFind.txt +++ b/compiler/testData/psi/examples/UnionFind.txt @@ -1,5 +1,7 @@ JetFile: UnionFind.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/UpdateOperation.txt b/compiler/testData/psi/examples/UpdateOperation.txt index c624c2a4f1c..5b94e332274 100644 --- a/compiler/testData/psi/examples/UpdateOperation.txt +++ b/compiler/testData/psi/examples/UpdateOperation.txt @@ -1,5 +1,7 @@ JetFile: UpdateOperation.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/With.txt b/compiler/testData/psi/examples/With.txt index 25fdde079e5..468588f148e 100644 --- a/compiler/testData/psi/examples/With.txt +++ b/compiler/testData/psi/examples/With.txt @@ -1,5 +1,7 @@ JetFile: With.jet NAMESPACE + NAMESPACE_HEADER + FUN MODIFIER_LIST ANNOTATION diff --git a/compiler/testData/psi/examples/array/MutableArray.txt b/compiler/testData/psi/examples/array/MutableArray.txt index daa31179dbd..18940203294 100644 --- a/compiler/testData/psi/examples/array/MutableArray.txt +++ b/compiler/testData/psi/examples/array/MutableArray.txt @@ -2,6 +2,8 @@ JetFile: MutableArray.jet PsiComment(DOC_COMMENT)('/**\n These declarations are "shallow" in the sense that they are not really compiled, only the type-checker uses them\n*/') PsiWhiteSpace('\n\n') NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/collections/ArrayList.txt b/compiler/testData/psi/examples/collections/ArrayList.txt index 4ca13335330..6bd72ad11fd 100644 --- a/compiler/testData/psi/examples/collections/ArrayList.txt +++ b/compiler/testData/psi/examples/collections/ArrayList.txt @@ -1,5 +1,7 @@ JetFile: ArrayList.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/collections/HashMap.txt b/compiler/testData/psi/examples/collections/HashMap.txt index 4b00e65faa7..e97bcd16428 100644 --- a/compiler/testData/psi/examples/collections/HashMap.txt +++ b/compiler/testData/psi/examples/collections/HashMap.txt @@ -1,5 +1,7 @@ JetFile: HashMap.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/collections/IIterable.txt b/compiler/testData/psi/examples/collections/IIterable.txt index 8b426629e5a..a767932aab0 100644 --- a/compiler/testData/psi/examples/collections/IIterable.txt +++ b/compiler/testData/psi/examples/collections/IIterable.txt @@ -1,5 +1,7 @@ JetFile: IIterable.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/collections/IIterator.txt b/compiler/testData/psi/examples/collections/IIterator.txt index a11d81c631e..3fd80a65235 100644 --- a/compiler/testData/psi/examples/collections/IIterator.txt +++ b/compiler/testData/psi/examples/collections/IIterator.txt @@ -1,5 +1,7 @@ JetFile: IIterator.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/collections/IList.txt b/compiler/testData/psi/examples/collections/IList.txt index 36ff6a29f39..c7f47cd7b68 100644 --- a/compiler/testData/psi/examples/collections/IList.txt +++ b/compiler/testData/psi/examples/collections/IList.txt @@ -1,5 +1,7 @@ JetFile: IList.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/collections/IMutableIterable.txt b/compiler/testData/psi/examples/collections/IMutableIterable.txt index 4e443c5ca4b..4e8045be4e7 100644 --- a/compiler/testData/psi/examples/collections/IMutableIterable.txt +++ b/compiler/testData/psi/examples/collections/IMutableIterable.txt @@ -1,5 +1,7 @@ JetFile: IMutableIterable.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/collections/IMutableIterator.txt b/compiler/testData/psi/examples/collections/IMutableIterator.txt index 4a92a5971d5..25421b6ea8b 100644 --- a/compiler/testData/psi/examples/collections/IMutableIterator.txt +++ b/compiler/testData/psi/examples/collections/IMutableIterator.txt @@ -1,5 +1,7 @@ JetFile: IMutableIterator.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/collections/IMutableList.txt b/compiler/testData/psi/examples/collections/IMutableList.txt index 0fce42fbf1f..8fc0597605e 100644 --- a/compiler/testData/psi/examples/collections/IMutableList.txt +++ b/compiler/testData/psi/examples/collections/IMutableList.txt @@ -1,5 +1,7 @@ JetFile: IMutableList.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/collections/IMutableSet.txt b/compiler/testData/psi/examples/collections/IMutableSet.txt index 82c94b8ff19..750cc6af8d3 100644 --- a/compiler/testData/psi/examples/collections/IMutableSet.txt +++ b/compiler/testData/psi/examples/collections/IMutableSet.txt @@ -1,5 +1,7 @@ JetFile: IMutableSet.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/collections/ISet.txt b/compiler/testData/psi/examples/collections/ISet.txt index f1736c73dee..cf51b2dcf92 100644 --- a/compiler/testData/psi/examples/collections/ISet.txt +++ b/compiler/testData/psi/examples/collections/ISet.txt @@ -1,5 +1,7 @@ JetFile: ISet.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/collections/ISized.txt b/compiler/testData/psi/examples/collections/ISized.txt index dacafb7e2eb..96b49ef23b1 100644 --- a/compiler/testData/psi/examples/collections/ISized.txt +++ b/compiler/testData/psi/examples/collections/ISized.txt @@ -1,5 +1,7 @@ JetFile: ISized.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/collections/LinkedList.txt b/compiler/testData/psi/examples/collections/LinkedList.txt index 70ecbe15074..adf1971dab2 100644 --- a/compiler/testData/psi/examples/collections/LinkedList.txt +++ b/compiler/testData/psi/examples/collections/LinkedList.txt @@ -1,5 +1,7 @@ JetFile: LinkedList.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/collections/List.txt b/compiler/testData/psi/examples/collections/List.txt index 3fcf3bfc95b..c6ec2bd2abe 100644 --- a/compiler/testData/psi/examples/collections/List.txt +++ b/compiler/testData/psi/examples/collections/List.txt @@ -1,5 +1,7 @@ JetFile: List.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(enum)('enum') diff --git a/compiler/testData/psi/examples/io/IOSamples.txt b/compiler/testData/psi/examples/io/IOSamples.txt index 4cdd7d38a23..c06355b8788 100644 --- a/compiler/testData/psi/examples/io/IOSamples.txt +++ b/compiler/testData/psi/examples/io/IOSamples.txt @@ -1,5 +1,7 @@ JetFile: IOSamples.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/map/IMap.txt b/compiler/testData/psi/examples/map/IMap.txt index 569ba8cb241..5607459c1ec 100644 --- a/compiler/testData/psi/examples/map/IMap.txt +++ b/compiler/testData/psi/examples/map/IMap.txt @@ -1,5 +1,7 @@ JetFile: IMap.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/priorityqueues/BinaryHeap.txt b/compiler/testData/psi/examples/priorityqueues/BinaryHeap.txt index d585bc8ffed..32334433a09 100644 --- a/compiler/testData/psi/examples/priorityqueues/BinaryHeap.txt +++ b/compiler/testData/psi/examples/priorityqueues/BinaryHeap.txt @@ -1,5 +1,7 @@ JetFile: BinaryHeap.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/priorityqueues/IPriorityQueue.txt b/compiler/testData/psi/examples/priorityqueues/IPriorityQueue.txt index 626b44d7c56..ee601c3b1dc 100644 --- a/compiler/testData/psi/examples/priorityqueues/IPriorityQueue.txt +++ b/compiler/testData/psi/examples/priorityqueues/IPriorityQueue.txt @@ -1,5 +1,7 @@ JetFile: IPriorityQueue.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open') diff --git a/compiler/testData/psi/examples/priorityqueues/PriorityQueueAsPushPop.txt b/compiler/testData/psi/examples/priorityqueues/PriorityQueueAsPushPop.txt index dcc8cfb2507..e87b64f65d5 100644 --- a/compiler/testData/psi/examples/priorityqueues/PriorityQueueAsPushPop.txt +++ b/compiler/testData/psi/examples/priorityqueues/PriorityQueueAsPushPop.txt @@ -1,5 +1,7 @@ JetFile: PriorityQueueAsPushPop.jet NAMESPACE + NAMESPACE_HEADER + CLASS PsiElement(class)('class') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/util/Comparison.txt b/compiler/testData/psi/examples/util/Comparison.txt index d16d5a10c00..53e19e4cb0c 100644 --- a/compiler/testData/psi/examples/util/Comparison.txt +++ b/compiler/testData/psi/examples/util/Comparison.txt @@ -1,5 +1,7 @@ JetFile: Comparison.jet NAMESPACE + NAMESPACE_HEADER + TYPEDEF PsiElement(type)('type') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/util/IComparable.txt b/compiler/testData/psi/examples/util/IComparable.txt index 9404cdf4eb1..ae8468ffb86 100644 --- a/compiler/testData/psi/examples/util/IComparable.txt +++ b/compiler/testData/psi/examples/util/IComparable.txt @@ -1,5 +1,7 @@ JetFile: IComparable.jet NAMESPACE + NAMESPACE_HEADER + CLASS MODIFIER_LIST PsiElement(open)('open')