diff --git a/.idea/modules.xml b/.idea/modules.xml
index 13927ade54d..463eb8bb67f 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -11,7 +11,6 @@
-
diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/ClassFileFactory.java b/compiler/backend/src/org/jetbrains/jet/codegen/ClassFileFactory.java
index 46e5b9e5472..475919c64c2 100644
--- a/compiler/backend/src/org/jetbrains/jet/codegen/ClassFileFactory.java
+++ b/compiler/backend/src/org/jetbrains/jet/codegen/ClassFileFactory.java
@@ -1,6 +1,6 @@
package org.jetbrains.jet.codegen;
-import org.jetbrains.jet.lang.psi.JetNamespace;
+import org.jetbrains.jet.lang.psi.JetFile;
import org.jetbrains.jet.lang.psi.JetPsiUtil;
import java.util.*;
@@ -30,13 +30,13 @@ public class ClassFileFactory {
return newVisitor(className + ".class");
}
- NamespaceCodegen forNamespace(JetNamespace namespace) {
+ NamespaceCodegen forNamespace(JetFile file) {
assert !isDone : "Already done!";
- String fqName = JetPsiUtil.getFQName(namespace);
+ String fqName = JetPsiUtil.getFQName(file);
NamespaceCodegen codegen = ns2codegen.get(fqName);
if (codegen == null) {
final ClassBuilder builder = newVisitor(NamespaceCodegen.getJVMClassName(fqName) + ".class");
- codegen = new NamespaceCodegen(builder, fqName, state, namespace.getContainingFile());
+ codegen = new NamespaceCodegen(builder, fqName, state, file.getContainingFile());
ns2codegen.put(fqName, codegen);
}
diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/GenerationState.java b/compiler/backend/src/org/jetbrains/jet/codegen/GenerationState.java
index 461c528475d..a378304ac3d 100644
--- a/compiler/backend/src/org/jetbrains/jet/codegen/GenerationState.java
+++ b/compiler/backend/src/org/jetbrains/jet/codegen/GenerationState.java
@@ -6,6 +6,7 @@ package org.jetbrains.jet.codegen;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Pair;
+import com.intellij.psi.PsiElement;
import com.intellij.util.containers.Stack;
import org.jetbrains.jet.codegen.intrinsics.IntrinsicMethods;
import org.jetbrains.jet.lang.cfg.pseudocode.JetControlFlowDataTraceFactory;
@@ -78,15 +79,14 @@ public class GenerationState {
return Pair.create(className, factory.forAnonymousSubclass(className));
}
- public NamespaceCodegen forNamespace(JetNamespace namespace) {
+ public NamespaceCodegen forNamespace(JetFile namespace) {
return factory.forNamespace(namespace);
}
- public BindingContext compile(JetFile psiFile) {
- final JetNamespace namespace = psiFile.getRootNamespace();
- final BindingContext bindingContext = AnalyzerFacade.analyzeOneNamespaceWithJavaIntegration(namespace, JetControlFlowDataTraceFactory.EMPTY);
+ public BindingContext compile(JetFile file) {
+ final BindingContext bindingContext = AnalyzerFacade.analyzeOneFileWithJavaIntegration(file, JetControlFlowDataTraceFactory.EMPTY);
AnalyzingUtils.throwExceptionOnErrors(bindingContext);
- compileCorrectNamespaces(bindingContext, Collections.singletonList(namespace));
+ compileCorrectFiles(bindingContext, Collections.singletonList(file));
return bindingContext;
// NamespaceCodegen codegen = forNamespace(namespace);
// bindingContexts.push(bindingContext);
@@ -102,15 +102,15 @@ public class GenerationState {
// }
}
- public void compileCorrectNamespaces(BindingContext bindingContext, List namespaces) {
- compileCorrectNamespaces(bindingContext, namespaces, CompilationErrorHandler.THROW_EXCEPTION);
+ public void compileCorrectFiles(BindingContext bindingContext, List files) {
+ compileCorrectFiles(bindingContext, files, CompilationErrorHandler.THROW_EXCEPTION);
}
- public void compileCorrectNamespaces(BindingContext bindingContext, List namespaces, CompilationErrorHandler errorHandler) {
+ public void compileCorrectFiles(BindingContext bindingContext, List files, CompilationErrorHandler errorHandler) {
typeMapper = new JetTypeMapper(standardLibrary, bindingContext);
bindingContexts.push(bindingContext);
try {
- for (JetNamespace namespace : namespaces) {
+ for (JetFile namespace : files) {
try {
generateNamespace(namespace);
}
@@ -129,7 +129,7 @@ public class GenerationState {
}
}
- protected void generateNamespace(JetNamespace namespace) {
+ protected void generateNamespace(JetFile namespace) {
NamespaceCodegen codegen = forNamespace(namespace);
codegen.generate(namespace);
}
@@ -149,8 +149,8 @@ public class GenerationState {
return new GeneratedAnonymousClassDescriptor(nameAndVisitor.first, callableMethod.getSignature().getAsmMethod(), objectContext.outerWasUsed, null);
}
- public static void prepareAnonymousClasses(JetElement aClass, final JetTypeMapper typeMapper) {
- aClass.acceptChildren(new JetVisitorVoid() {
+ public static void prepareAnonymousClasses(PsiElement element, final JetTypeMapper typeMapper) {
+ element.acceptChildren(new JetVisitorVoid() {
@Override
public void visitJetElement(JetElement element) {
super.visitJetElement(element);
diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/JetTypeMapper.java b/compiler/backend/src/org/jetbrains/jet/codegen/JetTypeMapper.java
index a6ffef67541..f841f0a4311 100644
--- a/compiler/backend/src/org/jetbrains/jet/codegen/JetTypeMapper.java
+++ b/compiler/backend/src/org/jetbrains/jet/codegen/JetTypeMapper.java
@@ -753,11 +753,12 @@ public class JetTypeMapper {
return name;
}
- @SuppressWarnings("unchecked") JetNamedDeclaration container = PsiTreeUtil.getParentOfType(expression, JetNamespace.class, JetClass.class, JetObjectDeclaration.class);
+ @SuppressWarnings("unchecked")
+ PsiElement container = PsiTreeUtil.getParentOfType(expression, JetFile.class, JetClass.class, JetObjectDeclaration.class);
String baseName;
- if (container instanceof JetNamespace) {
- baseName = NamespaceCodegen.getJVMClassName(JetPsiUtil.getFQName(((JetNamespace) container)));
+ if (container instanceof JetFile) {
+ baseName = NamespaceCodegen.getJVMClassName(JetPsiUtil.getFQName(((JetFile) container)));
}
else {
ClassDescriptor aClass = bindingContext.get(BindingContext.CLASS, container);
diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/NamespaceCodegen.java b/compiler/backend/src/org/jetbrains/jet/codegen/NamespaceCodegen.java
index c083b4a639d..6a07373bef3 100644
--- a/compiler/backend/src/org/jetbrains/jet/codegen/NamespaceCodegen.java
+++ b/compiler/backend/src/org/jetbrains/jet/codegen/NamespaceCodegen.java
@@ -43,8 +43,8 @@ public class NamespaceCodegen {
v.visitSource(sourceFile.getName(), null);
}
- public void generate(JetNamespace namespace) {
- NamespaceDescriptor descriptor = state.getBindingContext().get(BindingContext.NAMESPACE, namespace);
+ public void generate(JetFile file) {
+ NamespaceDescriptor descriptor = state.getBindingContext().get(BindingContext.NAMESPACE, file);
final CodegenContext context = CodegenContext.STATIC.intoNamespace(descriptor);
final FunctionCodegen functionCodegen = new FunctionCodegen(context, v, state);
@@ -52,10 +52,10 @@ public class NamespaceCodegen {
final ClassCodegen classCodegen = state.forClass();
if (v.generateCode()) {
- GenerationState.prepareAnonymousClasses(namespace, state.getTypeMapper());
+ GenerationState.prepareAnonymousClasses(file, state.getTypeMapper());
}
- for (JetDeclaration declaration : namespace.getDeclarations()) {
+ for (JetDeclaration declaration : file.getDeclarations()) {
if (declaration instanceof JetProperty) {
propertyCodegen.gen((JetProperty) declaration);
}
@@ -72,20 +72,20 @@ public class NamespaceCodegen {
else if (declaration instanceof JetClassOrObject) {
classCodegen.generate(context, (JetClassOrObject) declaration);
}
- else if (declaration instanceof JetNamespace) {
- JetNamespace childNamespace = (JetNamespace) declaration;
- state.forNamespace(childNamespace).generate(childNamespace);
- }
+// else if (declaration instanceof JetFile) {
+// JetFile childNamespace = (JetFile) declaration;
+// state.forNamespace(childNamespace).generate(childNamespace);
+// }
}
- if (hasNonConstantPropertyInitializers(namespace)) {
- generateStaticInitializers(namespace);
+ if (hasNonConstantPropertyInitializers(file)) {
+ generateStaticInitializers(file);
}
- generateTypeInfoFields(namespace, context);
+ generateTypeInfoFields(file, context);
}
- private void generateStaticInitializers(JetNamespace namespace) {
+ private void generateStaticInitializers(JetFile namespace) {
MethodVisitor mv = v.newMethod(namespace, ACC_PUBLIC | ACC_STATIC,
"", "()V", null, null);
if (v.generateCode()) {
@@ -115,9 +115,9 @@ public class NamespaceCodegen {
}
}
- private void generateTypeInfoFields(JetNamespace namespace, CodegenContext context) {
+ private void generateTypeInfoFields(JetFile file, CodegenContext context) {
if(context.typeInfoConstants != null) {
- String jvmClassName = getJVMClassName(namespace.getName());
+ String jvmClassName = getJVMClassName(file.getNamespaceHeader().getName());
for(int index = 0; index != context.typeInfoConstantsCount; index++) {
JetType type = context.reverseTypeInfoConstants.get(index);
String fieldName = "$typeInfoCache$" + index;
@@ -137,7 +137,7 @@ public class NamespaceCodegen {
v.visitFieldInsn(PUTSTATIC, jvmClassName, fieldName, "Ljet/TypeInfo;");
v.visitLabel(end);
v.visitInsn(ARETURN);
- FunctionCodegen.endVisit(v, "type info method", namespace);
+ FunctionCodegen.endVisit(v, "type info method", file);
}
}
}
@@ -187,7 +187,7 @@ public class NamespaceCodegen {
}
}
- private static boolean hasNonConstantPropertyInitializers(JetNamespace namespace) {
+ private static boolean hasNonConstantPropertyInitializers(JetFile namespace) {
for (JetDeclaration declaration : namespace.getDeclarations()) {
if (declaration instanceof JetProperty) {
final JetExpression initializer = ((JetProperty) declaration).getInitializer();
diff --git a/compiler/backend/src/org/jetbrains/jet/compiler/CompileEnvironment.java b/compiler/backend/src/org/jetbrains/jet/compiler/CompileEnvironment.java
index ae74afa756c..2d2722e4810 100644
--- a/compiler/backend/src/org/jetbrains/jet/compiler/CompileEnvironment.java
+++ b/compiler/backend/src/org/jetbrains/jet/compiler/CompileEnvironment.java
@@ -8,21 +8,18 @@ import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.Function;
import com.intellij.util.Processor;
import jet.ExtensionFunction0;
-import jet.ExtensionFunction10;
-import jet.Function1;
import jet.modules.IModuleBuilder;
import jet.modules.IModuleSetBuilder;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.JetCoreEnvironment;
import org.jetbrains.jet.codegen.ClassFileFactory;
import org.jetbrains.jet.codegen.GeneratedClassLoader;
-import org.jetbrains.jet.lang.psi.JetNamespace;
+import org.jetbrains.jet.lang.psi.JetFile;
import org.jetbrains.jet.lang.psi.JetPsiUtil;
import org.jetbrains.jet.plugin.JetMainDetector;
import java.io.*;
import java.lang.reflect.Field;
-import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Arrays;
@@ -337,9 +334,9 @@ public class CompileEnvironment {
session.addStdLibSources();
String mainClass = null;
- for (JetNamespace namespace : session.getSourceFileNamespaces()) {
- if (JetMainDetector.hasMain(namespace.getDeclarations())) {
- mainClass = JetPsiUtil.getFQName(namespace) + ".namespace";
+ for (JetFile file : session.getSourceFileNamespaces()) {
+ if (JetMainDetector.hasMain(file.getDeclarations())) {
+ mainClass = JetPsiUtil.getFQName(file) + ".namespace";
break;
}
}
diff --git a/compiler/backend/src/org/jetbrains/jet/compiler/CompileSession.java b/compiler/backend/src/org/jetbrains/jet/compiler/CompileSession.java
index 9b4a3391cd2..dffab3f4c06 100644
--- a/compiler/backend/src/org/jetbrains/jet/compiler/CompileSession.java
+++ b/compiler/backend/src/org/jetbrains/jet/compiler/CompileSession.java
@@ -10,7 +10,6 @@ import org.jetbrains.jet.codegen.ClassFileFactory;
import org.jetbrains.jet.codegen.GenerationState;
import org.jetbrains.jet.lang.cfg.pseudocode.JetControlFlowDataTraceFactory;
import org.jetbrains.jet.lang.psi.JetFile;
-import org.jetbrains.jet.lang.psi.JetNamespace;
import org.jetbrains.jet.lang.resolve.BindingContext;
import org.jetbrains.jet.lang.resolve.java.AnalyzerFacade;
import org.jetbrains.jet.plugin.JetFileType;
@@ -27,8 +26,8 @@ import java.util.List;
*/
public class CompileSession {
private final JetCoreEnvironment myEnvironment;
- private final List mySourceFileNamespaces = new ArrayList();
- private final List myLibrarySourceFileNamespaces = new ArrayList();
+ private final List mySourceFiles = new ArrayList();
+ private final List myLibrarySourceFiles = new ArrayList();
private List myErrors = new ArrayList();
private BindingContext myBindingContext;
@@ -63,7 +62,7 @@ public class CompileSession {
VirtualFile fileByPath = myEnvironment.getLocalFileSystem().findFileByPath(file.getAbsolutePath());
PsiFile psiFile = PsiManager.getInstance(myEnvironment.getProject()).findFile(fileByPath);
if(psiFile instanceof JetFile) {
- mySourceFileNamespaces.add(((JetFile) psiFile).getRootNamespace());
+ mySourceFiles.add((JetFile) psiFile);
}
}
}
@@ -78,14 +77,14 @@ public class CompileSession {
if (vFile.getFileType() == JetFileType.INSTANCE) {
PsiFile psiFile = PsiManager.getInstance(myEnvironment.getProject()).findFile(vFile);
if (psiFile instanceof JetFile) {
- mySourceFileNamespaces.add(((JetFile) psiFile).getRootNamespace());
+ mySourceFiles.add((JetFile) psiFile);
}
}
}
}
- public List getSourceFileNamespaces() {
- return mySourceFileNamespaces;
+ public List getSourceFileNamespaces() {
+ return mySourceFiles;
}
public boolean analyze(final PrintStream out) {
@@ -95,9 +94,9 @@ public class CompileSession {
}
return false;
}
- List allNamespaces = new ArrayList(mySourceFileNamespaces);
- allNamespaces.addAll(myLibrarySourceFileNamespaces);
- myBindingContext = AnalyzerFacade.analyzeNamespacesWithJavaIntegration(
+ List allNamespaces = new ArrayList(mySourceFiles);
+ allNamespaces.addAll(myLibrarySourceFiles);
+ myBindingContext = AnalyzerFacade.analyzeFilesWithJavaIntegration(
myEnvironment.getProject(), allNamespaces, Predicates.alwaysTrue(), JetControlFlowDataTraceFactory.EMPTY);
ErrorCollector errorCollector = new ErrorCollector(myBindingContext);
errorCollector.report(out);
@@ -106,13 +105,13 @@ public class CompileSession {
public ClassFileFactory generate() {
GenerationState generationState = new GenerationState(myEnvironment.getProject(), ClassBuilderFactory.BINARIES);
- generationState.compileCorrectNamespaces(myBindingContext, mySourceFileNamespaces);
+ generationState.compileCorrectFiles(myBindingContext, mySourceFiles);
return generationState.getFactory();
}
public String generateText() {
GenerationState generationState = new GenerationState(myEnvironment.getProject(), ClassBuilderFactory.TEXT);
- generationState.compileCorrectNamespaces(myBindingContext, mySourceFileNamespaces);
+ generationState.compileCorrectFiles(myBindingContext, mySourceFiles);
return generationState.createText();
}
diff --git a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/AnalyzerFacade.java b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/AnalyzerFacade.java
index d5da9040092..d99e9a0b500 100644
--- a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/AnalyzerFacade.java
+++ b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/AnalyzerFacade.java
@@ -17,45 +17,39 @@ import org.jetbrains.jet.lang.StandardConfiguration;
import org.jetbrains.jet.lang.cfg.pseudocode.JetControlFlowDataTraceFactory;
import org.jetbrains.jet.lang.diagnostics.DiagnosticUtils;
import org.jetbrains.jet.lang.diagnostics.Errors;
-import org.jetbrains.jet.lang.psi.JetDeclaration;
import org.jetbrains.jet.lang.psi.JetFile;
-import org.jetbrains.jet.lang.psi.JetNamespace;
import org.jetbrains.jet.lang.resolve.AnalyzingUtils;
import org.jetbrains.jet.lang.resolve.BindingContext;
import org.jetbrains.jet.lang.resolve.BindingTraceContext;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
-import java.util.List;
/**
* @author abreslav
*/
public class AnalyzerFacade {
- public static final Function> SINGLE_DECLARATION_PROVIDER = new Function>() {
+ public static final Function> SINGLE_DECLARATION_PROVIDER = new Function>() {
@Override
- public Collection fun(JetFile file) {
- return Collections.singleton(file.getRootNamespace());
+ public Collection fun(JetFile file) {
+ return Collections.singleton(file);
}
};
private final static Key> BINDING_CONTEXT = Key.create("BINDING_CONTEXT");
private static final Object lock = new Object();
- public static BindingContext analyzeFileWithCache(@NotNull final JetFile file, @NotNull final Function> declarationProvider) {
-
+ public static BindingContext analyzeFileWithCache(@NotNull final JetFile file, @NotNull final Function> declarationProvider) {
// Need lock for getValue(), because parallel threads can start evaluation of compute() simultaneously
synchronized (lock) {
-
CachedValue bindingContextCachedValue = file.getUserData(BINDING_CONTEXT);
if (bindingContextCachedValue == null) {
bindingContextCachedValue = CachedValuesManager.getManager(file.getProject()).createCachedValue(new CachedValueProvider() {
@Override
public Result compute() {
try {
- BindingContext bindingContext = analyzeNamespacesWithJavaIntegration(file.getProject(), declarationProvider.fun(file), Predicates.equalTo(file), JetControlFlowDataTraceFactory.EMPTY);
+ BindingContext bindingContext = analyzeFilesWithJavaIntegration(file.getProject(), declarationProvider.fun(file), Predicates.equalTo(file), JetControlFlowDataTraceFactory.EMPTY);
return new Result(bindingContext, PsiModificationTracker.MODIFICATION_COUNT);
}
catch (ProcessCanceledException e) {
@@ -73,46 +67,32 @@ public class AnalyzerFacade {
}, false);
file.putUserData(BINDING_CONTEXT, bindingContextCachedValue);
}
-
return bindingContextCachedValue.getValue();
}
}
- public static BindingContext analyzeOneNamespaceWithJavaIntegration(JetNamespace namespace, JetControlFlowDataTraceFactory flowDataTraceFactory) {
- return analyzeNamespacesWithJavaIntegration(namespace.getProject(), Collections.singleton(namespace), Predicates.alwaysTrue(), flowDataTraceFactory);
+ public static BindingContext analyzeOneFileWithJavaIntegration(JetFile file, JetControlFlowDataTraceFactory flowDataTraceFactory) {
+ return analyzeFilesWithJavaIntegration(file.getProject(), Collections.singleton(file), Predicates.alwaysTrue(), flowDataTraceFactory);
}
- public static BindingContext analyzeNamespacesWithJavaIntegration(Project project, Collection extends JetDeclaration> declarations, Predicate filesToAnalyzeCompletely, JetControlFlowDataTraceFactory flowDataTraceFactory) {
+ public static BindingContext analyzeFilesWithJavaIntegration(Project project, Collection files, Predicate filesToAnalyzeCompletely, JetControlFlowDataTraceFactory flowDataTraceFactory) {
BindingTraceContext bindingTraceContext = new BindingTraceContext();
JetSemanticServices semanticServices = JetSemanticServices.createSemanticServices(project);
- return AnalyzingUtils.analyzeNamespacesWithGivenTrace(
+ return AnalyzingUtils.analyzeFilesWithGivenTrace(
project,
JavaBridgeConfiguration.createJavaBridgeConfiguration(project, bindingTraceContext, StandardConfiguration.createStandardConfiguration(project)),
- declarations,
+ files,
filesToAnalyzeCompletely,
flowDataTraceFactory,
bindingTraceContext,
semanticServices);
}
- public static BindingContext shallowAnalyzeFiles(Collection files) {
+ public static BindingContext shallowAnalyzeFiles(Collection files) {
assert files.size() > 0;
Project project = files.iterator().next().getProject();
- Collection namespaces = collectRootNamespaces(files);
-
- return analyzeNamespacesWithJavaIntegration(project, namespaces, Predicates.alwaysFalse(), JetControlFlowDataTraceFactory.EMPTY);
+ return analyzeFilesWithJavaIntegration(project, files, Predicates.alwaysFalse(), JetControlFlowDataTraceFactory.EMPTY);
}
-
- public static List collectRootNamespaces(Collection files) {
- List namespaces = new ArrayList();
-
- for (PsiFile file : files) {
- if (file instanceof JetFile) {
- namespaces.add(((JetFile) file).getRootNamespace());
- }
- }
- return namespaces;
- }
-}
+}
\ No newline at end of file
diff --git a/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java b/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java
index eebdbc8085e..67a4e2a3cf6 100644
--- a/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java
+++ b/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java
@@ -10,7 +10,6 @@ import org.jetbrains.jet.lang.psi.*;
public interface JetNodeTypes {
IFileElementType JET_FILE = new IFileElementType(JetLanguage.INSTANCE);
- JetNodeType NAMESPACE = new JetNodeType("NAMESPACE", JetNamespace.class);
JetNodeType CLASS = new JetNodeType("CLASS", JetClass.class);
JetNodeType PROPERTY = new JetNodeType("PROPERTY", JetProperty.class);
JetNodeType FUN = new JetNodeType("FUN", JetNamedFunction.class);
@@ -35,7 +34,6 @@ public interface JetNodeTypes {
JetNodeType CLASS_BODY = new JetNodeType("CLASS_BODY", JetClassBody.class);
JetNodeType IMPORT_DIRECTIVE = new JetNodeType("IMPORT_DIRECTIVE", JetImportDirective.class);
- JetNodeType NAMESPACE_BODY = new JetNodeType("NAMESPACE_BODY", JetNamespaceBody.class);
JetNodeType MODIFIER_LIST = new JetNodeType("MODIFIER_LIST", JetModifierList.class);
JetNodeType PRIMARY_CONSTRUCTOR_MODIFIER_LIST = new JetNodeType("PRIMARY_CONSTRUCTOR_MODIFIER_LIST", JetModifierList.class);
JetNodeType ANNOTATION = new JetNodeType("ANNOTATION", JetAnnotation.class);
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/RedeclarationDiagnostic.java b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/RedeclarationDiagnostic.java
index 648c8bfe5d2..814dc67acb8 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/RedeclarationDiagnostic.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/RedeclarationDiagnostic.java
@@ -7,8 +7,6 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
import org.jetbrains.jet.lang.resolve.BindingContext;
-import static org.jetbrains.jet.lang.diagnostics.Severity.ERROR;
-
/**
* @author abreslav
*/
@@ -37,7 +35,7 @@ public interface RedeclarationDiagnostic extends DiagnosticWithPsiElement getDeclarations() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, JetDeclaration.class);
+ }
+
+ public List getImportDirectives() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, JetImportDirective.class);
+ }
+
@NotNull
- public JetNamespace getRootNamespace() {
- return (JetNamespace) getNode().findChildByType(JetNodeTypes.NAMESPACE).getPsi();
+ public JetNamespaceHeader getNamespaceHeader() {
+ return (JetNamespaceHeader) getNode().findChildByType(JetNodeTypes.NAMESPACE_HEADER).getPsi();
+ }
+
+ @NotNull
+ @Override
+ public String getName() {
+ return super.getName(); // TODO
}
@Override
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamespace.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamespace.java
deleted file mode 100644
index aa82f6a2b35..00000000000
--- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamespace.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.jetbrains.jet.lang.psi;
-
-import com.intellij.lang.ASTNode;
-import com.intellij.psi.PsiElement;
-import com.intellij.psi.util.PsiTreeUtil;
-import com.intellij.util.IncorrectOperationException;
-import org.jetbrains.annotations.NonNls;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.jet.JetNodeTypes;
-
-import java.util.List;
-
-/**
- * @author max
- */
-public class JetNamespace extends JetNamedDeclaration {
- public JetNamespace(@NotNull ASTNode node) {
- super(node);
- }
-
- @Override
- public void accept(@NotNull JetVisitorVoid visitor) {
- visitor.visitNamespace(this);
- }
-
- @Override
- public R accept(@NotNull JetVisitor visitor, D data) {
- return visitor.visitNamespace(this, data);
- }
-
- public List getDeclarations() {
- PsiElement body = findChildByType(JetNodeTypes.NAMESPACE_BODY);
- return PsiTreeUtil.getChildrenOfTypeAsList(body != null ? body : this, JetDeclaration.class);
- }
-
- public List getImportDirectives() {
- PsiElement body = findChildByType(JetNodeTypes.NAMESPACE_BODY);
- return PsiTreeUtil.getChildrenOfTypeAsList(body != null ? body : this, JetImportDirective.class);
- }
-
- public String getName() {
- String name = super.getName();
- return name == null ? "" : name;
- }
-
- @NotNull
- public JetNamespaceHeader getHeader() {
- return (JetNamespaceHeader) findChildByType(JetNodeTypes.NAMESPACE_HEADER);
- }
-
- @Override
- public PsiElement getNameIdentifier() {
- return getHeader().getNameIdentifier();
- }
-
- @Override
- public PsiElement setName(@NonNls @NotNull String name) throws IncorrectOperationException {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNewExpression.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNewExpression.java
deleted file mode 100644
index b7edbc97ee2..00000000000
--- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNewExpression.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.jetbrains.jet.lang.psi;
-
-/**
- * @author max
- */
-//public class JetNewExpression extends JetExpression implements JetCallElement {
-// public JetNewExpression(@NotNull ASTNode node) {
-// super(node);
-// }
-//
-// @Override
-// public void accept(JetVisitorVoid visitor) {
-// visitor.visitNewExpression(this);
-// }
-//
-// @Nullable @IfNotParsed
-// public JetTypeReference getTypeReference() {
-// return (JetTypeReference) findChildByType(JetNodeTypes.TYPE_REFERENCE);
-// }
-//
-// @Override
-// @Nullable
-// public JetValueArgumentList getValueArgumentList() {
-// return (JetValueArgumentList) findChildByType(JetNodeTypes.VALUE_ARGUMENT_LIST);
-// }
-//
-// @Override
-// @NotNull
-// public List getValueArguments() {
-// JetValueArgumentList list = getValueArgumentList();
-// return list != null ? list.getArguments() : Collections.emptyList();
-// }
-//
-// @Override
-// @NotNull
-// public List getFunctionLiteralArguments() {
-// return findChildrenByType(JetNodeTypes.FUNCTION_LITERAL_EXPRESSION);
-// }
-//
-// @NotNull
-// @Override
-// public List getTypeArguments() {
-// return Collections.emptyList();
-// }
-//
-// @NotNull
-// @Override
-// public JetElement asElement() {
-// return this;
-// }
-//
-//}
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetPsiFactory.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetPsiFactory.java
index e01dfdaeee4..d542ea6a699 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetPsiFactory.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetPsiFactory.java
@@ -60,8 +60,7 @@ public class JetPsiFactory {
private static T createDeclaration(Project project, String text, Class clazz) {
JetFile file = createFile(project, text);
- JetNamespace rootNamespace = file.getRootNamespace();
- List dcls = rootNamespace.getDeclarations();
+ List dcls = file.getDeclarations();
assert dcls.size() == 1 : dcls.size();
@SuppressWarnings("unchecked")
T result = (T) dcls.get(0);
@@ -92,13 +91,13 @@ public class JetPsiFactory {
return function.getValueParameters().get(0);
}
- public static JetNamespace createNamespace(Project project, String text) {
- JetFile file = createFile(project, text);
- return file.getRootNamespace();
- }
+// public static JetNamespace createNamespace(Project project, String text) {
+// JetFile file = createFile(project, text);
+// return file.getRootNamespace();
+// }
public static JetImportDirective createImportDirective(Project project, String classPath) {
- JetNamespace namespace = createNamespace(project, "import " + classPath);
+ JetFile namespace = createFile(project, "import " + classPath);
return namespace.getImportDirectives().iterator().next();
}
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetPsiUtil.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetPsiUtil.java
index 2c874a7a299..525be31df08 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetPsiUtil.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetPsiUtil.java
@@ -1,7 +1,6 @@
package org.jetbrains.jet.lang.psi;
import com.intellij.psi.PsiElement;
-import com.intellij.psi.util.PsiTreeUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.lexer.JetTokens;
@@ -72,7 +71,7 @@ public class JetPsiUtil {
public static JetNamedFunction getSurroundingFunction(@Nullable PsiElement element) {
while (element != null) {
if (element instanceof JetNamedFunction) return (JetNamedFunction) element;
- if (element instanceof JetClassOrObject || element instanceof JetNamespace) return null;
+ if (element instanceof JetClassOrObject || element instanceof JetFile) return null;
element = element.getParent();
}
return null;
@@ -104,16 +103,16 @@ public class JetPsiUtil {
}
}
- public static String getFQName(JetNamespace jetNamespace) {
- JetNamespace parent = PsiTreeUtil.getParentOfType(jetNamespace, JetNamespace.class);
- if (parent != null) {
- String parentFQName = getFQName(parent);
- if (parentFQName.length() > 0) {
- return parentFQName + "." + getFQName(jetNamespace.getHeader());
- }
- }
- return getFQName(jetNamespace.getHeader()); // TODO: Must include module root namespace
- }
+// public static String getFQName(JetNamespace jetNamespace) {
+// JetNamespace parent = PsiTreeUtil.getParentOfType(jetNamespace, JetNamespace.class);
+// if (parent != null) {
+// String parentFQName = getFQName(parent);
+// if (parentFQName.length() > 0) {
+// return parentFQName + "." + getFQName(jetNamespace.getNamespaceHeader());
+// }
+// }
+// return getFQName(jetNamespace.getNamespaceHeader()); // TODO: Must include module root namespace
+// }
private static String getFQName(JetNamespaceHeader header) {
StringBuilder builder = new StringBuilder();
@@ -121,15 +120,18 @@ public class JetPsiUtil {
builder.append(nameExpression.getReferencedName());
builder.append(".");
}
-// PsiElement nameIdentifier = header.getNameIdentifier();
builder.append(header.getName());
return builder.toString();
}
+ public static String getFQName(JetFile file) {
+ return getFQName(file.getNamespaceHeader());
+ }
+
public static String getFQName(JetClass jetClass) {
- JetNamedDeclaration parent = PsiTreeUtil.getParentOfType(jetClass, JetNamespace.class, JetClass.class);
- if (parent instanceof JetNamespace) {
- return makeFQName(getFQName(((JetNamespace) parent)), jetClass);
+ PsiElement parent = jetClass.getParent();
+ if (parent instanceof JetFile) {
+ return makeFQName(getFQName((JetFile) parent), jetClass);
}
if (parent instanceof JetClass) {
return makeFQName(getFQName(((JetClass) parent)), jetClass);
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetVisitor.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetVisitor.java
index d75649d31e8..ac6575605e4 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetVisitor.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetVisitor.java
@@ -15,10 +15,6 @@ public class JetVisitor extends PsiElementVisitor {
return visitExpression(dcl, data);
}
- public R visitNamespace(JetNamespace namespace, D data) {
- return visitDeclaration(namespace, data);
- }
-
public R visitClass(JetClass klass, D data) {
return visitNamedDeclaration(klass, data);
}
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetVisitorVoid.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetVisitorVoid.java
index f3b7fde8385..ab9879b839a 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetVisitorVoid.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetVisitorVoid.java
@@ -14,10 +14,6 @@ public class JetVisitorVoid extends PsiElementVisitor {
visitExpression(dcl);
}
- public void visitNamespace(JetNamespace namespace) {
- visitDeclaration(namespace);
- }
-
public void visitClass(JetClass klass) {
visitNamedDeclaration(klass);
}
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/AnalyzingUtils.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/AnalyzingUtils.java
index 5e0b2c9135c..57691b696fa 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/AnalyzingUtils.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/AnalyzingUtils.java
@@ -16,7 +16,7 @@ import org.jetbrains.jet.lang.descriptors.*;
import org.jetbrains.jet.lang.diagnostics.Diagnostic;
import org.jetbrains.jet.lang.diagnostics.DiagnosticHolder;
import org.jetbrains.jet.lang.diagnostics.DiagnosticUtils;
-import org.jetbrains.jet.lang.psi.JetDeclaration;
+import org.jetbrains.jet.lang.psi.JetFile;
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
import org.jetbrains.jet.lang.resolve.scopes.WritableScope;
import org.jetbrains.jet.lang.resolve.scopes.WritableScopeImpl;
@@ -69,21 +69,21 @@ public class AnalyzingUtils {
// --------------------------------------------------------------------------------------------------------------------------
- public static BindingContext analyzeNamespaces(
+ public static BindingContext analyzeFiles(
@NotNull Project project,
@NotNull Configuration configuration,
- @NotNull Collection extends JetDeclaration> declarations,
+ @NotNull Collection files,
@NotNull Predicate filesToAnalyzeCompletely,
@NotNull JetControlFlowDataTraceFactory flowDataTraceFactory) {
BindingTraceContext bindingTraceContext = new BindingTraceContext();
JetSemanticServices semanticServices = JetSemanticServices.createSemanticServices(project);
- return analyzeNamespacesWithGivenTrace(project, configuration, declarations, filesToAnalyzeCompletely, flowDataTraceFactory, bindingTraceContext, semanticServices);
+ return analyzeFilesWithGivenTrace(project, configuration, files, filesToAnalyzeCompletely, flowDataTraceFactory, bindingTraceContext, semanticServices);
}
- public static BindingContext analyzeNamespacesWithGivenTrace(
+ public static BindingContext analyzeFilesWithGivenTrace(
@NotNull Project project,
@NotNull Configuration configuration,
- @NotNull Collection extends JetDeclaration> declarations,
+ @NotNull Collection files,
@NotNull Predicate filesToAnalyzeCompletely,
@NotNull JetControlFlowDataTraceFactory flowDataTraceFactory,
@NotNull BindingTraceContext bindingTraceContext,
@@ -130,7 +130,7 @@ public class AnalyzingUtils {
public ClassObjectStatus setClassObjectDescriptor(@NotNull MutableClassDescriptor classObjectDescriptor) {
throw new IllegalStateException("Must be guaranteed not to happen by the parser");
}
- }, declarations, filesToAnalyzeCompletely, flowDataTraceFactory, configuration);
+ }, files, filesToAnalyzeCompletely, flowDataTraceFactory, configuration);
return bindingTraceContext.getBindingContext();
}
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/BindingContext.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/BindingContext.java
index 0799347b34b..4cc757284ef 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/BindingContext.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/BindingContext.java
@@ -8,7 +8,6 @@ import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
import org.jetbrains.jet.lang.diagnostics.Diagnostic;
import org.jetbrains.jet.lang.psi.*;
import org.jetbrains.jet.lang.resolve.calls.ResolvedCall;
-import org.jetbrains.jet.lang.resolve.calls.ResolvedCallImpl;
import org.jetbrains.jet.lang.resolve.constants.CompileTimeConstant;
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
import org.jetbrains.jet.lang.types.DeferredType;
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/DeclarationResolver.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/DeclarationResolver.java
index d7d495ad416..47071e7a1d9 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/DeclarationResolver.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/DeclarationResolver.java
@@ -63,8 +63,8 @@ public class DeclarationResolver {
}
private void resolveFunctionAndPropertyHeaders() {
- for (Map.Entry entry : context.getNamespaceScopes().entrySet()) {
- JetNamespace namespace = entry.getKey();
+ for (Map.Entry entry : context.getNamespaceScopes().entrySet()) {
+ JetFile namespace = entry.getKey();
WritableScope namespaceScope = entry.getValue();
NamespaceLike namespaceDescriptor = context.getNamespaceDescriptors().get(namespace);
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/ImportsResolver.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/ImportsResolver.java
index b9b81c3c7c3..79c66054e37 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/ImportsResolver.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/ImportsResolver.java
@@ -39,15 +39,15 @@ public class ImportsResolver {
private void processImports(boolean firstPhase) {
ImportResolver importResolver = new ImportResolver(context.getTrace(), firstPhase);
- for (JetNamespace jetNamespace : context.getNamespaceDescriptors().keySet()) {
- WritableScope namespaceScope = context.getNamespaceScopes().get(jetNamespace);
+ for (JetFile file : context.getNamespaceDescriptors().keySet()) {
+ WritableScope namespaceScope = context.getNamespaceScopes().get(file);
if (firstPhase) {
context.getConfiguration().addDefaultImports(context.getTrace(), namespaceScope);
}
- List importDirectives = jetNamespace.getImportDirectives();
+ List importDirectives = file.getImportDirectives();
for (JetImportDirective importDirective : importDirectives) {
- importResolver.processImportReference(importDirective, namespaceScope, context.getDeclaringScopes().get(jetNamespace));
+ importResolver.processImportReference(importDirective, namespaceScope, JetScope.EMPTY);
}
}
}
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TopDownAnalysisContext.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TopDownAnalysisContext.java
index 8b5148b0210..db01ad8461b 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TopDownAnalysisContext.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TopDownAnalysisContext.java
@@ -30,8 +30,8 @@ import java.util.Set;
private final ImportsResolver importsResolver;
private final Map classes = Maps.newLinkedHashMap();
private final Map objects = Maps.newLinkedHashMap();
- protected final Map namespaceScopes = Maps.newHashMap();
- protected final Map namespaceDescriptors = Maps.newHashMap();
+ protected final Map namespaceScopes = Maps.newHashMap();
+ protected final Map namespaceDescriptors = Maps.newHashMap();
private final Map declaringScopes = Maps.newHashMap();
private final Map functions = Maps.newLinkedHashMap();
@@ -114,11 +114,11 @@ import java.util.Set;
return objects;
}
- public Map getNamespaceScopes() {
+ public Map getNamespaceScopes() {
return namespaceScopes;
}
- public Map getNamespaceDescriptors() {
+ public Map getNamespaceDescriptors() {
return namespaceDescriptors;
}
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java
index a47e6a7e8ae..e6155266c1e 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java
@@ -2,14 +2,14 @@ package org.jetbrains.jet.lang.resolve;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
+import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.lang.Configuration;
import org.jetbrains.jet.lang.JetSemanticServices;
import org.jetbrains.jet.lang.cfg.pseudocode.JetControlFlowDataTraceFactory;
import org.jetbrains.jet.lang.descriptors.*;
-import org.jetbrains.jet.lang.psi.JetDeclaration;
-import org.jetbrains.jet.lang.psi.JetNamespace;
+import org.jetbrains.jet.lang.psi.JetFile;
import org.jetbrains.jet.lang.psi.JetObjectDeclaration;
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
import org.jetbrains.jet.lang.resolve.scopes.WritableScope;
@@ -29,12 +29,12 @@ public class TopDownAnalyzer {
@NotNull BindingTrace trace,
@NotNull JetScope outerScope,
@NotNull NamespaceLike owner,
- @NotNull Collection extends JetDeclaration> declarations,
+ @NotNull Collection files,
@NotNull Predicate analyzeCompletely,
@NotNull JetControlFlowDataTraceFactory flowDataTraceFactory,
@NotNull Configuration configuration
) {
- process(semanticServices, trace, outerScope, owner, declarations, analyzeCompletely, flowDataTraceFactory, configuration, false);
+ process(semanticServices, trace, outerScope, owner, files, analyzeCompletely, flowDataTraceFactory, configuration, false);
}
private static void process(
@@ -42,7 +42,7 @@ public class TopDownAnalyzer {
@NotNull BindingTrace trace,
@NotNull JetScope outerScope,
@NotNull NamespaceLike owner,
- @NotNull Collection extends JetDeclaration> declarations,
+ @NotNull Collection extends PsiElement> declarations,
@NotNull Predicate analyzeCompletely,
@NotNull JetControlFlowDataTraceFactory flowDataTraceFactory,
@NotNull Configuration configuration,
@@ -55,7 +55,7 @@ public class TopDownAnalyzer {
private static void doProcess(
TopDownAnalysisContext context, JetScope outerScope,
NamespaceLike owner,
- Collection extends JetDeclaration> declarations,
+ Collection extends PsiElement> declarations,
JetControlFlowDataTraceFactory flowDataTraceFactory) {
// context.enableDebugOutput();
context.debug("Enter");
@@ -93,14 +93,14 @@ public class TopDownAnalyzer {
@NotNull BindingTrace trace,
@NotNull WritableScope outerScope,
@NotNull NamespaceDescriptorImpl standardLibraryNamespace,
- @NotNull JetNamespace namespace) {
+ @NotNull JetFile file) {
TopDownAnalysisContext context = new TopDownAnalysisContext(semanticServices, trace, Predicates.alwaysTrue(), Configuration.EMPTY, false);
- context.getNamespaceScopes().put(namespace, standardLibraryNamespace.getMemberScope());
- context.getNamespaceDescriptors().put(namespace, standardLibraryNamespace);
- context.getDeclaringScopes().put(namespace, outerScope);
+ context.getNamespaceDescriptors().put(file, standardLibraryNamespace);
+ context.getNamespaceScopes().put(file, standardLibraryNamespace.getMemberScope());
+// context.getDeclaringScopes().put(file, outerScope);
context.setAnalyzingBootstrapLibrary(true);
- doProcess(context, outerScope, standardLibraryNamespace, namespace.getDeclarations(), JetControlFlowDataTraceFactory.EMPTY);
+ doProcess(context, outerScope, standardLibraryNamespace, file.getDeclarations(), JetControlFlowDataTraceFactory.EMPTY);
}
public static void processObject(
@@ -140,7 +140,7 @@ public class TopDownAnalyzer {
public ClassObjectStatus setClassObjectDescriptor(@NotNull MutableClassDescriptor classObjectDescriptor) {
return ClassObjectStatus.NOT_ALLOWED;
}
- }, Collections.singletonList(object), Predicates.equalTo(object.getContainingFile()), JetControlFlowDataTraceFactory.EMPTY, Configuration.EMPTY, true);
+ }, Collections.singletonList(object), Predicates.equalTo(object.getContainingFile()), JetControlFlowDataTraceFactory.EMPTY, Configuration.EMPTY, true);
}
}
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 7a3efc82906..57082c51fc0 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TypeHierarchyResolver.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TypeHierarchyResolver.java
@@ -39,7 +39,7 @@ public class TypeHierarchyResolver {
this.context = context;
}
- public void process(@NotNull JetScope outerScope, @NotNull NamespaceLike owner, @NotNull Collection extends JetDeclaration> declarations) {
+ public void process(@NotNull JetScope outerScope, @NotNull NamespaceLike owner, @NotNull Collection extends PsiElement> declarations) {
collectNamespacesAndClassifiers(outerScope, outerScope, owner, declarations); // namespaceScopes, classes
context.getImportsResolver().processTypeImports();
@@ -67,22 +67,21 @@ public class TypeHierarchyResolver {
@NotNull final JetScope outerScope,
@NotNull final JetScope outerScopeForStatic,
@NotNull final NamespaceLike owner,
- @NotNull Collection extends JetDeclaration> declarations) {
- for (JetDeclaration declaration : declarations) {
+ @NotNull Collection extends PsiElement> declarations) {
+ for (PsiElement declaration : declarations) {
declaration.accept(new JetVisitorVoid() {
@Override
- public void visitNamespace(JetNamespace namespace) {
- NamespaceDescriptorImpl namespaceDescriptor = createNamespaceDescriptorPathIfNeeded(namespace, owner);
- context.getNamespaceDescriptors().put(namespace, namespaceDescriptor);
+ public void visitJetFile(JetFile file) {
+ NamespaceDescriptorImpl namespaceDescriptor = createNamespaceDescriptorPathIfNeeded(file, owner);
+ context.getNamespaceDescriptors().put(file, namespaceDescriptor);
WriteThroughScope namespaceScope = new WriteThroughScope(outerScope, namespaceDescriptor.getMemberScope(), new TraceBasedRedeclarationHandler(context.getTrace()));
namespaceScope.changeLockLevel(WritableScope.LockLevel.BOTH);
- context.getNamespaceScopes().put(namespace, namespaceScope);
- context.getDeclaringScopes().put(namespace, outerScope);
+ context.getNamespaceScopes().put(file, namespaceScope);
// processImports(namespace, namespaceScope, outerScope);
- collectNamespacesAndClassifiers(namespaceScope, namespaceScope, namespaceDescriptor, namespace.getDeclarations());
+ collectNamespacesAndClassifiers(namespaceScope, namespaceScope, namespaceDescriptor, file.getDeclarations());
}
@Override
@@ -195,19 +194,19 @@ public class TypeHierarchyResolver {
}
}
- private NamespaceDescriptorImpl createNamespaceDescriptorPathIfNeeded(JetNamespace namespace, NamespaceLike owner) {
+ private NamespaceDescriptorImpl createNamespaceDescriptorPathIfNeeded(JetFile file, NamespaceLike owner) {
NamespaceLike currentOwner = owner;
- for (JetSimpleNameExpression nameExpression : namespace.getHeader().getParentNamespaceNames()) {
+ for (JetSimpleNameExpression nameExpression : file.getNamespaceHeader().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);
+ String name = JetPsiUtil.safeName(file.getNamespaceHeader().getName());
+ return createNamespaceDescriptorIfNeeded(file, currentOwner, name);
}
@NotNull
- private NamespaceDescriptorImpl createNamespaceDescriptorIfNeeded(@Nullable JetNamespace namespace, @NotNull NamespaceLike owner, @NotNull String name) {
+ private NamespaceDescriptorImpl createNamespaceDescriptorIfNeeded(@Nullable JetFile file, @NotNull NamespaceLike owner, @NotNull String name) {
NamespaceDescriptorImpl namespaceDescriptor = owner.getNamespace(name);
if (namespaceDescriptor == null) {
namespaceDescriptor = new NamespaceDescriptorImpl(
@@ -221,8 +220,8 @@ public class TypeHierarchyResolver {
namespaceDescriptor.initialize(scope);
context.getConfiguration().extendNamespaceScope(context.getTrace(), namespaceDescriptor, scope);
owner.addNamespace(namespaceDescriptor);
- if (namespace != null) {
- context.getTrace().record(BindingContext.NAMESPACE, namespace, namespaceDescriptor);
+ if (file != null) {
+ context.getTrace().record(BindingContext.NAMESPACE, file, namespaceDescriptor);
}
}
return namespaceDescriptor;
diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/JetStandardLibrary.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/JetStandardLibrary.java
index 2edffdf51ea..1d73774dffa 100644
--- a/compiler/frontend/src/org/jetbrains/jet/lang/types/JetStandardLibrary.java
+++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/JetStandardLibrary.java
@@ -137,7 +137,7 @@ public class JetStandardLibrary {
writableScope.changeLockLevel(WritableScope.LockLevel.BOTH);
// this.libraryScope = bootstrappingTDA.process(JetStandardClasses.STANDARD_CLASSES, file.getRootNamespace().getDeclarations());
// bootstrappingTDA.process(writableScope, JetStandardClasses.STANDARD_CLASSES_NAMESPACE, file.getRootNamespace().getDeclarations());
- TopDownAnalyzer.processStandardLibraryNamespace(bootstrappingSemanticServices, bindingTraceContext, writableScope, JetStandardClasses.STANDARD_CLASSES_NAMESPACE, file.getRootNamespace());
+ TopDownAnalyzer.processStandardLibraryNamespace(bootstrappingSemanticServices, bindingTraceContext, writableScope, JetStandardClasses.STANDARD_CLASSES_NAMESPACE, file);
// this.libraryScope = JetStandardClasses.STANDARD_CLASSES_NAMESPACE.getMemberScope();
AnalyzingUtils.throwExceptionOnErrors(bindingTraceContext.getBindingContext());
diff --git a/compiler/testData/psi/AnnotatedExpressions.txt b/compiler/testData/psi/AnnotatedExpressions.txt
index e7be13766ce..3c6c46dd0a5 100644
--- a/compiler/testData/psi/AnnotatedExpressions.txt
+++ b/compiler/testData/psi/AnnotatedExpressions.txt
@@ -1,48 +1,47 @@
JetFile: AnnotatedExpressions.jet
- NAMESPACE
- NAMESPACE_HEADER
-
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- ANNOTATED_EXPRESSION
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
+ NAMESPACE_HEADER
+
+ FUN
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ ANNOTATED_EXPRESSION
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace('\n ')
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiWhiteSpace('\n ')
+ ANNOTATED_EXPRESSION
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace(' ')
+ THIS_EXPRESSION
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n ')
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('1')
- PsiWhiteSpace('\n ')
- ANNOTATED_EXPRESSION
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- THIS_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(this)('this')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ PsiElement(this)('this')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/AnonymousInitializer.txt b/compiler/testData/psi/AnonymousInitializer.txt
index cd55dd9b27c..76e9aeb1df4 100644
--- a/compiler/testData/psi/AnonymousInitializer.txt
+++ b/compiler/testData/psi/AnonymousInitializer.txt
@@ -1,49 +1,48 @@
JetFile: AnonymousInitializer.jet
- NAMESPACE
- NAMESPACE_HEADER
+ NAMESPACE_HEADER
+
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('Foo')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
- CLASS
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('Foo')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- ANONYMOUS_INITIALIZER
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('c')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace('\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- CONSTRUCTOR
- PsiElement(this)('this')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ ANONYMOUS_INITIALIZER
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('c')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ PsiWhiteSpace('\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ CONSTRUCTOR
+ PsiElement(this)('this')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/Attributes.txt b/compiler/testData/psi/Attributes.txt
index 8119149e1b8..d1dfe903a18 100644
--- a/compiler/testData/psi/Attributes.txt
+++ b/compiler/testData/psi/Attributes.txt
@@ -1,48 +1,112 @@
JetFile: Attributes.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')
- CLASS
- MODIFIER_LIST
- PsiElement(abstract)('abstract')
- PsiWhiteSpace('\n')
- PsiElement(open)('open')
- PsiWhiteSpace('\n')
- PsiElement(enum)('enum')
- PsiWhiteSpace('\n')
- PsiElement(open)('open')
- PsiWhiteSpace('\n')
- PsiElement(annotation)('annotation')
- PsiWhiteSpace('\n')
- PsiElement(override)('override')
- PsiWhiteSpace('\n')
- PsiElement(open)('open')
- PsiWhiteSpace('\n')
- PsiElement(abstract)('abstract')
- PsiWhiteSpace('\n')
- PsiElement(private)('private')
- PsiWhiteSpace('\n')
- PsiElement(protected)('protected')
- PsiWhiteSpace('\n')
- PsiElement(public)('public')
- PsiWhiteSpace('\n')
- PsiElement(internal)('internal')
- PsiWhiteSpace('\n')
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
+ 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')
+ CLASS
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace('\n')
+ PsiElement(open)('open')
+ PsiWhiteSpace('\n')
+ PsiElement(enum)('enum')
+ PsiWhiteSpace('\n')
+ PsiElement(open)('open')
+ PsiWhiteSpace('\n')
+ PsiElement(annotation)('annotation')
+ PsiWhiteSpace('\n')
+ PsiElement(override)('override')
+ PsiWhiteSpace('\n')
+ PsiElement(open)('open')
+ PsiWhiteSpace('\n')
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace('\n')
+ PsiElement(private)('private')
+ PsiWhiteSpace('\n')
+ PsiElement(protected)('protected')
+ PsiWhiteSpace('\n')
+ PsiElement(public)('public')
+ PsiWhiteSpace('\n')
+ PsiElement(internal)('internal')
+ PsiWhiteSpace('\n')
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiElement(GT)('>')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('ina')
+ PsiWhiteSpace(' ')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
USER_TYPE
+ USER_TYPE
+ USER_TYPE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('goo')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('doo')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ PsiElement(GT)('>')
+ PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
TYPE_ARGUMENT_LIST
@@ -51,268 +115,203 @@ JetFile: Attributes.jet
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
+ PsiElement(IDENTIFIER)('bar')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('B')
+ PsiElement(IDENTIFIER)('goo')
PsiElement(GT)('>')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
+ PsiElement(DOT)('.')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_ARGUMENT
+ PsiElement(IDENTIFIER)('foo')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace('\n')
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('ina')
- PsiWhiteSpace(' ')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
+ PsiElement(IDENTIFIER)('df')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace('\n')
+ PsiElement(in)('in')
+ PsiWhiteSpace('\n')
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('sdfsdf')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace('\n')
+ PsiElement(out)('out')
+ PsiWhiteSpace('\n')
+ PsiElement(ref)('ref')
+ PsiWhiteSpace('\n ')
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('Bar')
+ TYPE_PARAMETER_LIST
+ PsiElement(LT)('<')
+ TYPE_PARAMETER
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace('\n')
+ PsiElement(open)('open')
+ PsiWhiteSpace('\n')
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('sdfsdf')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ BINARY_EXPRESSION
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ OPERATION_REFERENCE
+ PsiElement(PLUS)('+')
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace('\n')
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('sdfsdf')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ BINARY_EXPRESSION
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ OPERATION_REFERENCE
+ PsiElement(PLUS)('+')
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RPAR)(')')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace('\n')
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('sdfsdf')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ BINARY_EXPRESSION
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ OPERATION_REFERENCE
+ PsiElement(PLUS)('+')
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RPAR)(')')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace('\n')
+ PsiElement(enum)('enum')
+ PsiWhiteSpace('\n')
+ PsiElement(open)('open')
+ PsiWhiteSpace('\n')
+ PsiElement(annotation)('annotation')
+ PsiWhiteSpace('\n')
+ PsiElement(override)('override')
+ PsiWhiteSpace('\n')
+ PsiElement(open)('open')
+ PsiWhiteSpace('\n')
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace('\n')
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('sdfsd')
+ PsiWhiteSpace(' ')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('sdfsd')
+ PsiWhiteSpace(' ')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
USER_TYPE
USER_TYPE
USER_TYPE
USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(DOT)('.')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
+ PsiElement(IDENTIFIER)('a')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('goo')
+ PsiElement(IDENTIFIER)('b')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('doo')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- PsiElement(GT)('>')
+ PsiElement(IDENTIFIER)('f')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('goo')
- PsiElement(GT)('>')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace('\n')
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('df')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace('\n')
- PsiElement(in)('in')
- PsiWhiteSpace('\n')
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('sdfsdf')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace('\n')
- PsiElement(out)('out')
- PsiWhiteSpace('\n')
- PsiElement(ref)('ref')
- PsiWhiteSpace('\n ')
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('Bar')
- TYPE_PARAMETER_LIST
- PsiElement(LT)('<')
- TYPE_PARAMETER
- MODIFIER_LIST
- PsiElement(abstract)('abstract')
- PsiWhiteSpace('\n')
- PsiElement(open)('open')
- PsiWhiteSpace('\n')
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('sdfsdf')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- BINARY_EXPRESSION
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('1')
- OPERATION_REFERENCE
- PsiElement(PLUS)('+')
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('1')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace('\n')
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('sdfsdf')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- BINARY_EXPRESSION
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('1')
- OPERATION_REFERENCE
- PsiElement(PLUS)('+')
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('1')
- PsiElement(RPAR)(')')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace('\n')
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('sdfsdf')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- BINARY_EXPRESSION
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('1')
- OPERATION_REFERENCE
- PsiElement(PLUS)('+')
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('1')
- PsiElement(RPAR)(')')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace('\n')
- PsiElement(enum)('enum')
- PsiWhiteSpace('\n')
- PsiElement(open)('open')
- PsiWhiteSpace('\n')
- PsiElement(annotation)('annotation')
- PsiWhiteSpace('\n')
- PsiElement(override)('override')
- PsiWhiteSpace('\n')
- PsiElement(open)('open')
- PsiWhiteSpace('\n')
- PsiElement(abstract)('abstract')
- PsiWhiteSpace('\n')
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('sdfsd')
- PsiWhiteSpace(' ')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('sdfsd')
- PsiWhiteSpace(' ')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- USER_TYPE
- USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('c')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace('\n')
- PsiElement(private)('private')
- PsiWhiteSpace('\n')
- PsiElement(protected)('protected')
- PsiWhiteSpace('\n')
- PsiElement(public)('public')
- PsiWhiteSpace('\n')
- PsiElement(internal)('internal')
- PsiWhiteSpace('\n')
- PsiElement(in)('in')
- PsiWhiteSpace('\n')
- PsiElement(out)('out')
- PsiWhiteSpace('\n')
- PsiElement(ref)('ref')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('T')
- PsiElement(GT)('>')
- PsiWhiteSpace(' ')
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ PsiElement(IDENTIFIER)('c')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace('\n')
+ PsiElement(private)('private')
+ PsiWhiteSpace('\n')
+ PsiElement(protected)('protected')
+ PsiWhiteSpace('\n')
+ PsiElement(public)('public')
+ PsiWhiteSpace('\n')
+ PsiElement(internal)('internal')
+ PsiWhiteSpace('\n')
+ PsiElement(in)('in')
+ PsiWhiteSpace('\n')
+ PsiElement(out)('out')
+ PsiWhiteSpace('\n')
+ PsiElement(ref)('ref')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(GT)('>')
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/AttributesOnPatterns.txt b/compiler/testData/psi/AttributesOnPatterns.txt
index c2b2d07c73c..70fe4d48d45 100644
--- a/compiler/testData/psi/AttributesOnPatterns.txt
+++ b/compiler/testData/psi/AttributesOnPatterns.txt
@@ -1,185 +1,184 @@
JetFile: AttributesOnPatterns.jet
- NAMESPACE
- NAMESPACE_HEADER
-
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- VALUE_PARAMETER_LIST
+ NAMESPACE_HEADER
+
+ FUN
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ WHEN
+ PsiElement(when)('when')
+ PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('e')
PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
+ PsiWhiteSpace(' ')
PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\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(' ')
- BINDING_PATTERN
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ WHEN_ENTRY
+ WHEN_CONDITION_IS_PATTERN
+ PsiElement(is)('is')
PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('d')
- PsiWhiteSpace('\n ')
- WHEN_ENTRY
- WHEN_CONDITION_IS_PATTERN
- PsiElement(is)('is')
- PsiWhiteSpace(' ')
- BINDING_PATTERN
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- WHEN_CONDITION_IS_PATTERN
- PsiElement(is)('is')
- PsiWhiteSpace(' ')
- TYPE_PATTERN
+ BINDING_PATTERN
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('d')
- PsiWhiteSpace('\n ')
- WHEN_ENTRY
- WHEN_CONDITION_IS_PATTERN
- PsiElement(is)('is')
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
- WILDCARD_PATTERN
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
+ PROPERTY
+ PsiElement(val)('val')
PsiWhiteSpace(' ')
- PsiElement(MUL)('*')
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('d')
+ PsiWhiteSpace('\n ')
+ WHEN_ENTRY
+ WHEN_CONDITION_IS_PATTERN
+ PsiElement(is)('is')
PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('d')
- PsiWhiteSpace('\n ')
- WHEN_ENTRY
- WHEN_CONDITION_IS_PATTERN
- PsiElement(is)('is')
+ BINDING_PATTERN
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
- EXPRESSION_PATTERN
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
+ PROPERTY
+ PsiElement(val)('val')
PsiWhiteSpace(' ')
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('2')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('d')
- PsiWhiteSpace('\n ')
- WHEN_ENTRY
- WHEN_CONDITION_IS_PATTERN
- PsiElement(is)('is')
+ PsiElement(IDENTIFIER)('a')
PsiWhiteSpace(' ')
- TYPE_PATTERN
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
+ WHEN_CONDITION_IS_PATTERN
+ PsiElement(is)('is')
PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
+ TYPE_PATTERN
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('d')
+ PsiWhiteSpace('\n ')
+ WHEN_ENTRY
+ WHEN_CONDITION_IS_PATTERN
+ PsiElement(is)('is')
PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('d')
- PsiWhiteSpace('\n ')
- WHEN_ENTRY
- WHEN_CONDITION_IS_PATTERN
- PsiElement(is)('is')
+ WILDCARD_PATTERN
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
- DECOMPOSER_PATTERN
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiWhiteSpace(' ')
- DECOMPOSER_ARGUMENT_LIST
- PsiElement(HASH)('#')
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
+ PsiElement(MUL)('*')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('d')
+ PsiWhiteSpace('\n ')
+ WHEN_ENTRY
+ WHEN_CONDITION_IS_PATTERN
+ PsiElement(is)('is')
PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
+ EXPRESSION_PATTERN
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace(' ')
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('2')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('d')
+ PsiWhiteSpace('\n ')
+ WHEN_ENTRY
+ WHEN_CONDITION_IS_PATTERN
+ PsiElement(is)('is')
PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('d')
- PsiWhiteSpace('\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ TYPE_PATTERN
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('T')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('d')
+ PsiWhiteSpace('\n ')
+ WHEN_ENTRY
+ WHEN_CONDITION_IS_PATTERN
+ PsiElement(is)('is')
+ PsiWhiteSpace(' ')
+ DECOMPOSER_PATTERN
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('T')
+ PsiWhiteSpace(' ')
+ DECOMPOSER_ARGUMENT_LIST
+ PsiElement(HASH)('#')
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('d')
+ PsiWhiteSpace('\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/Attributes_ERR.txt b/compiler/testData/psi/Attributes_ERR.txt
index 9a1cb87e2ca..6c5ccaa76e3 100644
--- a/compiler/testData/psi/Attributes_ERR.txt
+++ b/compiler/testData/psi/Attributes_ERR.txt
@@ -1,54 +1,120 @@
JetFile: Attributes_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')
- CLASS
- MODIFIER_LIST
- PsiElement(abstract)('abstract')
- PsiWhiteSpace('\n')
- PsiElement(open)('open')
- PsiWhiteSpace('\n')
- PsiElement(enum)('enum')
- PsiWhiteSpace('\n')
- PsiElement(open)('open')
- PsiWhiteSpace('\n')
- PsiElement(annotation)('annotation')
- PsiWhiteSpace('\n')
- PsiElement(override)('override')
- PsiWhiteSpace('\n')
- PsiElement(open)('open')
- PsiWhiteSpace('\n')
- PsiElement(abstract)('abstract')
- PsiWhiteSpace('\n')
- ANNOTATION
- PsiElement(LBRACKET)('[')
- PsiErrorElement:Expecting a list of attributes
-
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace('\n')
- PsiElement(private)('private')
- PsiWhiteSpace('\n')
- PsiElement(protected)('protected')
- PsiWhiteSpace('\n')
- PsiElement(public)('public')
- PsiWhiteSpace('\n')
- PsiElement(internal)('internal')
- PsiWhiteSpace('\n')
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
+ 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')
+ CLASS
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace('\n')
+ PsiElement(open)('open')
+ PsiWhiteSpace('\n')
+ PsiElement(enum)('enum')
+ PsiWhiteSpace('\n')
+ PsiElement(open)('open')
+ PsiWhiteSpace('\n')
+ PsiElement(annotation)('annotation')
+ PsiWhiteSpace('\n')
+ PsiElement(override)('override')
+ PsiWhiteSpace('\n')
+ PsiElement(open)('open')
+ PsiWhiteSpace('\n')
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace('\n')
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ PsiErrorElement:Expecting a list of attributes
+
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace('\n')
+ PsiElement(private)('private')
+ PsiWhiteSpace('\n')
+ PsiElement(protected)('protected')
+ PsiWhiteSpace('\n')
+ PsiElement(public)('public')
+ PsiWhiteSpace('\n')
+ PsiElement(internal)('internal')
+ PsiWhiteSpace('\n')
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiElement(GT)('>')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(RPAR)(')')
+ PsiErrorElement:No commas needed to separate attributes
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('ina')
+ PsiWhiteSpace(' ')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
USER_TYPE
+ USER_TYPE
+ USER_TYPE
+ USER_TYPE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('goo')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('doo')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ PsiElement(GT)('>')
+ PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
TYPE_ARGUMENT_LIST
@@ -57,218 +123,151 @@ JetFile: Attributes_ERR.jet
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
+ PsiElement(IDENTIFIER)('bar')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('B')
+ PsiElement(IDENTIFIER)('goo')
PsiElement(GT)('>')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
+ PsiElement(DOT)('.')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_ARGUMENT
+ PsiElement(IDENTIFIER)('foo')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace('\n')
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(RPAR)(')')
- PsiErrorElement:No commas needed to separate attributes
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('ina')
- PsiWhiteSpace(' ')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
+ PsiElement(IDENTIFIER)('df')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace('\n')
+ PsiElement(in)('in')
+ PsiWhiteSpace('\n')
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('sdfsdf')
+ PsiWhiteSpace(' ')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace('\n')
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('s')
+ PsiWhiteSpace(' ')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('fd')
+ PsiWhiteSpace(' ')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('d')
+ PsiErrorElement:No commas needed to separate attributes
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace('\n')
+ PsiElement(out)('out')
+ PsiWhiteSpace('\n')
+ PsiElement(ref)('ref')
+ PsiWhiteSpace('\n ')
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('Bar')
+ TYPE_PARAMETER_LIST
+ PsiElement(LT)('<')
+ TYPE_PARAMETER
+ MODIFIER_LIST
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace('\n')
+ PsiElement(open)('open')
+ PsiWhiteSpace('\n')
+ PsiElement(enum)('enum')
+ PsiWhiteSpace('\n')
+ PsiElement(open)('open')
+ PsiWhiteSpace('\n')
+ PsiElement(annotation)('annotation')
+ PsiWhiteSpace('\n')
+ PsiElement(override)('override')
+ PsiWhiteSpace('\n')
+ PsiElement(open)('open')
+ PsiWhiteSpace('\n')
+ PsiElement(abstract)('abstract')
+ PsiWhiteSpace('\n')
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('sdfsd')
+ PsiWhiteSpace(' ')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('sdfsd')
+ PsiWhiteSpace(' ')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
USER_TYPE
USER_TYPE
USER_TYPE
USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(DOT)('.')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
+ PsiElement(IDENTIFIER)('a')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('goo')
+ PsiElement(IDENTIFIER)('b')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('doo')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- PsiElement(GT)('>')
+ PsiElement(IDENTIFIER)('f')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('goo')
- PsiElement(GT)('>')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace('\n')
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('df')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace('\n')
- PsiElement(in)('in')
- PsiWhiteSpace('\n')
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('sdfsdf')
- PsiWhiteSpace(' ')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace('\n')
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('s')
- PsiWhiteSpace(' ')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('fd')
- PsiWhiteSpace(' ')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('d')
- PsiErrorElement:No commas needed to separate attributes
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace('\n')
- PsiElement(out)('out')
- PsiWhiteSpace('\n')
- PsiElement(ref)('ref')
- PsiWhiteSpace('\n ')
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('Bar')
- TYPE_PARAMETER_LIST
- PsiElement(LT)('<')
- TYPE_PARAMETER
- MODIFIER_LIST
- PsiElement(abstract)('abstract')
- PsiWhiteSpace('\n')
- PsiElement(open)('open')
- PsiWhiteSpace('\n')
- PsiElement(enum)('enum')
- PsiWhiteSpace('\n')
- PsiElement(open)('open')
- PsiWhiteSpace('\n')
- PsiElement(annotation)('annotation')
- PsiWhiteSpace('\n')
- PsiElement(override)('override')
- PsiWhiteSpace('\n')
- PsiElement(open)('open')
- PsiWhiteSpace('\n')
- PsiElement(abstract)('abstract')
- PsiWhiteSpace('\n')
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('sdfsd')
- PsiWhiteSpace(' ')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('sdfsd')
- PsiWhiteSpace(' ')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- USER_TYPE
- USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('c')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace('\n')
- PsiElement(private)('private')
- PsiWhiteSpace('\n')
- PsiElement(protected)('protected')
- PsiWhiteSpace('\n')
- PsiElement(public)('public')
- PsiWhiteSpace('\n')
- PsiElement(internal)('internal')
- PsiWhiteSpace('\n')
- PsiElement(in)('in')
- PsiWhiteSpace('\n')
- PsiElement(out)('out')
- PsiWhiteSpace('\n')
- PsiElement(ref)('ref')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('T')
- PsiElement(GT)('>')
- PsiWhiteSpace(' ')
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ PsiElement(IDENTIFIER)('c')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace('\n')
+ PsiElement(private)('private')
+ PsiWhiteSpace('\n')
+ PsiElement(protected)('protected')
+ PsiWhiteSpace('\n')
+ PsiElement(public)('public')
+ PsiWhiteSpace('\n')
+ PsiElement(internal)('internal')
+ PsiWhiteSpace('\n')
+ PsiElement(in)('in')
+ PsiWhiteSpace('\n')
+ PsiElement(out)('out')
+ PsiWhiteSpace('\n')
+ PsiElement(ref)('ref')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(GT)('>')
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/BabySteps.txt b/compiler/testData/psi/BabySteps.txt
index 237827701cd..4031aa393da 100644
--- a/compiler/testData/psi/BabySteps.txt
+++ b/compiler/testData/psi/BabySteps.txt
@@ -1,80 +1,79 @@
JetFile: BabySteps.jet
- NAMESPACE
- NAMESPACE_HEADER
- PsiElement(namespace)('package')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n\n')
- CLASS
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('Runnable')
- TYPE_PARAMETER_LIST
- PsiElement(LT)('<')
- TYPE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiElement(COMMA)(',')
- TYPE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiElement(GT)('>')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('doo')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('0')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- DELEGATION_SPECIFIER_LIST
- DELEGATOR_SUPER_CALL
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- VALUE_ARGUMENT_NAME
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('d')
- PsiElement(EQ)('=')
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('0')
- PsiElement(RPAR)(')')
- PsiElement(COMMA)(',')
+ NAMESPACE_HEADER
+ PsiElement(namespace)('package')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace('\n\n')
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('Runnable')
+ TYPE_PARAMETER_LIST
+ PsiElement(LT)('<')
+ TYPE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
+ TYPE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(GT)('>')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
PsiWhiteSpace(' ')
- DELEGATOR_BY
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiWhiteSpace(' ')
- PsiElement(by)('by')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('x')
- PsiElement(COMMA)(',')
+ PsiElement(COLON)(':')
PsiWhiteSpace(' ')
- DELEGATOR_SUPER_CLASS
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('doo')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('0')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ DELEGATION_SPECIFIER_LIST
+ DELEGATOR_SUPER_CALL
+ CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
+ PsiElement(IDENTIFIER)('foo')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ VALUE_ARGUMENT_NAME
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('d')
+ PsiElement(EQ)('=')
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('0')
+ PsiElement(RPAR)(')')
+ PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ DELEGATOR_BY
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiWhiteSpace(' ')
+ PsiElement(by)('by')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ DELEGATOR_SUPER_CLASS
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/BabySteps_ERR.txt b/compiler/testData/psi/BabySteps_ERR.txt
index 4838223fe42..c961672268c 100644
--- a/compiler/testData/psi/BabySteps_ERR.txt
+++ b/compiler/testData/psi/BabySteps_ERR.txt
@@ -1,82 +1,81 @@
JetFile: BabySteps_ERR.jet
- NAMESPACE
- NAMESPACE_HEADER
- PsiElement(namespace)('package')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n\n')
- CLASS
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('Runnable')
- TYPE_PARAMETER_LIST
- PsiElement(LT)('<')
- TYPE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiElement(COMMA)(',')
- TYPE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiElement(GT)('>')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('doo')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('0')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- DELEGATION_SPECIFIER_LIST
- DELEGATOR_SUPER_CALL
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- VALUE_ARGUMENT_NAME
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('d')
- PsiElement(EQ)('=')
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('0')
- PsiElement(RPAR)(')')
- PsiElement(COMMA)(',')
+ NAMESPACE_HEADER
+ PsiElement(namespace)('package')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace('\n\n')
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('Runnable')
+ TYPE_PARAMETER_LIST
+ PsiElement(LT)('<')
+ TYPE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
+ TYPE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(GT)('>')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
PsiWhiteSpace(' ')
- PsiErrorElement:Expecting a delegation specifier
- PsiElement(COMMA)(',')
- DELEGATOR_BY
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiWhiteSpace(' ')
- PsiElement(by)('by')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('x')
- PsiElement(COMMA)(',')
+ PsiElement(COLON)(':')
PsiWhiteSpace(' ')
- DELEGATOR_SUPER_CLASS
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('doo')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('0')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ DELEGATION_SPECIFIER_LIST
+ DELEGATOR_SUPER_CALL
+ CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
+ PsiElement(IDENTIFIER)('foo')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ VALUE_ARGUMENT_NAME
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('d')
+ PsiElement(EQ)('=')
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('0')
+ PsiElement(RPAR)(')')
+ PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ PsiErrorElement:Expecting a delegation specifier
+ PsiElement(COMMA)(',')
+ DELEGATOR_BY
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiWhiteSpace(' ')
+ PsiElement(by)('by')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ DELEGATOR_SUPER_CLASS
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/ByCaluses.txt b/compiler/testData/psi/ByCaluses.txt
index 0778b080397..baa18e969f7 100644
--- a/compiler/testData/psi/ByCaluses.txt
+++ b/compiler/testData/psi/ByCaluses.txt
@@ -1,156 +1,205 @@
JetFile: ByCaluses.jet
- NAMESPACE
- NAMESPACE_HEADER
+ NAMESPACE_HEADER
+
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('A')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
- CLASS
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('A')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- DELEGATION_SPECIFIER_LIST
- DELEGATOR_BY
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace(' ')
- PsiElement(by)('by')
- PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ DELEGATION_SPECIFIER_LIST
+ DELEGATOR_BY
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace(' ')
+ PsiElement(by)('by')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ CONSTRUCTOR
+ PsiElement(this)('this')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('A')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
+
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ DELEGATION_SPECIFIER_LIST
+ DELEGATOR_BY
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace(' ')
+ PsiElement(by)('by')
+ PsiWhiteSpace(' ')
+ BINARY_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- CONSTRUCTOR
- PsiElement(this)('this')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- CLASS
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('A')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- DELEGATION_SPECIFIER_LIST
- DELEGATOR_BY
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace(' ')
- PsiElement(by)('by')
+ OPERATION_REFERENCE
+ PsiElement(PLUS)('+')
PsiWhiteSpace(' ')
BINARY_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
- PsiElement(PLUS)('+')
+ PsiElement(MUL)('*')
PsiWhiteSpace(' ')
- BINARY_EXPRESSION
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- OPERATION_REFERENCE
- PsiElement(MUL)('*')
- PsiWhiteSpace(' ')
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('5')
- PsiWhiteSpace(' ')
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- CONSTRUCTOR
- PsiElement(this)('this')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- CLASS
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('A')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- DELEGATION_SPECIFIER_LIST
- DELEGATOR_BY
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace(' ')
- PsiElement(by)('by')
- PsiWhiteSpace(' ')
- PARENTHESIZED
- PsiElement(LPAR)('(')
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('5')
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ CONSTRUCTOR
+ PsiElement(this)('this')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('A')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
+
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ DELEGATION_SPECIFIER_LIST
+ DELEGATOR_BY
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace(' ')
+ PsiElement(by)('by')
+ PsiWhiteSpace(' ')
+ PARENTHESIZED
+ PsiElement(LPAR)('(')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ CONSTRUCTOR
+ PsiElement(this)('this')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('A')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
+
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ DELEGATION_SPECIFIER_LIST
+ DELEGATOR_BY
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace(' ')
+ PsiElement(by)('by')
+ PsiWhiteSpace(' ')
+ PARENTHESIZED
+ PsiElement(LPAR)('(')
+ CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- CONSTRUCTOR
- PsiElement(this)('this')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- CLASS
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('A')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- DELEGATION_SPECIFIER_LIST
- DELEGATOR_BY
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace(' ')
- PsiElement(by)('by')
- PsiWhiteSpace(' ')
- PARENTHESIZED
- PsiElement(LPAR)('(')
+ PsiWhiteSpace(' ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ CONSTRUCTOR
+ PsiElement(this)('this')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('A')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
+
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ DELEGATION_SPECIFIER_LIST
+ DELEGATOR_BY
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace(' ')
+ PsiElement(by)('by')
+ PsiWhiteSpace(' ')
+ ARRAY_ACCESS_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ INDICES
+ PsiElement(LBRACKET)('[')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
@@ -161,46 +210,47 @@ JetFile: ByCaluses.jet
BLOCK
PsiElement(RBRACE)('}')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- CONSTRUCTOR
- PsiElement(this)('this')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- CLASS
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('A')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- DELEGATION_SPECIFIER_LIST
- DELEGATOR_BY
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace(' ')
- PsiElement(by)('by')
- PsiWhiteSpace(' ')
- ARRAY_ACCESS_EXPRESSION
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ CONSTRUCTOR
+ PsiElement(this)('this')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('A')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
+
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ DELEGATION_SPECIFIER_LIST
+ DELEGATOR_BY
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- INDICES
- PsiElement(LBRACKET)('[')
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace(' ')
+ PsiElement(by)('by')
+ PsiWhiteSpace(' ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
@@ -211,47 +261,58 @@ JetFile: ByCaluses.jet
BLOCK
PsiElement(RBRACE)('}')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- CONSTRUCTOR
- PsiElement(this)('this')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- CLASS
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('A')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- DELEGATION_SPECIFIER_LIST
- DELEGATOR_BY
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace(' ')
- PsiElement(by)('by')
- PsiWhiteSpace(' ')
- CALL_EXPRESSION
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ CONSTRUCTOR
+ PsiElement(this)('this')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('A')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
+
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ DELEGATION_SPECIFIER_LIST
+ DELEGATOR_BY
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace(' ')
+ PsiElement(by)('by')
+ PsiWhiteSpace(' ')
+ OBJECT_LITERAL
+ OBJECT_DECLARATION
+ PsiElement(object)('object')
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ FUN
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('f')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
@@ -262,82 +323,20 @@ JetFile: ByCaluses.jet
BLOCK
PsiElement(RBRACE)('}')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- CONSTRUCTOR
- PsiElement(this)('this')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- CLASS
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('A')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- DELEGATION_SPECIFIER_LIST
- DELEGATOR_BY
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace(' ')
- PsiElement(by)('by')
- PsiWhiteSpace(' ')
- OBJECT_LITERAL
- OBJECT_DECLARATION
- PsiElement(object)('object')
- PsiWhiteSpace(' ')
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- CONSTRUCTOR
- PsiElement(this)('this')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ CONSTRUCTOR
+ PsiElement(this)('this')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/CallWithManyClosures.txt b/compiler/testData/psi/CallWithManyClosures.txt
index d7516b299ae..4fa8128e036 100644
--- a/compiler/testData/psi/CallWithManyClosures.txt
+++ b/compiler/testData/psi/CallWithManyClosures.txt
@@ -1,228 +1,227 @@
JetFile: CallWithManyClosures.jet
- NAMESPACE
- NAMESPACE_HEADER
-
- PROPERTY
- PsiElement(val)('val')
+ NAMESPACE_HEADER
+
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('a')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
- CALL_EXPRESSION
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ PsiWhiteSpace(' ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace(' ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace(' ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ PsiWhiteSpace(' ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ CALL_EXPRESSION
+ PARENTHESIZED
+ PsiElement(LPAR)('(')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('f')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PROPERTY
- PsiElement(val)('val')
+ PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('a')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
- CALL_EXPRESSION
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ CALL_EXPRESSION
+ PARENTHESIZED
+ PsiElement(LPAR)('(')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PROPERTY
- PsiElement(val)('val')
+ PsiElement(RPAR)(')')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('a')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
- CALL_EXPRESSION
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ CALL_EXPRESSION
+ PARENTHESIZED
+ PsiElement(LPAR)('(')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PROPERTY
- PsiElement(val)('val')
+ PsiElement(RPAR)(')')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(GT)('>')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('a')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- CALL_EXPRESSION
- PARENTHESIZED
- PsiElement(LPAR)('(')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- CALL_EXPRESSION
- PARENTHESIZED
- PsiElement(LPAR)('(')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- PsiElement(RPAR)(')')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- CALL_EXPRESSION
- PARENTHESIZED
- PsiElement(LPAR)('(')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- PsiElement(RPAR)(')')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- PsiElement(GT)('>')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/CallsInWhen.txt b/compiler/testData/psi/CallsInWhen.txt
index d67bce4cd23..7feb6a3648e 100644
--- a/compiler/testData/psi/CallsInWhen.txt
+++ b/compiler/testData/psi/CallsInWhen.txt
@@ -1,231 +1,230 @@
JetFile: CallsInWhen.jet
- NAMESPACE
- NAMESPACE_HEADER
-
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- VALUE_PARAMETER_LIST
+ NAMESPACE_HEADER
+
+ FUN
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ WHEN
+ PsiElement(when)('when')
+ PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
+ PsiWhiteSpace(' ')
PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- WHEN
- PsiElement(when)('when')
+ PsiWhiteSpace('\n ')
+ WHEN_ENTRY
+ WHEN_CONDITION_IS_PATTERN
+ EXPRESSION_PATTERN
+ DOT_QUALIFIED_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- WHEN_ENTRY
- WHEN_CONDITION_IS_PATTERN
- EXPRESSION_PATTERN
- DOT_QUALIFIED_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(DOT)('.')
+ PsiWhiteSpace('\n ')
+ WHEN_ENTRY
+ WHEN_CONDITION_IS_PATTERN
+ EXPRESSION_PATTERN
+ DOT_QUALIFIED_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(DOT)('.')
+ CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
- WHEN_ENTRY
- WHEN_CONDITION_IS_PATTERN
- EXPRESSION_PATTERN
- DOT_QUALIFIED_EXPRESSION
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ WHEN_ENTRY
+ WHEN_CONDITION_IS_PATTERN
+ EXPRESSION_PATTERN
+ DOT_QUALIFIED_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(DOT)('.')
+ CALL_EXPRESSION
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(DOT)('.')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
- WHEN_ENTRY
- WHEN_CONDITION_IS_PATTERN
- EXPRESSION_PATTERN
- DOT_QUALIFIED_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(GT)('>')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ WHEN_ENTRY
+ WHEN_CONDITION_IS_PATTERN
+ EXPRESSION_PATTERN
+ DOT_QUALIFIED_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(DOT)('.')
+ CALL_EXPRESSION
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(DOT)('.')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(GT)('>')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
- WHEN_ENTRY
- WHEN_CONDITION_IS_PATTERN
- EXPRESSION_PATTERN
- DOT_QUALIFIED_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ 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
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ WHEN_ENTRY
+ WHEN_CONDITION_IS_PATTERN
+ EXPRESSION_PATTERN
+ DOT_QUALIFIED_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(DOT)('.')
+ CALL_EXPRESSION
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(DOT)('.')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- 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
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
- WHEN_ENTRY
- WHEN_CONDITION_IS_PATTERN
- EXPRESSION_PATTERN
- DOT_QUALIFIED_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(DOT)('.')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- 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
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('d')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
- WHEN_ENTRY
- WHEN_CONDITION_IS_PATTERN
- EXPRESSION_PATTERN
- DOT_QUALIFIED_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(DOT)('.')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
+ PsiElement(IDENTIFIER)('foo')
+ 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
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('d')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ WHEN_ENTRY
+ WHEN_CONDITION_IS_PATTERN
+ EXPRESSION_PATTERN
+ DOT_QUALIFIED_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(DOT)('.')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ WHEN_ENTRY
+ WHEN_CONDITION_IS_PATTERN
+ EXPRESSION_PATTERN
+ DOT_QUALIFIED_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(DOT)('.')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ PREFIX_EXPRESSION
+ OPERATION_REFERENCE
+ PsiElement(EXCL)('!')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
- WHEN_ENTRY
- WHEN_CONDITION_IS_PATTERN
- EXPRESSION_PATTERN
- DOT_QUALIFIED_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(DOT)('.')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
- PREFIX_EXPRESSION
- OPERATION_REFERENCE
- PsiElement(EXCL)('!')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
- WHEN_ENTRY
- WHEN_CONDITION_IS_PATTERN
- EXPRESSION_PATTERN
- DOT_QUALIFIED_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(DOT)('.')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- PREFIX_EXPRESSION
- OPERATION_REFERENCE
- PsiElement(EXCL)('!')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
- WHEN_ENTRY
- PsiElement(else)('else')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ WHEN_ENTRY
+ WHEN_CONDITION_IS_PATTERN
+ EXPRESSION_PATTERN
+ DOT_QUALIFIED_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(DOT)('.')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PREFIX_EXPRESSION
+ OPERATION_REFERENCE
+ PsiElement(EXCL)('!')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ WHEN_ENTRY
+ PsiElement(else)('else')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/Constructors.txt b/compiler/testData/psi/Constructors.txt
index 1a133292303..dc1ca863673 100644
--- a/compiler/testData/psi/Constructors.txt
+++ b/compiler/testData/psi/Constructors.txt
@@ -1,233 +1,232 @@
JetFile: Constructors.jet
- NAMESPACE
- NAMESPACE_HEADER
+ NAMESPACE_HEADER
+
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
- CLASS
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- CONSTRUCTOR
- PsiElement(this)('this')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- INITIALIZER_LIST
- THIS_CALL
- THIS_CONSTRUCTOR_REFERENCE
- PsiElement(this)('this')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('c')
- PsiElement(RPAR)(')')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- DELEGATOR_SUPER_CALL
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Foo')
- 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
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n\n ')
- CONSTRUCTOR
- PsiElement(this)('this')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('foo')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ CONSTRUCTOR
+ PsiElement(this)('this')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ INITIALIZER_LIST
+ THIS_CALL
+ THIS_CONSTRUCTOR_REFERENCE
+ PsiElement(this)('this')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('c')
+ PsiElement(RPAR)(')')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ DELEGATOR_SUPER_CALL
+ CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- INITIALIZER_LIST
- THIS_CALL
- THIS_CONSTRUCTOR_REFERENCE
- PsiElement(this)('this')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('c')
- PsiElement(RPAR)(')')
- PsiElement(COMMA)(',')
+ PsiElement(IDENTIFIER)('Foo')
+ 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
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n\n ')
+ CONSTRUCTOR
+ PsiElement(this)('this')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('foo')
PsiWhiteSpace(' ')
- DELEGATOR_SUPER_CALL
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Foo')
- 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
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(RPAR)(')')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ INITIALIZER_LIST
+ THIS_CALL
+ THIS_CONSTRUCTOR_REFERENCE
+ PsiElement(this)('this')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('c')
+ PsiElement(RPAR)(')')
+ PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n')
- CLASS
- MODIFIER_LIST
- PsiElement(public)('public')
- PsiWhiteSpace(' ')
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- TYPE_PARAMETER_LIST
-
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- DELEGATION_SPECIFIER_LIST
- DELEGATOR_SUPER_CLASS
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Bar')
- PsiWhiteSpace('\n')
- CLASS
- MODIFIER_LIST
- PsiElement(protected)('protected')
- PsiWhiteSpace(' ')
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PRIMARY_CONSTRUCTOR_MODIFIER_LIST
- PsiElement(private)('private')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- DELEGATION_SPECIFIER_LIST
- DELEGATOR_SUPER_CLASS
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Bar')
- PsiWhiteSpace('\n')
- CLASS
- MODIFIER_LIST
- PsiElement(private)('private')
- PsiWhiteSpace(' ')
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- TYPE_PARAMETER_LIST
- PsiElement(LT)('<')
- TYPE_PARAMETER
- PsiElement(IDENTIFIER)('T')
- PsiElement(GT)('>')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- DELEGATION_SPECIFIER_LIST
- DELEGATOR_SUPER_CLASS
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Bar')
- PsiWhiteSpace('\n')
- CLASS
- MODIFIER_LIST
- PsiElement(internal)('internal')
- PsiWhiteSpace(' ')
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- TYPE_PARAMETER_LIST
- PsiElement(LT)('<')
- TYPE_PARAMETER
- PsiElement(IDENTIFIER)('T')
- PsiElement(GT)('>')
- PsiWhiteSpace(' ')
- PRIMARY_CONSTRUCTOR_MODIFIER_LIST
- PsiElement(private)('private')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- DELEGATION_SPECIFIER_LIST
- DELEGATOR_SUPER_CLASS
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Bar')
\ No newline at end of file
+ DELEGATOR_SUPER_CALL
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Foo')
+ 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
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n')
+ CLASS
+ MODIFIER_LIST
+ PsiElement(public)('public')
+ PsiWhiteSpace(' ')
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ TYPE_PARAMETER_LIST
+
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ DELEGATION_SPECIFIER_LIST
+ DELEGATOR_SUPER_CLASS
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
+ PsiWhiteSpace('\n')
+ CLASS
+ MODIFIER_LIST
+ PsiElement(protected)('protected')
+ PsiWhiteSpace(' ')
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
+
+ PRIMARY_CONSTRUCTOR_MODIFIER_LIST
+ PsiElement(private)('private')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ DELEGATION_SPECIFIER_LIST
+ DELEGATOR_SUPER_CLASS
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
+ PsiWhiteSpace('\n')
+ CLASS
+ MODIFIER_LIST
+ PsiElement(private)('private')
+ PsiWhiteSpace(' ')
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ TYPE_PARAMETER_LIST
+ PsiElement(LT)('<')
+ TYPE_PARAMETER
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(GT)('>')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ DELEGATION_SPECIFIER_LIST
+ DELEGATOR_SUPER_CLASS
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
+ PsiWhiteSpace('\n')
+ CLASS
+ MODIFIER_LIST
+ PsiElement(internal)('internal')
+ PsiWhiteSpace(' ')
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ TYPE_PARAMETER_LIST
+ PsiElement(LT)('<')
+ TYPE_PARAMETER
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(GT)('>')
+ PsiWhiteSpace(' ')
+ PRIMARY_CONSTRUCTOR_MODIFIER_LIST
+ PsiElement(private)('private')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ DELEGATION_SPECIFIER_LIST
+ DELEGATOR_SUPER_CLASS
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
\ No newline at end of file
diff --git a/compiler/testData/psi/ControlStructures.txt b/compiler/testData/psi/ControlStructures.txt
index 7f0b690968b..04a121bde77 100644
--- a/compiler/testData/psi/ControlStructures.txt
+++ b/compiler/testData/psi/ControlStructures.txt
@@ -1,991 +1,990 @@
JetFile: ControlStructures.jet
- NAMESPACE
- NAMESPACE_HEADER
-
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('a')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiWhiteSpace('\n ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
+ NAMESPACE_HEADER
+
+ FUN
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiWhiteSpace('\n ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ THROW
+ PsiElement(throw)('throw')
PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- THROW
- PsiElement(throw)('throw')
- PsiWhiteSpace(' ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Foo')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiElement(COMMA)(',')
- PsiWhiteSpace('\n ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- RETURN
- PsiElement(return)('return')
- PsiWhiteSpace(' ')
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('10')
- PsiElement(COMMA)(',')
- PsiWhiteSpace('\n ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- BREAK
- PsiElement(break)('break')
- PsiElement(COMMA)(',')
- PsiWhiteSpace('\n ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- BREAK
- PsiElement(break)('break')
- PsiWhiteSpace(' ')
- LABEL_QUALIFIER
- LABEL_REFERENCE
- PsiElement(LABEL_IDENTIFIER)('@la')
- PsiElement(COMMA)(',')
- PsiWhiteSpace('\n ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- CONTINUE
- PsiElement(continue)('continue')
- PsiElement(COMMA)(',')
- PsiWhiteSpace('\n ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- CONTINUE
- PsiElement(continue)('continue')
- PsiWhiteSpace(' ')
- LABEL_QUALIFIER
- LABEL_REFERENCE
- PsiElement(LABEL_IDENTIFIER)('@la')
- PsiElement(COMMA)(',')
- PsiWhiteSpace('\n ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('10')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- THEN
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(else)('else')
- PsiWhiteSpace(' ')
- ELSE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(COMMA)(',')
- PsiWhiteSpace('\n ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('10')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- THEN
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Foo')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace('\n ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
RETURN
PsiElement(return)('return')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('10')
- PsiWhiteSpace('\n ')
- RETURN
- PsiElement(return)('return')
- PsiWhiteSpace('\n ')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace('\n ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ BREAK
+ PsiElement(break)('break')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace('\n ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ BREAK
+ PsiElement(break)('break')
+ PsiWhiteSpace(' ')
+ LABEL_QUALIFIER
+ LABEL_REFERENCE
+ PsiElement(LABEL_IDENTIFIER)('@la')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace('\n ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ CONTINUE
+ PsiElement(continue)('continue')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace('\n ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ CONTINUE
+ PsiElement(continue)('continue')
+ PsiWhiteSpace(' ')
+ LABEL_QUALIFIER
+ LABEL_REFERENCE
+ PsiElement(LABEL_IDENTIFIER)('@la')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace('\n ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('10')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ THEN
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace(' ')
+ PsiElement(else)('else')
+ PsiWhiteSpace(' ')
+ ELSE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace('\n ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('10')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ THEN
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace('\n')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ RETURN
+ PsiElement(return)('return')
+ PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('10')
+ PsiWhiteSpace('\n ')
+ RETURN
+ PsiElement(return)('return')
+ PsiWhiteSpace('\n ')
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('10')
+ PsiWhiteSpace('\n ')
+ BREAK
+ PsiElement(break)('break')
+ PsiWhiteSpace('\n ')
+ PREFIX_EXPRESSION
+ OPERATION_REFERENCE
+ PsiElement(LABEL_IDENTIFIER)('@la')
PsiWhiteSpace('\n ')
BREAK
PsiElement(break)('break')
- PsiWhiteSpace('\n ')
- PREFIX_EXPRESSION
- OPERATION_REFERENCE
- PsiElement(LABEL_IDENTIFIER)('@la')
- PsiWhiteSpace('\n ')
- BREAK
- PsiElement(break)('break')
- PsiWhiteSpace(' ')
- LABEL_QUALIFIER
- LABEL_REFERENCE
- PsiElement(LABEL_IDENTIFIER)('@la')
+ PsiWhiteSpace(' ')
+ LABEL_QUALIFIER
+ LABEL_REFERENCE
+ PsiElement(LABEL_IDENTIFIER)('@la')
+ PsiWhiteSpace('\n ')
+ CONTINUE
+ PsiElement(continue)('continue')
+ PsiWhiteSpace('\n ')
+ PREFIX_EXPRESSION
+ OPERATION_REFERENCE
+ PsiElement(LABEL_IDENTIFIER)('@la')
PsiWhiteSpace('\n ')
CONTINUE
PsiElement(continue)('continue')
- PsiWhiteSpace('\n ')
- PREFIX_EXPRESSION
- OPERATION_REFERENCE
- PsiElement(LABEL_IDENTIFIER)('@la')
- PsiWhiteSpace('\n ')
- CONTINUE
- PsiElement(continue)('continue')
- PsiWhiteSpace(' ')
- LABEL_QUALIFIER
- LABEL_REFERENCE
- PsiElement(LABEL_IDENTIFIER)('@la')
- PsiWhiteSpace('\n ')
- IF
- PsiElement(if)('if')
PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- THEN
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- THEN
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiWhiteSpace('\n ')
- PsiElement(else)('else')
- PsiWhiteSpace('\n ')
- ELSE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n ')
- PsiElement(else)('else')
- PsiWhiteSpace(' ')
- ELSE
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- THEN
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiWhiteSpace('\n ')
- PsiElement(else)('else')
- PsiWhiteSpace('\n ')
- ELSE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiWhiteSpace('\n\n ')
- TRY
- PsiElement(try)('try')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- CATCH
- PsiElement(catch)('catch')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('Foo')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Bar')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- TRY
- PsiElement(try)('try')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- CATCH
- PsiElement(catch)('catch')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('Foo')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Bar')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- CATCH
- PsiElement(catch)('catch')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('Foo')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Bar')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- CATCH
- PsiElement(catch)('catch')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('Foo')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Bar')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- TRY
- PsiElement(try)('try')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- CATCH
- PsiElement(catch)('catch')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('Foo')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Bar')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- CATCH
- PsiElement(catch)('catch')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('Foo')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Bar')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FINALLY
- PsiElement(finally)('finally')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- TRY
- PsiElement(try)('try')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FINALLY
- PsiElement(finally)('finally')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- FOR
- PsiElement(for)('for')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- LOOP_PARAMETER
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('x')
- PsiWhiteSpace(' ')
- PsiElement(in)('in')
- PsiWhiteSpace(' ')
- LOOP_RANGE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BODY
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
- FOR
- PsiElement(for)('for')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- LOOP_PARAMETER
- PsiElement(IDENTIFIER)('x')
- PsiWhiteSpace(' ')
- PsiElement(in)('in')
- PsiWhiteSpace(' ')
- LOOP_RANGE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BODY
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
- FOR
- PsiElement(for)('for')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- LOOP_PARAMETER
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('x')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Int')
- PsiWhiteSpace(' ')
- PsiElement(in)('in')
- PsiWhiteSpace(' ')
- LOOP_RANGE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BODY
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
- FOR
- PsiElement(for)('for')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- LOOP_PARAMETER
- PsiElement(IDENTIFIER)('x')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Int')
- PsiWhiteSpace(' ')
- PsiElement(in)('in')
- PsiWhiteSpace(' ')
- LOOP_RANGE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BODY
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- WHILE
- PsiElement(while)('while')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- BOOLEAN_CONSTANT
- PsiElement(true)('true')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BODY
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- DO_WHILE
- PsiElement(do)('do')
- PsiWhiteSpace(' ')
- BODY
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace(' ')
- PsiElement(while)('while')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- BOOLEAN_CONSTANT
- PsiElement(false)('false')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n')
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- VALUE_PARAMETER_LIST
+ LABEL_QUALIFIER
+ LABEL_REFERENCE
+ PsiElement(LABEL_IDENTIFIER)('@la')
+ PsiWhiteSpace('\n ')
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
- FOR
- PsiElement(for)('for')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- LOOP_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(in)('in')
- PsiWhiteSpace(' ')
- LOOP_RANGE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- BODY
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n\n ')
- FOR
- PsiElement(for)('for')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- LOOP_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(in)('in')
- PsiWhiteSpace(' ')
- LOOP_RANGE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BODY
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- FOR
- PsiElement(for)('for')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- LOOP_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(in)('in')
- PsiWhiteSpace(' ')
- LOOP_RANGE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BODY
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- FOR
- PsiElement(for)('for')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- LOOP_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(in)('in')
- PsiWhiteSpace(' ')
- LOOP_RANGE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(RPAR)(')')
- BODY
-
- PsiElement(SEMICOLON)(';')
- PsiWhiteSpace('\n ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n\n ')
- WHILE
- PsiElement(while)('while')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- BINARY_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- OPERATION_REFERENCE
- PsiElement(in)('in')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- BODY
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n\n ')
- WHILE
- PsiElement(while)('while')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- BINARY_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- OPERATION_REFERENCE
- PsiElement(in)('in')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BODY
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- WHILE
- PsiElement(while)('while')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- BINARY_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- OPERATION_REFERENCE
- PsiElement(in)('in')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(RPAR)(')')
- BODY
-
- PsiElement(SEMICOLON)(';')
- PsiWhiteSpace('\n ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n\n ')
- WHILE
- PsiElement(while)('while')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BODY
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- THEN
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n ')
- PsiElement(else)('else')
- PsiWhiteSpace('\n ')
- ELSE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('c')
- PsiWhiteSpace('\n\n ')
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- THEN
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace(' ')
- PsiElement(else)('else')
- PsiWhiteSpace(' ')
- ELSE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('c')
- PsiWhiteSpace('\n\n ')
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- THEN
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n ')
- PsiElement(else)('else')
- PsiWhiteSpace(' ')
- ELSE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('c')
- PsiWhiteSpace('\n\n ')
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- THEN
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(SEMICOLON)(';')
- PsiWhiteSpace('\n ')
- PsiElement(else)('else')
- PsiWhiteSpace('\n ')
- ELSE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('c')
- PsiElement(SEMICOLON)(';')
- PsiWhiteSpace('\n\n ')
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- THEN
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n ')
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- THEN
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n ')
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- THEN
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(SEMICOLON)(';')
- PsiWhiteSpace('\n\n ')
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- THEN
-
- PsiElement(else)('else')
- PsiWhiteSpace(' ')
- ELSE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('c')
- PsiWhiteSpace('\n ')
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- THEN
-
- PsiElement(else)('else')
- PsiWhiteSpace(' ')
- ELSE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('c')
- PsiWhiteSpace('\n ')
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- THEN
- PsiElement(SEMICOLON)(';')
- PsiWhiteSpace('\n ')
- PsiElement(else)('else')
- PsiWhiteSpace(' ')
- ELSE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('c')
- PsiWhiteSpace('\n ')
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- THEN
-
- PsiElement(else)('else')
- PsiWhiteSpace(' ')
- ELSE
-
- PsiElement(SEMICOLON)(';')
- PsiWhiteSpace('\n\n ')
- DO_WHILE
- PsiElement(do)('do')
- PsiWhiteSpace(' ')
- PsiElement(while)('while')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('r')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- DO_WHILE
- PsiElement(do)('do')
- PsiWhiteSpace(' ')
- BODY
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(while)('while')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('r')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- DO_WHILE
- PsiElement(do)('do')
- PsiWhiteSpace(' ')
- BODY
- BLOCK
- PsiElement(LBRACE)('{')
- PsiElement(SEMICOLON)(';')
- PsiElement(SEMICOLON)(';')
- PsiElement(SEMICOLON)(';')
+ THEN
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
- PsiElement(SEMICOLON)(';')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ THEN
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
- PsiElement(SEMICOLON)(';')
- PsiElement(SEMICOLON)(';')
- PsiElement(SEMICOLON)(';')
- PsiElement(SEMICOLON)(';')
+ PsiWhiteSpace('\n ')
+ PsiElement(else)('else')
+ PsiWhiteSpace('\n ')
+ ELSE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace('\n ')
+ PsiElement(else)('else')
+ PsiWhiteSpace(' ')
+ ELSE
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ THEN
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiWhiteSpace('\n ')
+ PsiElement(else)('else')
+ PsiWhiteSpace('\n ')
+ ELSE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiWhiteSpace('\n\n ')
+ TRY
+ PsiElement(try)('try')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ CATCH
+ PsiElement(catch)('catch')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('Foo')
PsiWhiteSpace(' ')
- PsiElement(RBRACE)('}')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
+ PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
- PsiElement(while)('while')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ TRY
+ PsiElement(try)('try')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ CATCH
+ PsiElement(catch)('catch')
PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('Foo')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ CATCH
+ PsiElement(catch)('catch')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('Foo')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ CATCH
+ PsiElement(catch)('catch')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('Foo')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ TRY
+ PsiElement(try)('try')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ CATCH
+ PsiElement(catch)('catch')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('Foo')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ CATCH
+ PsiElement(catch)('catch')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('Foo')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bar')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FINALLY
+ PsiElement(finally)('finally')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ TRY
+ PsiElement(try)('try')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FINALLY
+ PsiElement(finally)('finally')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ FOR
+ PsiElement(for)('for')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ LOOP_PARAMETER
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('x')
+ PsiWhiteSpace(' ')
+ PsiElement(in)('in')
+ PsiWhiteSpace(' ')
+ LOOP_RANGE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BODY
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ FOR
+ PsiElement(for)('for')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ LOOP_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiWhiteSpace(' ')
+ PsiElement(in)('in')
+ PsiWhiteSpace(' ')
+ LOOP_RANGE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BODY
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ FOR
+ PsiElement(for)('for')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ LOOP_PARAMETER
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('x')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace(' ')
+ PsiElement(in)('in')
+ PsiWhiteSpace(' ')
+ LOOP_RANGE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BODY
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ FOR
+ PsiElement(for)('for')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ LOOP_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace(' ')
+ PsiElement(in)('in')
+ PsiWhiteSpace(' ')
+ LOOP_RANGE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BODY
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ WHILE
+ PsiElement(while)('while')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ BOOLEAN_CONSTANT
+ PsiElement(true)('true')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BODY
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ DO_WHILE
+ PsiElement(do)('do')
+ PsiWhiteSpace(' ')
+ BODY
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace(' ')
+ PsiElement(while)('while')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ BOOLEAN_CONSTANT
+ PsiElement(false)('false')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n')
+ FUN
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ FOR
+ PsiElement(for)('for')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ LOOP_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(in)('in')
+ PsiWhiteSpace(' ')
+ LOOP_RANGE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ BODY
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n\n ')
+ FOR
+ PsiElement(for)('for')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ LOOP_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(in)('in')
+ PsiWhiteSpace(' ')
+ LOOP_RANGE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BODY
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ FOR
+ PsiElement(for)('for')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ LOOP_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(in)('in')
+ PsiWhiteSpace(' ')
+ LOOP_RANGE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BODY
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('r')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ FOR
+ PsiElement(for)('for')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ LOOP_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(in)('in')
+ PsiWhiteSpace(' ')
+ LOOP_RANGE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(RPAR)(')')
+ BODY
+
+ PsiElement(SEMICOLON)(';')
+ PsiWhiteSpace('\n ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n\n ')
+ WHILE
+ PsiElement(while)('while')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ BINARY_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ OPERATION_REFERENCE
+ PsiElement(in)('in')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ BODY
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n\n ')
+ WHILE
+ PsiElement(while)('while')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ BINARY_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ OPERATION_REFERENCE
+ PsiElement(in)('in')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BODY
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ WHILE
+ PsiElement(while)('while')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ BINARY_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ OPERATION_REFERENCE
+ PsiElement(in)('in')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(RPAR)(')')
+ BODY
+
+ PsiElement(SEMICOLON)(';')
+ PsiWhiteSpace('\n ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n\n ')
+ WHILE
+ PsiElement(while)('while')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BODY
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ THEN
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n ')
+ PsiElement(else)('else')
+ PsiWhiteSpace('\n ')
+ ELSE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('c')
+ PsiWhiteSpace('\n\n ')
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ THEN
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace(' ')
+ PsiElement(else)('else')
+ PsiWhiteSpace(' ')
+ ELSE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('c')
+ PsiWhiteSpace('\n\n ')
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ THEN
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n ')
+ PsiElement(else)('else')
+ PsiWhiteSpace(' ')
+ ELSE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('c')
+ PsiWhiteSpace('\n\n ')
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ THEN
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(SEMICOLON)(';')
+ PsiWhiteSpace('\n ')
+ PsiElement(else)('else')
+ PsiWhiteSpace('\n ')
+ ELSE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('c')
+ PsiElement(SEMICOLON)(';')
+ PsiWhiteSpace('\n\n ')
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ THEN
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n ')
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ THEN
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n ')
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ THEN
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(SEMICOLON)(';')
+ PsiWhiteSpace('\n\n ')
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ THEN
+
+ PsiElement(else)('else')
+ PsiWhiteSpace(' ')
+ ELSE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('c')
+ PsiWhiteSpace('\n ')
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ THEN
+
+ PsiElement(else)('else')
+ PsiWhiteSpace(' ')
+ ELSE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('c')
+ PsiWhiteSpace('\n ')
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ THEN
+ PsiElement(SEMICOLON)(';')
+ PsiWhiteSpace('\n ')
+ PsiElement(else)('else')
+ PsiWhiteSpace(' ')
+ ELSE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('c')
+ PsiWhiteSpace('\n ')
+ IF
+ PsiElement(if)('if')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ THEN
+
+ PsiElement(else)('else')
+ PsiWhiteSpace(' ')
+ ELSE
+
+ PsiElement(SEMICOLON)(';')
+ PsiWhiteSpace('\n\n ')
+ DO_WHILE
+ PsiElement(do)('do')
+ PsiWhiteSpace(' ')
+ PsiElement(while)('while')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('r')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ DO_WHILE
+ PsiElement(do)('do')
+ PsiWhiteSpace(' ')
+ BODY
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace(' ')
+ PsiElement(while)('while')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('r')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ DO_WHILE
+ PsiElement(do)('do')
+ PsiWhiteSpace(' ')
+ BODY
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiElement(SEMICOLON)(';')
+ PsiElement(SEMICOLON)(';')
+ PsiElement(SEMICOLON)(';')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiElement(SEMICOLON)(';')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiElement(SEMICOLON)(';')
+ PsiElement(SEMICOLON)(';')
+ PsiElement(SEMICOLON)(';')
+ PsiElement(SEMICOLON)(';')
+ PsiWhiteSpace(' ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace(' ')
+ PsiElement(while)('while')
+ PsiWhiteSpace(' ')
+ PsiElement(LPAR)('(')
+ CONDITION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('r')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/EOLsInComments.txt b/compiler/testData/psi/EOLsInComments.txt
index 5aed3791303..6e5482c96d2 100644
--- a/compiler/testData/psi/EOLsInComments.txt
+++ b/compiler/testData/psi/EOLsInComments.txt
@@ -1,108 +1,107 @@
JetFile: EOLsInComments.jet
- NAMESPACE
- NAMESPACE_HEADER
-
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
+ NAMESPACE_HEADER
+
+ FUN
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ PREFIX_EXPRESSION
+ OPERATION_REFERENCE
+ PsiElement(PLUS)('+')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ PsiComment(DOC_COMMENT)('/** */')
+ PREFIX_EXPRESSION
+ OPERATION_REFERENCE
+ PsiElement(PLUS)('+')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ PsiComment(BLOCK_COMMENT)('/* */')
+ PREFIX_EXPRESSION
+ OPERATION_REFERENCE
+ PsiElement(PLUS)('+')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n ')
+ BINARY_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
- PREFIX_EXPRESSION
- OPERATION_REFERENCE
- PsiElement(PLUS)('+')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
- PsiComment(DOC_COMMENT)('/** */')
- PREFIX_EXPRESSION
- OPERATION_REFERENCE
- PsiElement(PLUS)('+')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
- PsiComment(BLOCK_COMMENT)('/* */')
- PREFIX_EXPRESSION
- OPERATION_REFERENCE
- PsiElement(PLUS)('+')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n ')
- BINARY_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiComment(BLOCK_COMMENT)('/*\n */')
- PsiWhiteSpace(' ')
- OPERATION_REFERENCE
- PsiElement(PLUS)('+')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace('\n ')
+ PsiWhiteSpace(' ')
PsiComment(BLOCK_COMMENT)('/*\n */')
PsiWhiteSpace(' ')
- PREFIX_EXPRESSION
- OPERATION_REFERENCE
- PsiElement(PLUS)('+')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n ')
- BINARY_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiComment(DOC_COMMENT)('/**\n */')
- PsiWhiteSpace(' ')
- OPERATION_REFERENCE
- PsiElement(PLUS)('+')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n ')
+ OPERATION_REFERENCE
+ PsiElement(PLUS)('+')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace('\n ')
+ PsiComment(BLOCK_COMMENT)('/*\n */')
+ PsiWhiteSpace(' ')
+ PREFIX_EXPRESSION
+ OPERATION_REFERENCE
+ PsiElement(PLUS)('+')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n ')
+ BINARY_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
PsiWhiteSpace(' ')
- PsiComment(EOL_COMMENT)('//')
- PsiWhiteSpace('\n ')
- PREFIX_EXPRESSION
- OPERATION_REFERENCE
- PsiElement(PLUS)('+')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
+ PsiComment(DOC_COMMENT)('/**\n */')
+ PsiWhiteSpace(' ')
+ OPERATION_REFERENCE
+ PsiElement(PLUS)('+')
PsiWhiteSpace(' ')
- PsiComment(EOL_COMMENT)('//')
- PsiWhiteSpace('\n')
- PREFIX_EXPRESSION
- OPERATION_REFERENCE
- PsiElement(PLUS)('+')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiComment(EOL_COMMENT)('//')
+ PsiWhiteSpace('\n ')
+ PREFIX_EXPRESSION
+ OPERATION_REFERENCE
+ PsiElement(PLUS)('+')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiComment(EOL_COMMENT)('//')
+ PsiWhiteSpace('\n')
+ PREFIX_EXPRESSION
+ OPERATION_REFERENCE
+ PsiElement(PLUS)('+')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/EOLsOnRollback.txt b/compiler/testData/psi/EOLsOnRollback.txt
index 6e085ffa275..c42e583c425 100644
--- a/compiler/testData/psi/EOLsOnRollback.txt
+++ b/compiler/testData/psi/EOLsOnRollback.txt
@@ -1,97 +1,96 @@
JetFile: EOLsOnRollback.jet
- NAMESPACE
- NAMESPACE_HEADER
-
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
+ NAMESPACE_HEADER
+
+ FUN
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
PsiWhiteSpace('\n ')
- CLASS
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n ')
- TYPE_PARAMETER_LIST
-
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- CLASS
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace('\n\n ')
- TYPE_PARAMETER_LIST
-
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('x')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('t')
- PsiWhiteSpace('\n ')
- PROPERTY
- PsiElement(var)('var')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('r')
- PsiWhiteSpace('\n\n ')
- PROPERTY
- MODIFIER_LIST
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- PsiElement(var)('var')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('4')
+ TYPE_PARAMETER_LIST
+
+ FUN
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ CLASS
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
PsiWhiteSpace('\n\n ')
+ TYPE_PARAMETER_LIST
+
+ TYPEDEF
+ PsiElement(type)('type')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('x')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
+
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('t')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ PsiElement(var)('var')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('r')
+ PsiWhiteSpace('\n\n ')
+ PROPERTY
+ MODIFIER_LIST
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace(' ')
+ PsiElement(var)('var')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('1')
- PsiWhiteSpace('\n ')
- PROPERTY
- MODIFIER_LIST
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ PsiElement(INTEGER_LITERAL)('4')
+ PsiWhiteSpace('\n\n ')
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiWhiteSpace('\n ')
+ PROPERTY
+ MODIFIER_LIST
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace(' ')
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('f')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/EmptyFile.txt b/compiler/testData/psi/EmptyFile.txt
index 3630ef98bd5..eaddc739910 100644
--- a/compiler/testData/psi/EmptyFile.txt
+++ b/compiler/testData/psi/EmptyFile.txt
@@ -1,4 +1,3 @@
JetFile: EmptyFile.jet
- NAMESPACE
- NAMESPACE_HEADER
-
\ 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 dfadca48ef1..2b986a89e88 100644
--- a/compiler/testData/psi/Enums.txt
+++ b/compiler/testData/psi/Enums.txt
@@ -1,195 +1,213 @@
JetFile: Enums.jet
- NAMESPACE
- NAMESPACE_HEADER
+ NAMESPACE_HEADER
+
+ CLASS
+ MODIFIER_LIST
+ PsiElement(enum)('enum')
+ PsiWhiteSpace(' ')
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('Color')
+ TYPE_PARAMETER_LIST
- CLASS
- MODIFIER_LIST
- PsiElement(enum)('enum')
- PsiWhiteSpace(' ')
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('Color')
- TYPE_PARAMETER_LIST
-
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('rgb')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Int')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- ENUM_ENTRY
- OBJECT_DECLARATION_NAME
- PsiElement(IDENTIFIER)('RED')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- INITIALIZER_LIST
- DELEGATOR_SUPER_CALL
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Color')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('0xFF000')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- ENUM_ENTRY
- OBJECT_DECLARATION_NAME
- PsiElement(IDENTIFIER)('GREEN')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- INITIALIZER_LIST
- DELEGATOR_SUPER_CALL
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Color')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('0x00FF00')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- ENUM_ENTRY
- OBJECT_DECLARATION_NAME
- PsiElement(IDENTIFIER)('BLUE')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- INITIALIZER_LIST
- DELEGATOR_SUPER_CALL
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Color')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('0x0000FF')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n')
- CLASS
- MODIFIER_LIST
- PsiElement(enum)('enum')
- PsiWhiteSpace(' ')
- PsiElement(class)('class')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('List')
- TYPE_PARAMETER_LIST
- PsiElement(LT)('<')
- TYPE_PARAMETER
- MODIFIER_LIST
- PsiElement(out)('out')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('T')
- PsiElement(GT)('>')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('size')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Int')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- CLASS_BODY
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- ENUM_ENTRY
- OBJECT_DECLARATION_NAME
- PsiElement(IDENTIFIER)('Nil')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- INITIALIZER_LIST
- DELEGATOR_SUPER_CALL
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('List')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Nothing')
- PsiElement(GT)('>')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('0')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n\n ')
- ENUM_ENTRY
- OBJECT_DECLARATION_NAME
- PsiElement(IDENTIFIER)('Cons')
- TYPE_PARAMETER_LIST
- PsiElement(LT)('<')
- TYPE_PARAMETER
- PsiElement(IDENTIFIER)('T')
- PsiElement(GT)('>')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('value')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('rgb')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ ENUM_ENTRY
+ OBJECT_DECLARATION_NAME
+ PsiElement(IDENTIFIER)('RED')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
+
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ INITIALIZER_LIST
+ DELEGATOR_SUPER_CALL
+ CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(COMMA)(',')
+ PsiElement(IDENTIFIER)('Color')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('0xFF000')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ ENUM_ENTRY
+ OBJECT_DECLARATION_NAME
+ PsiElement(IDENTIFIER)('GREEN')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
+
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ INITIALIZER_LIST
+ DELEGATOR_SUPER_CALL
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Color')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('0x00FF00')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ ENUM_ENTRY
+ OBJECT_DECLARATION_NAME
+ PsiElement(IDENTIFIER)('BLUE')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
+
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ INITIALIZER_LIST
+ DELEGATOR_SUPER_CALL
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Color')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('0x0000FF')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n')
+ CLASS
+ MODIFIER_LIST
+ PsiElement(enum)('enum')
+ PsiWhiteSpace(' ')
+ PsiElement(class)('class')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('List')
+ TYPE_PARAMETER_LIST
+ PsiElement(LT)('<')
+ TYPE_PARAMETER
+ MODIFIER_LIST
+ PsiElement(out)('out')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(GT)('>')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('size')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ CLASS_BODY
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ ENUM_ENTRY
+ OBJECT_DECLARATION_NAME
+ PsiElement(IDENTIFIER)('Nil')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
+
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ INITIALIZER_LIST
+ DELEGATOR_SUPER_CALL
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('List')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Nothing')
+ PsiElement(GT)('>')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('0')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n\n ')
+ ENUM_ENTRY
+ OBJECT_DECLARATION_NAME
+ PsiElement(IDENTIFIER)('Cons')
+ TYPE_PARAMETER_LIST
+ PsiElement(LT)('<')
+ TYPE_PARAMETER
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(GT)('>')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(val)('val')
PsiWhiteSpace(' ')
- VALUE_PARAMETER
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('tail')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('value')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('tail')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('List')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(GT)('>')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ INITIALIZER_LIST
+ DELEGATOR_SUPER_CALL
+ CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
@@ -202,55 +220,36 @@ JetFile: Enums.jet
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
PsiElement(GT)('>')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- INITIALIZER_LIST
- DELEGATOR_SUPER_CALL
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('List')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(GT)('>')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- PsiComment(BLOCK_COMMENT)('/*tail.size + 1*/')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n\n ')
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('isEmpty')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Bool')
- PsiWhiteSpace('\n ')
- PROPERTY_ACCESSOR
- PsiElement(get)('get')
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('size')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ PsiComment(BLOCK_COMMENT)('/*tail.size + 1*/')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n\n ')
+ PROPERTY
+ PsiElement(val)('val')
PsiWhiteSpace(' ')
- PsiComment(EOL_COMMENT)('//> 0')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ PsiElement(IDENTIFIER)('isEmpty')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Bool')
+ PsiWhiteSpace('\n ')
+ PROPERTY_ACCESSOR
+ PsiElement(get)('get')
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('size')
+ PsiWhiteSpace(' ')
+ PsiComment(EOL_COMMENT)('//> 0')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/Expressions_ERR.txt b/compiler/testData/psi/Expressions_ERR.txt
index a9b043e82a6..56f14f20935 100644
--- a/compiler/testData/psi/Expressions_ERR.txt
+++ b/compiler/testData/psi/Expressions_ERR.txt
@@ -1,59 +1,58 @@
JetFile: Expressions_ERR.jet
- NAMESPACE
- NAMESPACE_HEADER
-
- PROPERTY
- PsiElement(val)('val')
+ NAMESPACE_HEADER
+
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('f')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ IF
+ PsiElement(if)('if')
PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
+ PsiElement(LPAR)('(')
+ CONDITION
+ BOOLEAN_CONSTANT
+ PsiElement(true)('true')
+ PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
+ THEN
+ RETURN
+ PsiElement(return)('return')
PsiWhiteSpace(' ')
- IF
- PsiElement(if)('if')
- PsiWhiteSpace(' ')
- PsiElement(LPAR)('(')
- CONDITION
- BOOLEAN_CONSTANT
- PsiElement(true)('true')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- THEN
- RETURN
- PsiElement(return)('return')
- PsiWhiteSpace(' ')
- PsiElement(else)('else')
- PsiWhiteSpace(' ')
- ELSE
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('dfsd')
- PsiWhiteSpace('\n ')
- PsiErrorElement:Expecting an element
- PsiElement(RPAR)(')')
- PsiElement(SEMICOLON)(';')
- PsiElement(SEMICOLON)(';')
- PsiElement(SEMICOLON)(';')
- PsiErrorElement:Expecting an element
- PsiElement(RPAR)(')')
- PsiElement(SEMICOLON)(';')
- PsiElement(SEMICOLON)(';')
- PsiElement(SEMICOLON)(';')
- PsiErrorElement:Expecting an element
- PsiElement(BAD_CHARACTER)('~')
- PsiElement(SEMICOLON)(';')
- PsiElement(SEMICOLON)(';')
- PsiElement(SEMICOLON)(';')
- PsiWhiteSpace('\n ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('srgsdfg')
- PsiWhiteSpace('\n\n ')
- PsiErrorElement:Expecting an element
- PsiElement(BAD_CHARACTER)('~')
- PsiWhiteSpace('\n\n ')
- PsiErrorElement:Expecting an element
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ PsiElement(else)('else')
+ PsiWhiteSpace(' ')
+ ELSE
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('dfsd')
+ PsiWhiteSpace('\n ')
+ PsiErrorElement:Expecting an element
+ PsiElement(RPAR)(')')
+ PsiElement(SEMICOLON)(';')
+ PsiElement(SEMICOLON)(';')
+ PsiElement(SEMICOLON)(';')
+ PsiErrorElement:Expecting an element
+ PsiElement(RPAR)(')')
+ PsiElement(SEMICOLON)(';')
+ PsiElement(SEMICOLON)(';')
+ PsiElement(SEMICOLON)(';')
+ PsiErrorElement:Expecting an element
+ PsiElement(BAD_CHARACTER)('~')
+ PsiElement(SEMICOLON)(';')
+ PsiElement(SEMICOLON)(';')
+ PsiElement(SEMICOLON)(';')
+ PsiWhiteSpace('\n ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('srgsdfg')
+ PsiWhiteSpace('\n\n ')
+ PsiErrorElement:Expecting an element
+ PsiElement(BAD_CHARACTER)('~')
+ PsiWhiteSpace('\n\n ')
+ PsiErrorElement:Expecting an element
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/ExtensionsWithQNReceiver.txt b/compiler/testData/psi/ExtensionsWithQNReceiver.txt
index 1baa3c557fc..95901f7809b 100644
--- a/compiler/testData/psi/ExtensionsWithQNReceiver.txt
+++ b/compiler/testData/psi/ExtensionsWithQNReceiver.txt
@@ -1,77 +1,76 @@
JetFile: ExtensionsWithQNReceiver.jet
- NAMESPACE
- NAMESPACE_HEADER
-
- PROPERTY
- PsiElement(val)('val')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
+ NAMESPACE_HEADER
+
+ PROPERTY
+ PsiElement(val)('val')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
USER_TYPE
USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('java')
- PsiElement(DOT)('.')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('util')
+ PsiElement(IDENTIFIER)('java')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Map')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- PsiElement(MUL)('*')
- PsiElement(COMMA)(',')
- TYPE_PROJECTION
- PsiElement(MUL)('*')
- PsiElement(GT)('>')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('size')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Int')
- PsiWhiteSpace('\n\n')
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
+ PsiElement(IDENTIFIER)('util')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Map')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ PsiElement(MUL)('*')
+ PsiElement(COMMA)(',')
+ TYPE_PROJECTION
+ PsiElement(MUL)('*')
+ PsiElement(GT)('>')
+ PsiElement(DOT)('.')
+ PsiElement(IDENTIFIER)('size')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace('\n\n')
+ FUN
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
USER_TYPE
USER_TYPE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('java')
- PsiElement(DOT)('.')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('util')
+ PsiElement(IDENTIFIER)('java')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Map')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- PsiElement(MUL)('*')
- PsiElement(COMMA)(',')
- TYPE_PROJECTION
- PsiElement(MUL)('*')
- PsiElement(GT)('>')
- PsiElement(DOT)('.')
- PsiElement(IDENTIFIER)('size')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('Int')
- PsiWhiteSpace(' ')
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('1')
\ No newline at end of file
+ PsiElement(IDENTIFIER)('util')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Map')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ PsiElement(MUL)('*')
+ PsiElement(COMMA)(',')
+ TYPE_PROJECTION
+ PsiElement(MUL)('*')
+ PsiElement(GT)('>')
+ PsiElement(DOT)('.')
+ PsiElement(IDENTIFIER)('size')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('Int')
+ PsiWhiteSpace(' ')
+ PsiElement(EQ)('=')
+ PsiWhiteSpace(' ')
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
\ No newline at end of file
diff --git a/compiler/testData/psi/FileStart_ERR.txt b/compiler/testData/psi/FileStart_ERR.txt
index bda36bd0a99..03b700f38f5 100644
--- a/compiler/testData/psi/FileStart_ERR.txt
+++ b/compiler/testData/psi/FileStart_ERR.txt
@@ -1,36 +1,35 @@
JetFile: FileStart_ERR.jet
- NAMESPACE
- NAMESPACE_HEADER
-
- PsiErrorElement:Expecting namespace or top level declaration
- PsiElement(DIV)('/')
- 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(' ')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
+ NAMESPACE_HEADER
+
+ PsiErrorElement:Expecting namespace or top level declaration
+ PsiElement(DIV)('/')
+ 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')
- PsiErrorElement:Expecting namespace or top level declaration
-
\ No newline at end of file
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('bar')
+ PsiWhiteSpace('\n')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('import')
+ PsiWhiteSpace(' ')
+ 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/FunctionCalls.txt b/compiler/testData/psi/FunctionCalls.txt
index 94f67c99444..226682524cb 100644
--- a/compiler/testData/psi/FunctionCalls.txt
+++ b/compiler/testData/psi/FunctionCalls.txt
@@ -1,79 +1,67 @@
JetFile: FunctionCalls.jet
- NAMESPACE
- NAMESPACE_HEADER
-
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(GT)('>')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(GT)('>')
- PsiWhiteSpace('\n ')
- PARENTHESIZED
- PsiElement(LPAR)('(')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('s')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
+ NAMESPACE_HEADER
+
+ FUN
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace('\n ')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiElement(GT)('>')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiElement(GT)('>')
+ PsiWhiteSpace('\n ')
+ PARENTHESIZED
+ PsiElement(LPAR)('(')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ PsiWhiteSpace(' ')
FUNCTION_LITERAL_EXPRESSION
FUNCTION_LITERAL
PsiElement(LBRACE)('{')
@@ -81,51 +69,22 @@ JetFile: FunctionCalls.jet
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('s')
PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('s')
- PsiWhiteSpace('\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('s')
- PsiWhiteSpace('\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
+ PsiWhiteSpace('\n ')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('s')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ PsiWhiteSpace(' ')
FUNCTION_LITERAL_EXPRESSION
FUNCTION_LITERAL
PsiElement(LBRACE)('{')
@@ -135,53 +94,17 @@ JetFile: FunctionCalls.jet
PsiElement(IDENTIFIER)('s')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(GT)('>')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('s')
- PsiWhiteSpace('\n ')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(GT)('>')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
+ PsiWhiteSpace('\n ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
FUNCTION_LITERAL_EXPRESSION
FUNCTION_LITERAL
PsiElement(LBRACE)('{')
@@ -191,139 +114,215 @@ JetFile: FunctionCalls.jet
PsiElement(IDENTIFIER)('s')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(GT)('>')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- TYPE_ARGUMENT_LIST
- PsiElement(LT)('<')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- TYPE_PROJECTION
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(GT)('>')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- BINARY_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- OPERATION_REFERENCE
- PsiElement(LT)('<')
+ PsiWhiteSpace('\n ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('s')
+ PsiWhiteSpace('\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_ARGUMENT
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('1')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_ARGUMENT
- BINARY_EXPRESSION
+ PsiElement(GT)('>')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('s')
+ PsiWhiteSpace('\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- OPERATION_REFERENCE
- PsiElement(GT)('>')
- PARENTHESIZED
- PsiElement(LPAR)('(')
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(GT)('>')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('s')
+ PsiWhiteSpace('\n ')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(GT)('>')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ TYPE_ARGUMENT_LIST
+ PsiElement(LT)('<')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ TYPE_PROJECTION
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(GT)('>')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n ')
- CALL_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- BINARY_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- OPERATION_REFERENCE
- PsiElement(LT)('<')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_ARGUMENT
+ PsiElement(RPAR)(')')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ BINARY_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ OPERATION_REFERENCE
+ PsiElement(LT)('<')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ BINARY_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ OPERATION_REFERENCE
+ PsiElement(GT)('>')
PARENTHESIZED
PsiElement(LPAR)('(')
- BINARY_EXPRESSION
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('1')
- PsiWhiteSpace(' ')
- OPERATION_REFERENCE
- PsiElement(PLUS)('+')
- PsiWhiteSpace(' ')
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('2')
- PsiElement(RPAR)(')')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_ARGUMENT
- BINARY_EXPRESSION
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n ')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ BINARY_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ OPERATION_REFERENCE
+ PsiElement(LT)('<')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ PARENTHESIZED
+ PsiElement(LPAR)('(')
+ BINARY_EXPRESSION
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiWhiteSpace(' ')
OPERATION_REFERENCE
- PsiElement(GT)('>')
- PARENTHESIZED
- PsiElement(LPAR)('(')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
\ No newline at end of file
+ PsiElement(PLUS)('+')
+ PsiWhiteSpace(' ')
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('2')
+ PsiElement(RPAR)(')')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_ARGUMENT
+ BINARY_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ OPERATION_REFERENCE
+ PsiElement(GT)('>')
+ PARENTHESIZED
+ PsiElement(LPAR)('(')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
\ No newline at end of file
diff --git a/compiler/testData/psi/FunctionLiterals.txt b/compiler/testData/psi/FunctionLiterals.txt
index 13fc16a5f1d..54831c53a0d 100644
--- a/compiler/testData/psi/FunctionLiterals.txt
+++ b/compiler/testData/psi/FunctionLiterals.txt
@@ -1,499 +1,498 @@
JetFile: FunctionLiterals.jet
- NAMESPACE
- NAMESPACE_HEADER
-
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiElement(COMMA)(',')
+ NAMESPACE_HEADER
+
+ FUN
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('foo')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
PsiWhiteSpace(' ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- PsiElement(COMMA)(',')
+ PsiElement(COLON)(':')
PsiWhiteSpace(' ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('B')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- PsiElement(COMMA)(',')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
PsiWhiteSpace(' ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiElement(COMMA)(',')
+ PsiElement(COLON)(':')
PsiWhiteSpace(' ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('B')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
+ PsiElement(IDENTIFIER)('T')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
+ PsiElement(IDENTIFIER)('T')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
- BLOCK
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
+ PsiElement(IDENTIFIER)('T')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
+ PsiElement(IDENTIFIER)('T')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
+ PsiElement(IDENTIFIER)('T')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
+ PsiElement(IDENTIFIER)('T')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('T')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('T')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('x')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('y')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ INTEGER_CONSTANT
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ ANNOTATED_EXPRESSION
+ ANNOTATION
+ PsiElement(LBRACKET)('[')
+ ANNOTATION_ENTRY
+ CONSTRUCTOR_CALLEE
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- VALUE_PARAMETER
PsiElement(IDENTIFIER)('x')
+ PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('y')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- INTEGER_CONSTANT
- PsiElement(INTEGER_LITERAL)('1')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
- ANNOTATED_EXPRESSION
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('x')
- PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- PsiElement(LBRACKET)('[')
- PsiElement(IDENTIFIER)('b')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('y')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- PsiElement(LBRACKET)('[')
- PsiElement(IDENTIFIER)('c')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('z')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- PsiElement(INTEGER_LITERAL)('1')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
- PsiErrorElement:Expecting '}
-
\ No newline at end of file
+ PsiElement(LBRACKET)('[')
+ PsiElement(IDENTIFIER)('b')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('y')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ PsiElement(LBRACKET)('[')
+ PsiElement(IDENTIFIER)('c')
+ PsiElement(RBRACKET)(']')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('z')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ PsiElement(INTEGER_LITERAL)('1')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
+ PsiErrorElement:Expecting '}
+
\ No newline at end of file
diff --git a/compiler/testData/psi/FunctionLiterals_ERR.txt b/compiler/testData/psi/FunctionLiterals_ERR.txt
index 922c8670737..62cd6c8dec8 100644
--- a/compiler/testData/psi/FunctionLiterals_ERR.txt
+++ b/compiler/testData/psi/FunctionLiterals_ERR.txt
@@ -1,333 +1,332 @@
JetFile: FunctionLiterals_ERR.jet
- NAMESPACE
- NAMESPACE_HEADER
-
- FUN
- PsiElement(fun)('fun')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('foo')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- BLOCK
- PsiElement(LBRACE)('{')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER_LIST
+ NAMESPACE_HEADER
+
+ FUN
+ PsiElement(fun)('fun')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('foo')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ BLOCK
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER_LIST
+
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiErrorElement:Expecting ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiErrorElement:Expecting ')
-
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- PsiErrorElement:Type expected
-
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiErrorElement:Expecting a type
-
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
-
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiElement(COMMA)(',')
- PsiErrorElement:Expecting a parameter declaration
-
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
PsiWhiteSpace(' ')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- PsiElement(COMMA)(',')
+ PsiElement(COLON)(':')
PsiWhiteSpace(' ')
- PsiErrorElement:Expecting a parameter declaration
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('B')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- PsiErrorElement:Expecting a parameter declaration
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER
- PsiErrorElement:Expecting parameter declaration
+ TYPE_REFERENCE
+ PsiErrorElement:Type expected
- PsiElement(COMMA)(',')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
PsiWhiteSpace(' ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
- DOT_QUALIFIED_EXPRESSION
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(DOT)('.')
- CALL_EXPRESSION
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('t')
- VALUE_ARGUMENT_LIST
- PsiElement(LPAR)('(')
- VALUE_ARGUMENT
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiErrorElement:Expecting a type
+
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('T')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(COMMA)(',')
+ PsiErrorElement:Expecting a parameter declaration
+
+ PsiWhiteSpace(' ')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
PsiWhiteSpace(' ')
- PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- BLOCK
- BINARY_EXPRESSION
- DOT_QUALIFIED_EXPRESSION
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ PsiErrorElement:Expecting a parameter declaration
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('B')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ PsiElement(LPAR)('(')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ PsiErrorElement:Expecting a parameter declaration
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiErrorElement:Expecting parameter declaration
+
+ PsiElement(COMMA)(',')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('T')
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ DOT_QUALIFIED_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(DOT)('.')
+ CALL_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('t')
+ VALUE_ARGUMENT_LIST
+ PsiElement(LPAR)('(')
+ VALUE_ARGUMENT
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ BLOCK
+ BINARY_EXPRESSION
+ DOT_QUALIFIED_EXPRESSION
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(DOT)('.')
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('t')
+ PsiWhiteSpace(' ')
+ OPERATION_REFERENCE
+ PsiElement(MINUS)('-')
+ PARENTHESIZED
+ PsiElement(LPAR)('(')
+ BINARY_WITH_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(DOT)('.')
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('t')
- PsiWhiteSpace(' ')
- OPERATION_REFERENCE
- PsiElement(MINUS)('-')
- PARENTHESIZED
- PsiElement(LPAR)('(')
- BINARY_WITH_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- OPERATION_REFERENCE
- PsiElement(COLON)(':')
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ OPERATION_REFERENCE
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('A')
+ PsiElement(RPAR)(')')
+ PsiWhiteSpace(' ')
+ PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('a')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ VALUE_PARAMETER_LIST
+ VALUE_PARAMETER
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ PsiErrorElement:To specify a type of a parameter or a return type, use the full notation: {(parameter : Type) : ReturnType => ...}
+ PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('A')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
+ PsiElement(IDENTIFIER)('b')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiErrorElement:Expecting parameter name
+
PsiElement(ARROW)('->')
PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('a')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- VALUE_PARAMETER_LIST
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiErrorElement:To specify a type of a parameter or a return type, use the full notation: {(parameter : Type) : ReturnType => ...}
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER
- PsiErrorElement:Expecting parameter name
-
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
+ PsiWhiteSpace('\n ')
+ FUNCTION_LITERAL_EXPRESSION
+ FUNCTION_LITERAL
+ PsiElement(LBRACE)('{')
+ TYPE_REFERENCE
+ USER_TYPE
REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n ')
- FUNCTION_LITERAL_EXPRESSION
- FUNCTION_LITERAL
- PsiElement(LBRACE)('{')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('T')
- PsiElement(DOT)('.')
- VALUE_PARAMETER_LIST
- PsiErrorElement:Expecting a parameter list in parentheses (...)
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER
- PsiErrorElement:Expecting parameter declaration
-
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiErrorElement:Expecting ')
+ PsiElement(IDENTIFIER)('T')
+ PsiElement(DOT)('.')
+ VALUE_PARAMETER_LIST
+ PsiErrorElement:Expecting a parameter list in parentheses (...)
+ PsiElement(IDENTIFIER)('a')
+ PsiWhiteSpace(' ')
+ VALUE_PARAMETER
+ PsiErrorElement:Expecting parameter declaration
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- BLOCK
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('f')
- PsiElement(RBRACE)('}')
- PsiWhiteSpace('\n')
- PsiElement(RBRACE)('}')
- PsiErrorElement:Expecting '}'
-
\ No newline at end of file
+ PsiElement(COLON)(':')
+ PsiWhiteSpace(' ')
+ TYPE_REFERENCE
+ USER_TYPE
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('b')
+ PsiErrorElement:Expecting ')
+
+ PsiWhiteSpace(' ')
+ PsiElement(ARROW)('->')
+ PsiWhiteSpace(' ')
+ BLOCK
+ REFERENCE_EXPRESSION
+ PsiElement(IDENTIFIER)('f')
+ PsiElement(RBRACE)('}')
+ PsiWhiteSpace('\n')
+ PsiElement(RBRACE)('}')
+ PsiErrorElement:Expecting '}'
+
\ No newline at end of file
diff --git a/compiler/testData/psi/FunctionTypes.txt b/compiler/testData/psi/FunctionTypes.txt
index 3442c373210..80b37454f29 100644
--- a/compiler/testData/psi/FunctionTypes.txt
+++ b/compiler/testData/psi/FunctionTypes.txt
@@ -1,613 +1,594 @@
JetFile: FunctionTypes.jet
- NAMESPACE
- NAMESPACE_HEADER
+ NAMESPACE_HEADER
+
+ TYPEDEF
+ PsiElement(type)('type')
+ PsiWhiteSpace(' ')
+ PsiElement(IDENTIFIER)('f')
+ PsiWhiteSpace(' ')
+ TYPE_PARAMETER_LIST
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- MODIFIER_LIST
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('x')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(HASH)('#')
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- TUPLE_TYPE
- PsiElement(HASH)('#')
- PsiElement(LPAR)('(')
- PsiElement(RPAR)(')')
- PsiWhiteSpace('\n\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- ANNOTATION
- PsiElement(LBRACKET)('[')
- ANNOTATION_ENTRY
- CONSTRUCTOR_CALLEE
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RBRACKET)(']')
- PsiWhiteSpace(' ')
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('x')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('bar')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-
- PsiElement(EQ)('=')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('foo')
- PsiElement(COMMA)(',')
- PsiWhiteSpace(' ')
- VALUE_PARAMETER
- PsiElement(IDENTIFIER)('a')
- PsiWhiteSpace(' ')
- PsiElement(COLON)(':')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- FUNCTION_TYPE
- VALUE_PARAMETER_LIST
- PsiElement(LPAR)('(')
- VALUE_PARAMETER
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('a')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiElement(RPAR)(')')
- PsiWhiteSpace(' ')
- PsiElement(ARROW)('->')
- PsiWhiteSpace(' ')
- TYPE_REFERENCE
- USER_TYPE
- REFERENCE_EXPRESSION
- PsiElement(IDENTIFIER)('b')
- PsiWhiteSpace('\n')
- TYPEDEF
- PsiElement(type)('type')
- PsiWhiteSpace(' ')
- PsiElement(IDENTIFIER)('f')
- PsiWhiteSpace(' ')
- TYPE_PARAMETER_LIST
-