diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/DeclarationDescriptorVisitor.java b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/DeclarationDescriptorVisitor.java index 5a105a4703a..de75842143b 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/DeclarationDescriptorVisitor.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/DeclarationDescriptorVisitor.java @@ -52,6 +52,10 @@ public class DeclarationDescriptorVisitor { return visitFunctionDescriptor(constructorDescriptor, data); } + public R visitScriptDescriptor(ScriptDescriptor scriptDescriptor, D data) { + return visitDeclarationDescriptor(scriptDescriptor, data); + } + public R visitLocalVariableDescriptor(LocalVariableDescriptor descriptor, D data) { return visitVariableDescriptor(descriptor, data); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/ScriptDescriptor.java b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/ScriptDescriptor.java new file mode 100644 index 00000000000..58b3e452209 --- /dev/null +++ b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/ScriptDescriptor.java @@ -0,0 +1,50 @@ +/* + * Copyright 2010-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.jet.lang.descriptors; + +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor; +import org.jetbrains.jet.lang.types.JetType; +import org.jetbrains.jet.lang.types.TypeSubstitutor; + +import java.util.Collections; + +/** + * @author Stepan Koltsov + */ +public class ScriptDescriptor extends DeclarationDescriptorImpl { + private JetType returnType; + + public ScriptDescriptor(@Nullable DeclarationDescriptor containingDeclaration) { + super(containingDeclaration, Collections.emptyList(), "