|
@@ -5,24 +5,21 @@
|
5
|
5
|
*/
|
6
|
6
|
package org.openzen.zenscript.codemodel.scope;
|
7
|
7
|
|
8
|
|
-import java.util.Collections;
|
9
|
|
-import java.util.List;
|
10
|
|
-import java.util.Map;
|
11
|
8
|
import org.openzen.zencode.shared.CodePosition;
|
12
|
9
|
import org.openzen.zencode.shared.CompileException;
|
13
|
10
|
import org.openzen.zencode.shared.CompileExceptionCode;
|
14
|
|
-import org.openzen.zenscript.codemodel.annotations.AnnotationDefinition;
|
15
|
11
|
import org.openzen.zenscript.codemodel.FunctionHeader;
|
16
|
12
|
import org.openzen.zenscript.codemodel.GenericMapper;
|
|
13
|
+import org.openzen.zenscript.codemodel.GenericName;
|
|
14
|
+import org.openzen.zenscript.codemodel.annotations.AnnotationDefinition;
|
17
|
15
|
import org.openzen.zenscript.codemodel.context.TypeResolutionContext;
|
18
|
16
|
import org.openzen.zenscript.codemodel.definition.ExpansionDefinition;
|
|
17
|
+import org.openzen.zenscript.codemodel.definition.ZSPackage;
|
|
18
|
+import org.openzen.zenscript.codemodel.expression.InvalidExpression;
|
19
|
19
|
import org.openzen.zenscript.codemodel.partial.IPartialExpression;
|
20
|
20
|
import org.openzen.zenscript.codemodel.partial.PartialGlobalExpression;
|
21
|
21
|
import org.openzen.zenscript.codemodel.partial.PartialTypeExpression;
|
22
|
22
|
import org.openzen.zenscript.codemodel.statement.LoopStatement;
|
23
|
|
-import org.openzen.zenscript.codemodel.GenericName;
|
24
|
|
-import org.openzen.zenscript.codemodel.definition.ZSPackage;
|
25
|
|
-import org.openzen.zenscript.codemodel.expression.InvalidExpression;
|
26
|
23
|
import org.openzen.zenscript.codemodel.type.BasicTypeID;
|
27
|
24
|
import org.openzen.zenscript.codemodel.type.ISymbol;
|
28
|
25
|
import org.openzen.zenscript.codemodel.type.StoredType;
|
|
@@ -32,6 +29,10 @@ import org.openzen.zenscript.codemodel.type.member.TypeMemberPreparer;
|
32
|
29
|
import org.openzen.zenscript.codemodel.type.storage.StaticExpressionStorageTag;
|
33
|
30
|
import org.openzen.zenscript.codemodel.type.storage.StorageTag;
|
34
|
31
|
|
|
32
|
+import java.util.Collections;
|
|
33
|
+import java.util.List;
|
|
34
|
+import java.util.Map;
|
|
35
|
+
|
35
|
36
|
/**
|
36
|
37
|
*
|
37
|
38
|
* @author Hoofdgebruiker
|
|
@@ -42,7 +43,15 @@ public class FileScope extends BaseScope {
|
42
|
43
|
private final LocalMemberCache memberCache;
|
43
|
44
|
private final Map<String, ISymbol> globals;
|
44
|
45
|
private final TypeMemberPreparer preparer;
|
45
|
|
-
|
|
46
|
+
|
|
47
|
+ public FileScope(
|
|
48
|
+ TypeResolutionContext context,
|
|
49
|
+ List<ExpansionDefinition> expansions,
|
|
50
|
+ Map<String, ISymbol> globals) {
|
|
51
|
+ this(context, expansions, globals, member -> {
|
|
52
|
+ });
|
|
53
|
+ }
|
|
54
|
+
|
46
|
55
|
public FileScope(
|
47
|
56
|
TypeResolutionContext context,
|
48
|
57
|
List<ExpansionDefinition> expansions,
|