Sfoglia il codice sorgente

Merge remote-tracking branch 'Stan/development' into development

kindlich 6 anni fa
parent
commit
6900a1e11d
Non sono state trovate chiavi note per questa firma nel database
100 ha cambiato i file con 204 aggiunte e 127 eliminazioni
  1. 3
    3
      CodeFormatter/src/main/java/org/openzen/zenscript/formatter/ExpressionFormatter.java
  2. 3
    3
      CodeFormatter/src/main/java/org/openzen/zenscript/formatter/SwitchValueFormatter.java
  3. 2
    2
      CodeFormatter/src/main/java/org/openzen/zenscript/formatter/TypeFormatter.java
  4. 2
    2
      CodeFormatterShared/src/main/java/org/openzen/zenscript/formattershared/FormattingSettings.java
  5. 20
    1
      CodeFormatterShared/src/main/java/org/openzen/zenscript/formattershared/StatementFormatter.java
  6. 2
    0
      CodeFormatterShared/src/main/java/org/openzen/zenscript/formattershared/StatementFormattingTarget.java
  7. 56
    0
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/FunctionHeader.java
  8. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/FunctionParameter.java
  9. 2
    2
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/HighLevelDefinition.java
  10. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/ScriptBlock.java
  11. 2
    2
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/WhitespaceInfo.java
  12. 2
    2
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/WhitespacePostComment.java
  13. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/annotations/AnnotationDefinition.java
  14. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/annotations/NativeAnnotationDefinition.java
  15. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/annotations/PreconditionAnnotationDefinition.java
  16. 5
    4
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/annotations/PreconditionForMethod.java
  17. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/AliasDefinition.java
  18. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/ClassDefinition.java
  19. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/EnumDefinition.java
  20. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/ExpansionDefinition.java
  21. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/FunctionDefinition.java
  22. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/InterfaceDefinition.java
  23. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/StructDefinition.java
  24. 2
    2
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/VariantDefinition.java
  25. 3
    3
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/ZSPackage.java
  26. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/AndAndExpression.java
  27. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ArrayExpression.java
  28. 3
    3
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CallArguments.java
  29. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CallExpression.java
  30. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CallStaticExpression.java
  31. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CallTranslator.java
  32. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CapturedClosureExpression.java
  33. 1
    3
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CapturedDirectExpression.java
  34. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CapturedExpression.java
  35. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CapturedLocalVariableExpression.java
  36. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CapturedParameterExpression.java
  37. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CapturedThisExpression.java
  38. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CastExpression.java
  39. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CheckNullExpression.java
  40. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CoalesceExpression.java
  41. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CompareExpression.java
  42. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConditionalExpression.java
  43. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstExpression.java
  44. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantBoolExpression.java
  45. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantByteExpression.java
  46. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantCharExpression.java
  47. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantDoubleExpression.java
  48. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantFloatExpression.java
  49. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantIntExpression.java
  50. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantLongExpression.java
  51. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantSByteExpression.java
  52. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantShortExpression.java
  53. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantStringExpression.java
  54. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantUIntExpression.java
  55. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantULongExpression.java
  56. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantUShortExpression.java
  57. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstructorSuperCallExpression.java
  58. 1
    2
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstructorThisCallExpression.java
  59. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/EnumConstantExpression.java
  60. 3
    3
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/Expression.java
  61. 5
    6
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ExpressionBuilder.java
  62. 4
    3
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/FunctionExpression.java
  63. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/GetFieldExpression.java
  64. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/GetFunctionParameterExpression.java
  65. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/GetLocalVariableExpression.java
  66. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/GetStaticFieldExpression.java
  67. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/GetterExpression.java
  68. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/GlobalCallExpression.java
  69. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/GlobalExpression.java
  70. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/InterfaceCastExpression.java
  71. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/IsExpression.java
  72. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/MakeConstExpression.java
  73. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/MapExpression.java
  74. 1
    2
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/MatchExpression.java
  75. 1
    2
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/NewExpression.java
  76. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/NullExpression.java
  77. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/OrOrExpression.java
  78. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/PanicExpression.java
  79. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/PostCallExpression.java
  80. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/RangeExpression.java
  81. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/SameObjectExpression.java
  82. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/SetFieldExpression.java
  83. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/SetFunctionParameterExpression.java
  84. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/SetLocalVariableExpression.java
  85. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/SetStaticFieldExpression.java
  86. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/SetterExpression.java
  87. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/StaticGetterExpression.java
  88. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/StaticSetterExpression.java
  89. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/SupertypeCastExpression.java
  90. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ThisExpression.java
  91. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ThrowExpression.java
  92. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/TryConvertExpression.java
  93. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/TryRethrowAsExceptionExpression.java
  94. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/TryRethrowAsResultExpression.java
  95. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/VariantValueExpression.java
  96. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/WrapOptionalExpression.java
  97. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/generic/ParameterTypeBound.java
  98. 1
    1
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/generic/TypeParameter.java
  99. 4
    0
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/iterator/ForeachIteratorVisitor.java
  100. 0
    0
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/member/CallerMember.java

+ 3
- 3
CodeFormatter/src/main/java/org/openzen/zenscript/formatter/ExpressionFormatter.java Vedi File

@@ -5,6 +5,7 @@
5 5
  */
6 6
 package org.openzen.zenscript.formatter;
7 7
 
8
+import org.openzen.zencode.shared.StringExpansion;
8 9
 import org.openzen.zenscript.formattershared.ExpressionString;
9 10
 import org.openzen.zenscript.codemodel.OperatorType;
10 11
 import org.openzen.zenscript.codemodel.expression.AndAndExpression;
@@ -75,7 +76,6 @@ import org.openzen.zenscript.codemodel.expression.TryRethrowAsExceptionExpressio
75 76
 import org.openzen.zenscript.codemodel.expression.TryRethrowAsResultExpression;
76 77
 import org.openzen.zenscript.codemodel.expression.VariantValueExpression;
77 78
 import org.openzen.zenscript.codemodel.expression.WrapOptionalExpression;
78
-import org.openzen.zenscript.shared.StringUtils;
79 79
 
80 80
 /**
81 81
  *
@@ -348,7 +348,7 @@ public class ExpressionFormatter implements ExpressionVisitor<ExpressionString>
348 348
 	@Override
349 349
 	public ExpressionString visitConstantChar(ConstantCharExpression expression) {
350 350
 		return new ExpressionString(
351
-				StringUtils.escape(Character.toString(expression.value), '\'', true),
351
+				StringExpansion.escape(Character.toString(expression.value), '\'', true),
352 352
 				ZenScriptOperator.PRIMARY);
353 353
 	}
354 354
 
@@ -384,7 +384,7 @@ public class ExpressionFormatter implements ExpressionVisitor<ExpressionString>
384 384
 
385 385
 	@Override
386 386
 	public ExpressionString visitConstantString(ConstantStringExpression expression) {
387
-		return new ExpressionString(StringUtils.escape(
387
+		return new ExpressionString(StringExpansion.escape(
388 388
 				expression.value,
389 389
 				settings.useSingleQuotesForStrings ? '\'' : '"',
390 390
 				true), ZenScriptOperator.CAST);

+ 3
- 3
CodeFormatter/src/main/java/org/openzen/zenscript/formatter/SwitchValueFormatter.java Vedi File

@@ -5,13 +5,13 @@
5 5
  */
6 6
 package org.openzen.zenscript.formatter;
7 7
 
8
+import org.openzen.zencode.shared.StringExpansion;
8 9
 import org.openzen.zenscript.codemodel.expression.switchvalue.CharSwitchValue;
9 10
 import org.openzen.zenscript.codemodel.expression.switchvalue.EnumConstantSwitchValue;
10 11
 import org.openzen.zenscript.codemodel.expression.switchvalue.IntSwitchValue;
11 12
 import org.openzen.zenscript.codemodel.expression.switchvalue.StringSwitchValue;
12 13
 import org.openzen.zenscript.codemodel.expression.switchvalue.SwitchValueVisitor;
13 14
 import org.openzen.zenscript.codemodel.expression.switchvalue.VariantOptionSwitchValue;
14
-import org.openzen.zenscript.shared.StringUtils;
15 15
 
16 16
 /**
17 17
  *
@@ -31,12 +31,12 @@ public class SwitchValueFormatter implements SwitchValueVisitor<String> {
31 31
 
32 32
 	@Override
33 33
 	public String acceptChar(CharSwitchValue value) {
34
-		return StringUtils.escape(new String(new char[] { value.value }), '\'', true);
34
+		return StringExpansion.escape(new String(new char[] { value.value }), '\'', true);
35 35
 	}
36 36
 
37 37
 	@Override
38 38
 	public String acceptString(StringSwitchValue value) {
39
-		return StringUtils.escape(value.value, settings.useSingleQuotesForStrings ? '\'' : '"', true);
39
+		return StringExpansion.escape(value.value, settings.useSingleQuotesForStrings ? '\'' : '"', true);
40 40
 	}
41 41
 
42 42
 	@Override

+ 2
- 2
CodeFormatter/src/main/java/org/openzen/zenscript/formatter/TypeFormatter.java Vedi File

@@ -23,7 +23,7 @@ import org.openzen.zenscript.codemodel.type.ITypeVisitor;
23 23
 import org.openzen.zenscript.codemodel.type.IteratorTypeID;
24 24
 import org.openzen.zenscript.codemodel.type.OptionalTypeID;
25 25
 import org.openzen.zenscript.codemodel.type.RangeTypeID;
26
-import org.openzen.zenscript.shared.StringUtils;
26
+import stdlib.Chars;
27 27
 
28 28
 /**
29 29
  *
@@ -49,7 +49,7 @@ public class TypeFormatter implements ITypeVisitor<String>, GenericParameterBoun
49 49
 		if (array.dimension == 1) {
50 50
 			return element + "[]";
51 51
 		} else {
52
-			return element + "[" + StringUtils.times(',', array.dimension - 1) + "]";
52
+			return element + "[" + Chars.times(',', array.dimension - 1) + "]";
53 53
 		}
54 54
 	}
55 55
 

+ 2
- 2
CodeFormatterShared/src/main/java/org/openzen/zenscript/formattershared/FormattingSettings.java Vedi File

@@ -5,7 +5,7 @@
5 5
  */
6 6
 package org.openzen.zenscript.formattershared;
7 7
 
8
-import org.openzen.zenscript.shared.StringUtils;
8
+import stdlib.Chars;
9 9
 
10 10
 /**
11 11
  *
@@ -25,7 +25,7 @@ public class FormattingSettings {
25 25
 		if (useTabs) {
26 26
 			indent = "\t";
27 27
 		} else {
28
-			indent = StringUtils.times(' ', spacesPerTab);
28
+			indent = Chars.times(' ', spacesPerTab);
29 29
 		}
30 30
 	}
31 31
 	

+ 20
- 1
CodeFormatterShared/src/main/java/org/openzen/zenscript/formattershared/StatementFormatter.java Vedi File

@@ -205,13 +205,30 @@ public class StatementFormatter implements StatementVisitor<Void>, StatementForm
205 205
 		if (!lineAfter.isEmpty())
206 206
 			output.append('\n').append(indent).append(lineAfter);
207 207
 	}
208
+	
209
+	@Override
210
+	public void writeInner(String lineBefore, String[] inlineContents, Statement contents, LoopStatement loop, String lineAfter) {
211
+		output.append('\n').append(indent).append(lineBefore);
212
+		StatementFormatter innerFormatter = new StatementFormatter(output, settings, formatter.forLoop(loop), indent + settings.indent, loop == null ? innerLoop : loop);
213
+		for (String inline : inlineContents)
214
+			output.append('\n').append(indent).append(settings.indent).append(inline);
215
+		if (contents instanceof BlockStatement) {
216
+			for (Statement statement : ((BlockStatement) contents).statements)
217
+				statement.accept(innerFormatter);
218
+		} else {
219
+			contents.accept(innerFormatter);
220
+		}
221
+		
222
+		if (!lineAfter.isEmpty())
223
+			output.append('\n').append(indent).append(lineAfter);
224
+	}
208 225
 
209 226
 	@Override
210 227
 	public void writeInnerMulti(String lineBefore, List<StatementFormattingSubBlock> contents, LoopStatement loop, String lineAfter) {
211 228
 		output.append('\n').append(indent).append(lineBefore);
212 229
 		
213 230
 		String newIndent = indent + settings.indent + settings.indent;
214
-		StatementFormatter inner = new StatementFormatter(output, settings, formatter, newIndent, innerLoop);
231
+		StatementFormatter inner = new StatementFormatter(output, settings, formatter.forLoop(loop), newIndent, innerLoop);
215 232
 		
216 233
 		for (StatementFormattingSubBlock subBlock : contents) {
217 234
 			output.append('\n').append(indent).append(settings.indent).append(subBlock.header);
@@ -278,6 +295,8 @@ public class StatementFormatter implements StatementVisitor<Void>, StatementForm
278 295
 	}
279 296
 	
280 297
 	public interface Formatter {
298
+		public Formatter forLoop(LoopStatement statement);
299
+		
281 300
 		public void formatBlock(StatementFormattingTarget target, BlockStatement statement);
282 301
 	
283 302
 		public void formatBreak(StatementFormattingTarget target, BreakStatement statement);

+ 2
- 0
CodeFormatterShared/src/main/java/org/openzen/zenscript/formattershared/StatementFormattingTarget.java Vedi File

@@ -23,6 +23,8 @@ public interface StatementFormattingTarget {
23 23
 	
24 24
 	void writeInner(String lineBefore, Statement contents, LoopStatement loop, String lineAfter);
25 25
 	
26
+	void writeInner(String lineBefore, String[] inlineContents, Statement contents, LoopStatement loop, String lineAfter);
27
+	
26 28
 	void writeInnerMulti(String lineBefore, List<StatementFormattingSubBlock> contents, LoopStatement loop, String lineAfter);
27 29
 	
28 30
 	void writeBlock(String lineBefore, BlockStatement contents, String lineAfter);

+ 56
- 0
CodeModel/src/main/java/org/openzen/zenscript/codemodel/FunctionHeader.java Vedi File

@@ -29,6 +29,9 @@ public class FunctionHeader {
29 29
 	public final FunctionParameter[] parameters;
30 30
 	public final ITypeID thrownType;
31 31
 	
32
+	public final int minParameters;
33
+	public final int maxParameters;
34
+	
32 35
 	public FunctionHeader(ITypeID returnType) {
33 36
 		if (returnType == null)
34 37
 			throw new NullPointerException();
@@ -37,6 +40,9 @@ public class FunctionHeader {
37 40
 		this.returnType = returnType;
38 41
 		this.parameters = NO_PARAMETERS;
39 42
 		this.thrownType = null;
43
+		
44
+		minParameters = 0;
45
+		maxParameters = 0;
40 46
 	}
41 47
 	
42 48
 	public FunctionHeader(ITypeID returnType, ITypeID... parameterTypes) {
@@ -50,6 +56,9 @@ public class FunctionHeader {
50 56
 		
51 57
 		for (int i = 0; i < parameterTypes.length; i++)
52 58
 			parameters[i] = new FunctionParameter(parameterTypes[i], null);
59
+		
60
+		minParameters = parameterTypes.length;
61
+		maxParameters = parameterTypes.length;
53 62
 	}
54 63
 	
55 64
 	public FunctionHeader(ITypeID returnType, FunctionParameter... parameters) {
@@ -60,6 +69,9 @@ public class FunctionHeader {
60 69
 		this.returnType = returnType;
61 70
 		this.parameters = parameters;
62 71
 		this.thrownType = null;
72
+		
73
+		minParameters = getMinParameters(parameters);
74
+		maxParameters = getMaxParameters(parameters);
63 75
 	}
64 76
 	
65 77
 	public FunctionHeader(TypeParameter[] genericParameters, ITypeID returnType, ITypeID thrownType, FunctionParameter... parameters) {
@@ -70,12 +82,41 @@ public class FunctionHeader {
70 82
 		this.returnType = returnType;
71 83
 		this.parameters = parameters;
72 84
 		this.thrownType = thrownType;
85
+		
86
+		minParameters = getMinParameters(parameters);
87
+		maxParameters = getMaxParameters(parameters);
73 88
 	}
74 89
 	
75 90
 	public int getNumberOfTypeParameters() {
76 91
 		return typeParameters == null ? 0 : typeParameters.length;
77 92
 	}
78 93
 	
94
+	public boolean matchesExactly(CallArguments arguments, TypeScope scope) {
95
+		if (arguments.arguments.length < minParameters || arguments.arguments.length > maxParameters)
96
+			return false;
97
+		
98
+		FunctionHeader header = fillGenericArguments(scope.getTypeRegistry(), arguments.typeArguments);
99
+		for (int i = 0; i < header.parameters.length; i++) {
100
+			if (arguments.arguments[i].type != header.parameters[i].type)
101
+				return false;
102
+		}
103
+		
104
+		return true;
105
+	}
106
+	
107
+	public boolean matchesImplicitly(CallArguments arguments, TypeScope scope) {
108
+		if (arguments.arguments.length < minParameters || arguments.arguments.length > maxParameters)
109
+			return false;
110
+		
111
+		FunctionHeader header = fillGenericArguments(scope.getTypeRegistry(), arguments.typeArguments);
112
+		for (int i = 0; i < header.parameters.length; i++) {
113
+			if (!scope.getTypeMembers(arguments.arguments[i].type).canCastImplicit(header.parameters[i].type))
114
+				return false;
115
+		}
116
+		
117
+		return true;
118
+	}
119
+	
79 120
 	public String getCanonical() {
80 121
 		StringBuilder result = new StringBuilder();
81 122
 		if (getNumberOfTypeParameters() > 0) {
@@ -304,4 +345,19 @@ public class FunctionHeader {
304 345
 		result.append(")");
305 346
 		return result.toString();
306 347
 	}
348
+
349
+	private static int getMinParameters(FunctionParameter[] parameters) {
350
+		for (int i = 0; i < parameters.length; i++)
351
+			if (parameters[i].defaultValue != null || parameters[i].variadic)
352
+				return i;
353
+		
354
+		return parameters.length;
355
+	}
356
+	
357
+	private static int getMaxParameters(FunctionParameter[] parameters) {
358
+		if (parameters.length == 0)
359
+			return 0;
360
+		
361
+		return parameters[parameters.length - 1].variadic ? Integer.MAX_VALUE : parameters.length;
362
+	}
307 363
 }

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/FunctionParameter.java Vedi File

@@ -7,9 +7,9 @@ package org.openzen.zenscript.codemodel;
7 7
 
8 8
 import org.openzen.zenscript.codemodel.annotations.Annotation;
9 9
 import java.util.Objects;
10
+import org.openzen.zencode.shared.Taggable;
10 11
 import org.openzen.zenscript.codemodel.expression.Expression;
11 12
 import org.openzen.zenscript.codemodel.type.ITypeID;
12
-import org.openzen.zenscript.shared.Taggable;
13 13
 
14 14
 /**
15 15
  *

+ 2
- 2
CodeModel/src/main/java/org/openzen/zenscript/codemodel/HighLevelDefinition.java Vedi File

@@ -7,6 +7,8 @@ package org.openzen.zenscript.codemodel;
7 7
 
8 8
 import java.util.ArrayList;
9 9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
11
+import org.openzen.zencode.shared.Taggable;
10 12
 import org.openzen.zenscript.codemodel.annotations.DefinitionAnnotation;
11 13
 import org.openzen.zenscript.codemodel.definition.DefinitionVisitor;
12 14
 import org.openzen.zenscript.codemodel.definition.ZSPackage;
@@ -15,8 +17,6 @@ import org.openzen.zenscript.codemodel.member.ConstructorMember;
15 17
 import org.openzen.zenscript.codemodel.member.FieldMember;
16 18
 import org.openzen.zenscript.codemodel.member.IDefinitionMember;
17 19
 import org.openzen.zenscript.codemodel.type.ITypeID;
18
-import org.openzen.zenscript.shared.CodePosition;
19
-import org.openzen.zenscript.shared.Taggable;
20 20
 
21 21
 /**
22 22
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/ScriptBlock.java Vedi File

@@ -6,8 +6,8 @@
6 6
 package org.openzen.zenscript.codemodel;
7 7
 
8 8
 import java.util.List;
9
+import org.openzen.zencode.shared.Taggable;
9 10
 import org.openzen.zenscript.codemodel.statement.Statement;
10
-import org.openzen.zenscript.shared.Taggable;
11 11
 
12 12
 /**
13 13
  *

+ 2
- 2
CodeModel/src/main/java/org/openzen/zenscript/codemodel/WhitespaceInfo.java Vedi File

@@ -7,7 +7,7 @@ package org.openzen.zenscript.codemodel;
7 7
 
8 8
 import java.util.ArrayList;
9 9
 import java.util.List;
10
-import org.openzen.zenscript.shared.StringUtils;
10
+import stdlib.Strings;
11 11
 
12 12
 /**
13 13
  *
@@ -20,7 +20,7 @@ public class WhitespaceInfo {
20 20
 			if (c == '\n')
21 21
 				numNewLines++;
22 22
 		
23
-		List<String> split = StringUtils.split(whitespaceBefore, '\n');
23
+		String[] split = Strings.split(whitespaceBefore, '\n');
24 24
 		List<String> commentsBefore = new ArrayList<>();
25 25
 		for (String splitLine : split) {
26 26
 			String trimmed = splitLine.trim();

+ 2
- 2
CodeModel/src/main/java/org/openzen/zenscript/codemodel/WhitespacePostComment.java Vedi File

@@ -7,7 +7,7 @@ package org.openzen.zenscript.codemodel;
7 7
 
8 8
 import java.util.ArrayList;
9 9
 import java.util.List;
10
-import org.openzen.zenscript.shared.StringUtils;
10
+import stdlib.Strings;
11 11
 
12 12
 /**
13 13
  *
@@ -16,7 +16,7 @@ import org.openzen.zenscript.shared.StringUtils;
16 16
 public class WhitespacePostComment {
17 17
 	public static WhitespacePostComment fromWhitespace(String whitespace) {
18 18
 		List<String> comments = new ArrayList<>();
19
-		for (String line : StringUtils.split(whitespace, '\n')) {
19
+		for (String line : Strings.split(whitespace, '\n')) {
20 20
 			line = line.trim();
21 21
 			if (line.isEmpty())
22 22
 				continue;

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/annotations/AnnotationDefinition.java Vedi File

@@ -6,6 +6,7 @@
6 6
 package org.openzen.zenscript.codemodel.annotations;
7 7
 
8 8
 import java.util.List;
9
+import org.openzen.zencode.shared.CodePosition;
9 10
 import org.openzen.zenscript.codemodel.FunctionHeader;
10 11
 import org.openzen.zenscript.codemodel.FunctionParameter;
11 12
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
@@ -15,7 +16,6 @@ import org.openzen.zenscript.codemodel.scope.BaseScope;
15 16
 import org.openzen.zenscript.codemodel.scope.ExpressionScope;
16 17
 import org.openzen.zenscript.codemodel.scope.StatementScope;
17 18
 import org.openzen.zenscript.codemodel.statement.Statement;
18
-import org.openzen.zenscript.shared.CodePosition;
19 19
 
20 20
 /**
21 21
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/annotations/NativeAnnotationDefinition.java Vedi File

@@ -7,6 +7,7 @@ package org.openzen.zenscript.codemodel.annotations;
7 7
 
8 8
 import java.util.Collections;
9 9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
10 11
 import org.openzen.zenscript.codemodel.FunctionHeader;
11 12
 import org.openzen.zenscript.codemodel.FunctionParameter;
12 13
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
@@ -18,7 +19,6 @@ import org.openzen.zenscript.codemodel.scope.ExpressionScope;
18 19
 import org.openzen.zenscript.codemodel.scope.StatementScope;
19 20
 import org.openzen.zenscript.codemodel.statement.Statement;
20 21
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
21
-import org.openzen.zenscript.shared.CodePosition;
22 22
 
23 23
 /**
24 24
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/annotations/PreconditionAnnotationDefinition.java Vedi File

@@ -8,6 +8,7 @@ package org.openzen.zenscript.codemodel.annotations;
8 8
 import java.util.Arrays;
9 9
 import java.util.Collections;
10 10
 import java.util.List;
11
+import org.openzen.zencode.shared.CodePosition;
11 12
 import org.openzen.zenscript.codemodel.FunctionHeader;
12 13
 import org.openzen.zenscript.codemodel.FunctionParameter;
13 14
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
@@ -23,7 +24,6 @@ import org.openzen.zenscript.codemodel.scope.StatementScope;
23 24
 import org.openzen.zenscript.codemodel.statement.Statement;
24 25
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
25 26
 import org.openzen.zenscript.codemodel.type.GenericName;
26
-import org.openzen.zenscript.shared.CodePosition;
27 27
 
28 28
 /**
29 29
  *

+ 5
- 4
CodeModel/src/main/java/org/openzen/zenscript/codemodel/annotations/PreconditionForMethod.java Vedi File

@@ -7,18 +7,19 @@ package org.openzen.zenscript.codemodel.annotations;
7 7
 
8 8
 import java.util.ArrayList;
9 9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
10 11
 import org.openzen.zenscript.codemodel.expression.Expression;
11 12
 import org.openzen.zenscript.codemodel.expression.ExpressionBuilder;
13
+import org.openzen.zenscript.codemodel.expression.PanicExpression;
12 14
 import org.openzen.zenscript.codemodel.member.FunctionalMember;
13 15
 import org.openzen.zenscript.codemodel.member.IDefinitionMember;
14 16
 import org.openzen.zenscript.codemodel.scope.BaseScope;
15 17
 import org.openzen.zenscript.codemodel.scope.ExpressionScope;
16 18
 import org.openzen.zenscript.codemodel.statement.BlockStatement;
19
+import org.openzen.zenscript.codemodel.statement.ExpressionStatement;
17 20
 import org.openzen.zenscript.codemodel.statement.IfStatement;
18 21
 import org.openzen.zenscript.codemodel.statement.Statement;
19
-import org.openzen.zenscript.codemodel.statement.ThrowStatement;
20 22
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
21
-import org.openzen.zenscript.shared.CodePosition;
22 23
 
23 24
 /**
24 25
  *
@@ -55,8 +56,8 @@ public class PreconditionForMethod implements MemberAnnotation {
55 56
 		List<Statement> statements = new ArrayList<>();
56 57
 		ExpressionBuilder expressionBuilder = new ExpressionBuilder(position, expressionScope);
57 58
 		Expression inverseCondition = expressionBuilder.not(condition);
58
-		Statement throwStatement = new ThrowStatement(CodePosition.BUILTIN, expressionBuilder.constructNew("stdlib.IllegalArgumentException", message));
59
-		statements.add(new IfStatement(CodePosition.BUILTIN, inverseCondition, throwStatement, null));
59
+		Statement throwStatement = new ExpressionStatement(position, new PanicExpression(position, BasicTypeID.VOID, message));
60
+		statements.add(new IfStatement(position, inverseCondition, throwStatement, null));
60 61
 		if (member.body instanceof BlockStatement) {
61 62
 			statements.addAll(((BlockStatement)member.body).statements);
62 63
 		} else {

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/AliasDefinition.java Vedi File

@@ -5,9 +5,9 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.definition;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
9 10
 import org.openzen.zenscript.codemodel.type.ITypeID;
10
-import org.openzen.zenscript.shared.CodePosition;
11 11
 
12 12
 /**
13 13
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/ClassDefinition.java Vedi File

@@ -5,9 +5,9 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.definition;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
9 10
 import org.openzen.zenscript.codemodel.type.ITypeID;
10
-import org.openzen.zenscript.shared.CodePosition;
11 11
 
12 12
 /**
13 13
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/EnumDefinition.java Vedi File

@@ -7,9 +7,9 @@ package org.openzen.zenscript.codemodel.definition;
7 7
 
8 8
 import java.util.ArrayList;
9 9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
10 11
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
11 12
 import org.openzen.zenscript.codemodel.member.EnumConstantMember;
12
-import org.openzen.zenscript.shared.CodePosition;
13 13
 
14 14
 /**
15 15
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/ExpansionDefinition.java Vedi File

@@ -5,9 +5,9 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.definition;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
9 10
 import org.openzen.zenscript.codemodel.type.ITypeID;
10
-import org.openzen.zenscript.shared.CodePosition;
11 11
 
12 12
 /**
13 13
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/FunctionDefinition.java Vedi File

@@ -5,6 +5,7 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.definition;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.FunctionHeader;
9 10
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
10 11
 import org.openzen.zenscript.codemodel.Modifiers;
@@ -13,7 +14,6 @@ import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
13 14
 import org.openzen.zenscript.codemodel.statement.Statement;
14 15
 import org.openzen.zenscript.codemodel.type.member.DefinitionMemberGroup;
15 16
 import org.openzen.zenscript.codemodel.type.member.TypeMemberPriority;
16
-import org.openzen.zenscript.shared.CodePosition;
17 17
 
18 18
 /**
19 19
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/InterfaceDefinition.java Vedi File

@@ -7,9 +7,9 @@ package org.openzen.zenscript.codemodel.definition;
7 7
 
8 8
 import java.util.ArrayList;
9 9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
10 11
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
11 12
 import org.openzen.zenscript.codemodel.type.ITypeID;
12
-import org.openzen.zenscript.shared.CodePosition;
13 13
 
14 14
 /**
15 15
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/StructDefinition.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.definition;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 2
- 2
CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/VariantDefinition.java Vedi File

@@ -7,12 +7,12 @@ package org.openzen.zenscript.codemodel.definition;
7 7
 
8 8
 import java.util.ArrayList;
9 9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
11
+import org.openzen.zencode.shared.Taggable;
10 12
 import org.openzen.zenscript.codemodel.GenericMapper;
11 13
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
12 14
 import org.openzen.zenscript.codemodel.member.ref.VariantOptionRef;
13 15
 import org.openzen.zenscript.codemodel.type.ITypeID;
14
-import org.openzen.zenscript.shared.CodePosition;
15
-import org.openzen.zenscript.shared.Taggable;
16 16
 
17 17
 /**
18 18
  *

+ 3
- 3
CodeModel/src/main/java/org/openzen/zenscript/codemodel/definition/ZSPackage.java Vedi File

@@ -8,8 +8,9 @@ package org.openzen.zenscript.codemodel.definition;
8 8
 import java.util.HashMap;
9 9
 import java.util.List;
10 10
 import java.util.Map;
11
-import org.openzen.zenscript.shared.CompileException;
12
-import org.openzen.zenscript.shared.CompileExceptionCode;
11
+import org.openzen.zencode.shared.CodePosition;
12
+import org.openzen.zencode.shared.CompileException;
13
+import org.openzen.zencode.shared.CompileExceptionCode;
13 14
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
14 15
 import org.openzen.zenscript.codemodel.partial.IPartialExpression;
15 16
 import org.openzen.zenscript.codemodel.partial.PartialPackageExpression;
@@ -17,7 +18,6 @@ import org.openzen.zenscript.codemodel.partial.PartialTypeExpression;
17 18
 import org.openzen.zenscript.codemodel.type.GenericName;
18 19
 import org.openzen.zenscript.codemodel.type.GlobalTypeRegistry;
19 20
 import org.openzen.zenscript.codemodel.type.ITypeID;
20
-import org.openzen.zenscript.shared.CodePosition;
21 21
 import org.openzen.zenscript.codemodel.scope.TypeScope;
22 22
 
23 23
 /**

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/AndAndExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ArrayExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.ArrayTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 3
- 3
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CallArguments.java Vedi File

@@ -6,12 +6,12 @@
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8 8
 import java.util.Arrays;
9
+import org.openzen.zencode.shared.CodePosition;
10
+import org.openzen.zencode.shared.CompileException;
11
+import org.openzen.zencode.shared.CompileExceptionCode;
9 12
 import org.openzen.zenscript.codemodel.FunctionHeader;
10 13
 import org.openzen.zenscript.codemodel.scope.TypeScope;
11 14
 import org.openzen.zenscript.codemodel.type.ITypeID;
12
-import org.openzen.zenscript.shared.CodePosition;
13
-import org.openzen.zenscript.shared.CompileException;
14
-import org.openzen.zenscript.shared.CompileExceptionCode;
15 15
 
16 16
 /**
17 17
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CallExpression.java Vedi File

@@ -5,10 +5,10 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.FunctionHeader;
9 10
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
10 11
 import org.openzen.zenscript.codemodel.scope.TypeScope;
11
-import org.openzen.zenscript.shared.CodePosition;
12 12
 
13 13
 /**
14 14
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CallStaticExpression.java Vedi File

@@ -5,11 +5,11 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.FunctionHeader;
9 10
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
10 11
 import org.openzen.zenscript.codemodel.scope.TypeScope;
11 12
 import org.openzen.zenscript.codemodel.type.ITypeID;
12
-import org.openzen.zenscript.shared.CodePosition;
13 13
 
14 14
 /**
15 15
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CallTranslator.java Vedi File

@@ -5,9 +5,9 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.FunctionHeader;
9 10
 import org.openzen.zenscript.codemodel.scope.TypeScope;
10
-import org.openzen.zenscript.shared.CodePosition;
11 11
 
12 12
 /**
13 13
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CapturedClosureExpression.java Vedi File

@@ -5,7 +5,7 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
-import org.openzen.zenscript.shared.CodePosition;
8
+import org.openzen.zencode.shared.CodePosition;
9 9
 
10 10
 /**
11 11
  *

+ 1
- 3
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CapturedDirectExpression.java Vedi File

@@ -5,9 +5,7 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
-import java.util.Map;
9
-import org.openzen.zenscript.codemodel.FunctionParameter;
10
-import org.openzen.zenscript.shared.CodePosition;
8
+import org.openzen.zencode.shared.CodePosition;
11 9
 
12 10
 /**
13 11
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CapturedExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.ITypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CapturedLocalVariableExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.statement.VarStatement;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CapturedParameterExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.FunctionParameter;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CapturedThisExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.ITypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CastExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.member.ref.CasterMemberRef;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CheckNullExpression.java Vedi File

@@ -5,7 +5,7 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
-import org.openzen.zenscript.shared.CodePosition;
8
+import org.openzen.zencode.shared.CodePosition;
9 9
 
10 10
 /**
11 11
  * Converts a value from X? to X. Throws a NullPointerException if the value is null.

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CoalesceExpression.java Vedi File

@@ -5,7 +5,7 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
-import org.openzen.zenscript.shared.CodePosition;
8
+import org.openzen.zencode.shared.CodePosition;
9 9
 
10 10
 /**
11 11
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/CompareExpression.java Vedi File

@@ -5,11 +5,11 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.CompareType;
9 10
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
10 11
 import org.openzen.zenscript.codemodel.scope.TypeScope;
11 12
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
12
-import org.openzen.zenscript.shared.CodePosition;
13 13
 
14 14
 /**
15 15
  * Compare expression for basic types. Left and right MUST be of the same type,

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConditionalExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.ITypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstExpression.java Vedi File

@@ -5,9 +5,9 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.member.EnumConstantMember;
9 10
 import org.openzen.zenscript.codemodel.member.ref.ConstMemberRef;
10
-import org.openzen.zenscript.shared.CodePosition;
11 11
 
12 12
 /**
13 13
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantBoolExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantByteExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantCharExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantDoubleExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantFloatExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantIntExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantLongExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantSByteExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantShortExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantStringExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantUIntExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantULongExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstantUShortExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstructorSuperCallExpression.java Vedi File

@@ -5,11 +5,11 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
9 10
 import org.openzen.zenscript.codemodel.scope.TypeScope;
10 11
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
11 12
 import org.openzen.zenscript.codemodel.type.ITypeID;
12
-import org.openzen.zenscript.shared.CodePosition;
13 13
 
14 14
 /**
15 15
  *

+ 1
- 2
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ConstructorThisCallExpression.java Vedi File

@@ -5,12 +5,11 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
-import org.openzen.zenscript.codemodel.member.ConstructorMember;
8
+import org.openzen.zencode.shared.CodePosition;
9 9
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
10 10
 import org.openzen.zenscript.codemodel.scope.TypeScope;
11 11
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
12 12
 import org.openzen.zenscript.codemodel.type.ITypeID;
13
-import org.openzen.zenscript.shared.CodePosition;
14 13
 
15 14
 /**
16 15
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/EnumConstantExpression.java Vedi File

@@ -5,11 +5,11 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.definition.EnumDefinition;
9 10
 import org.openzen.zenscript.codemodel.member.EnumConstantMember;
10 11
 import org.openzen.zenscript.codemodel.type.GlobalTypeRegistry;
11 12
 import org.openzen.zenscript.codemodel.type.ITypeID;
12
-import org.openzen.zenscript.shared.CodePosition;
13 13
 
14 14
 /**
15 15
  *

+ 3
- 3
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/Expression.java Vedi File

@@ -9,6 +9,9 @@ import java.util.Collections;
9 9
 import java.util.List;
10 10
 import java.util.function.Consumer;
11 11
 import java.util.stream.Collectors;
12
+import org.openzen.zencode.shared.CodePosition;
13
+import org.openzen.zencode.shared.CompileException;
14
+import org.openzen.zencode.shared.CompileExceptionCode;
12 15
 import org.openzen.zenscript.codemodel.FunctionHeader;
13 16
 import org.openzen.zenscript.codemodel.OperatorType;
14 17
 import org.openzen.zenscript.codemodel.member.EnumConstantMember;
@@ -16,13 +19,10 @@ import org.openzen.zenscript.codemodel.partial.IPartialExpression;
16 19
 import org.openzen.zenscript.codemodel.type.GenericName;
17 20
 import org.openzen.zenscript.codemodel.type.ITypeID;
18 21
 import org.openzen.zenscript.codemodel.type.member.TypeMembers;
19
-import org.openzen.zenscript.shared.CodePosition;
20 22
 import org.openzen.zenscript.codemodel.scope.TypeScope;
21 23
 import org.openzen.zenscript.codemodel.statement.Statement;
22 24
 import org.openzen.zenscript.codemodel.statement.StatementTransformer;
23 25
 import org.openzen.zenscript.codemodel.type.FunctionTypeID;
24
-import org.openzen.zenscript.shared.CompileException;
25
-import org.openzen.zenscript.shared.CompileExceptionCode;
26 26
 
27 27
 /**
28 28
  *

+ 5
- 6
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ExpressionBuilder.java Vedi File

@@ -7,18 +7,17 @@ package org.openzen.zenscript.codemodel.expression;
7 7
 
8 8
 import java.util.ArrayList;
9 9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
11
+import org.openzen.zencode.shared.CompileException;
12
+import org.openzen.zencode.shared.CompileExceptionCode;
10 13
 import org.openzen.zenscript.codemodel.OperatorType;
11
-import org.openzen.zenscript.codemodel.member.ConstructorMember;
12 14
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
13 15
 import org.openzen.zenscript.codemodel.scope.ExpressionScope;
14 16
 import org.openzen.zenscript.codemodel.type.GenericName;
15 17
 import org.openzen.zenscript.codemodel.type.ITypeID;
16 18
 import org.openzen.zenscript.codemodel.type.member.DefinitionMemberGroup;
17 19
 import org.openzen.zenscript.codemodel.type.member.TypeMembers;
18
-import org.openzen.zenscript.shared.CodePosition;
19
-import org.openzen.zenscript.shared.CompileException;
20
-import org.openzen.zenscript.shared.CompileExceptionCode;
21
-import org.openzen.zenscript.shared.StringUtils;
20
+import stdlib.Strings;
22 21
 
23 22
 /**
24 23
  *
@@ -34,7 +33,7 @@ public class ExpressionBuilder {
34 33
 	}
35 34
 	
36 35
 	public Expression constructNew(String typename, Expression... arguments) {
37
-		List<String> nameParts = StringUtils.split(typename, '.');
36
+		String[] nameParts = Strings.split(typename, '.');
38 37
 		List<GenericName> name = new ArrayList<>();
39 38
 		for (String namePart : nameParts)
40 39
 			name.add(new GenericName(namePart));

+ 4
- 3
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/FunctionExpression.java Vedi File

@@ -8,14 +8,15 @@ package org.openzen.zenscript.codemodel.expression;
8 8
 import java.util.HashMap;
9 9
 import java.util.Map;
10 10
 import java.util.function.Consumer;
11
+import org.openzen.zencode.shared.CodePosition;
12
+import org.openzen.zencode.shared.ConcatMap;
11 13
 import org.openzen.zenscript.codemodel.FunctionHeader;
12 14
 import org.openzen.zenscript.codemodel.FunctionParameter;
13 15
 import org.openzen.zenscript.codemodel.statement.ExpressionStatement;
16
+import org.openzen.zenscript.codemodel.statement.LoopStatement;
14 17
 import org.openzen.zenscript.codemodel.statement.ReturnStatement;
15 18
 import org.openzen.zenscript.codemodel.statement.Statement;
16 19
 import org.openzen.zenscript.codemodel.type.FunctionTypeID;
17
-import org.openzen.zenscript.shared.CodePosition;
18
-import org.openzen.zenscript.shared.ConcatMap;
19 20
 
20 21
 /**
21 22
  *
@@ -45,7 +46,7 @@ public class FunctionExpression extends Expression {
45 46
 
46 47
 	@Override
47 48
 	public FunctionExpression transform(ExpressionTransformer transformer) {
48
-		Statement tBody = body.transform(transformer, ConcatMap.empty());
49
+		Statement tBody = body.transform(transformer, ConcatMap.empty(LoopStatement.class, LoopStatement.class));
49 50
 		return tBody == body ? this : new FunctionExpression(position, (FunctionTypeID)type, closure, tBody);
50 51
 	}
51 52
 	

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/GetFieldExpression.java Vedi File

@@ -7,10 +7,10 @@ package org.openzen.zenscript.codemodel.expression;
7 7
 
8 8
 import java.util.Collections;
9 9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
10 11
 import org.openzen.zenscript.codemodel.member.ref.FieldMemberRef;
11 12
 import org.openzen.zenscript.codemodel.scope.TypeScope;
12 13
 import org.openzen.zenscript.codemodel.type.ITypeID;
13
-import org.openzen.zenscript.shared.CodePosition;
14 14
 
15 15
 /**
16 16
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/GetFunctionParameterExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.FunctionParameter;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 import org.openzen.zenscript.codemodel.scope.TypeScope;
11 11
 
12 12
 /**

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/GetLocalVariableExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.statement.VarStatement;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 import org.openzen.zenscript.codemodel.scope.TypeScope;
11 11
 
12 12
 /**

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/GetStaticFieldExpression.java Vedi File

@@ -7,9 +7,9 @@ package org.openzen.zenscript.codemodel.expression;
7 7
 
8 8
 import java.util.Collections;
9 9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
10 11
 import org.openzen.zenscript.codemodel.member.ref.FieldMemberRef;
11 12
 import org.openzen.zenscript.codemodel.type.ITypeID;
12
-import org.openzen.zenscript.shared.CodePosition;
13 13
 
14 14
 /**
15 15
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/GetterExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.member.ref.GetterMemberRef;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/GlobalCallExpression.java Vedi File

@@ -5,7 +5,7 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
-import org.openzen.zenscript.shared.CodePosition;
8
+import org.openzen.zencode.shared.CodePosition;
9 9
 
10 10
 /**
11 11
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/GlobalExpression.java Vedi File

@@ -5,7 +5,7 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
-import org.openzen.zenscript.shared.CodePosition;
8
+import org.openzen.zencode.shared.CodePosition;
9 9
 
10 10
 /**
11 11
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/InterfaceCastExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.ITypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/IsExpression.java Vedi File

@@ -5,9 +5,9 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9 10
 import org.openzen.zenscript.codemodel.type.ITypeID;
10
-import org.openzen.zenscript.shared.CodePosition;
11 11
 
12 12
 /**
13 13
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/MakeConstExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.ITypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/MapExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.ITypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 2
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/MatchExpression.java Vedi File

@@ -6,9 +6,9 @@
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8 8
 import java.util.ArrayList;
9
-import java.util.Arrays;
10 9
 import java.util.Collections;
11 10
 import java.util.List;
11
+import org.openzen.zencode.shared.CodePosition;
12 12
 import org.openzen.zenscript.codemodel.expression.switchvalue.SwitchValue;
13 13
 import org.openzen.zenscript.codemodel.statement.BreakStatement;
14 14
 import org.openzen.zenscript.codemodel.statement.ExpressionStatement;
@@ -18,7 +18,6 @@ import org.openzen.zenscript.codemodel.statement.SwitchStatement;
18 18
 import org.openzen.zenscript.codemodel.statement.VarStatement;
19 19
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
20 20
 import org.openzen.zenscript.codemodel.type.ITypeID;
21
-import org.openzen.zenscript.shared.CodePosition;
22 21
 
23 22
 /**
24 23
  *

+ 1
- 2
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/NewExpression.java Vedi File

@@ -5,12 +5,11 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.FunctionHeader;
9
-import org.openzen.zenscript.codemodel.member.ConstructorMember;
10 10
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
11 11
 import org.openzen.zenscript.codemodel.scope.TypeScope;
12 12
 import org.openzen.zenscript.codemodel.type.ITypeID;
13
-import org.openzen.zenscript.shared.CodePosition;
14 13
 
15 14
 /**
16 15
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/NullExpression.java Vedi File

@@ -5,9 +5,9 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9 10
 import org.openzen.zenscript.codemodel.type.ITypeID;
10
-import org.openzen.zenscript.shared.CodePosition;
11 11
 
12 12
 /**
13 13
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/OrOrExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/PanicExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.ITypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/PostCallExpression.java Vedi File

@@ -5,10 +5,10 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.FunctionHeader;
9 10
 import org.openzen.zenscript.codemodel.OperatorType;
10 11
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
11
-import org.openzen.zenscript.shared.CodePosition;
12 12
 
13 13
 /**
14 14
  * Used for post-increment and post-decrement.

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/RangeExpression.java Vedi File

@@ -5,9 +5,9 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.GlobalTypeRegistry;
9 10
 import org.openzen.zenscript.codemodel.type.ITypeID;
10
-import org.openzen.zenscript.shared.CodePosition;
11 11
 
12 12
 /**
13 13
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/SameObjectExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/SetFieldExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.member.ref.FieldMemberRef;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/SetFunctionParameterExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.FunctionParameter;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/SetLocalVariableExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.statement.VarStatement;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/SetStaticFieldExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.member.ref.FieldMemberRef;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/SetterExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.member.ref.SetterMemberRef;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/StaticGetterExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.member.ref.GetterMemberRef;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/StaticSetterExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.member.ref.SetterMemberRef;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/SupertypeCastExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.ITypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  * Using to cast a class type to a base type.

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ThisExpression.java Vedi File

@@ -5,9 +5,9 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.partial.IPartialExpression;
9 10
 import org.openzen.zenscript.codemodel.type.ITypeID;
10
-import org.openzen.zenscript.shared.CodePosition;
11 11
 
12 12
 /**
13 13
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/ThrowExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.ITypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/TryConvertExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.ITypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/TryRethrowAsExceptionExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.ITypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/TryRethrowAsResultExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.ITypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/VariantValueExpression.java Vedi File

@@ -6,10 +6,10 @@
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8 8
 import java.util.List;
9
+import org.openzen.zencode.shared.CodePosition;
9 10
 import org.openzen.zenscript.codemodel.member.ref.VariantOptionRef;
10 11
 import org.openzen.zenscript.codemodel.scope.TypeScope;
11 12
 import org.openzen.zenscript.codemodel.type.ITypeID;
12
-import org.openzen.zenscript.shared.CodePosition;
13 13
 
14 14
 /**
15 15
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/WrapOptionalExpression.java Vedi File

@@ -5,8 +5,8 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.expression;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.type.ITypeID;
9
-import org.openzen.zenscript.shared.CodePosition;
10 10
 
11 11
 /**
12 12
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/generic/ParameterTypeBound.java Vedi File

@@ -5,12 +5,12 @@
5 5
  */
6 6
 package org.openzen.zenscript.codemodel.generic;
7 7
 
8
+import org.openzen.zencode.shared.CodePosition;
8 9
 import org.openzen.zenscript.codemodel.GenericMapper;
9 10
 import org.openzen.zenscript.codemodel.type.member.TypeMembers;
10 11
 import org.openzen.zenscript.codemodel.type.ITypeID;
11 12
 import org.openzen.zenscript.codemodel.type.member.LocalMemberCache;
12 13
 import org.openzen.zenscript.codemodel.type.member.TypeMemberPriority;
13
-import org.openzen.zenscript.shared.CodePosition;
14 14
 
15 15
 /**
16 16
  *

+ 1
- 1
CodeModel/src/main/java/org/openzen/zenscript/codemodel/generic/TypeParameter.java Vedi File

@@ -8,10 +8,10 @@ package org.openzen.zenscript.codemodel.generic;
8 8
 import java.util.ArrayList;
9 9
 import java.util.List;
10 10
 import java.util.Map;
11
+import org.openzen.zencode.shared.CodePosition;
11 12
 import org.openzen.zenscript.codemodel.type.GlobalTypeRegistry;
12 13
 import org.openzen.zenscript.codemodel.type.ITypeID;
13 14
 import org.openzen.zenscript.codemodel.type.member.LocalMemberCache;
14
-import org.openzen.zenscript.shared.CodePosition;
15 15
 
16 16
 /**
17 17
  *

+ 4
- 0
CodeModel/src/main/java/org/openzen/zenscript/codemodel/iterator/ForeachIteratorVisitor.java Vedi File

@@ -16,6 +16,10 @@ public interface ForeachIteratorVisitor<T> {
16 16
 	
17 17
 	T visitArrayKeyValueIterator();
18 18
 	
19
+	T visitAssocKeyIterator();
20
+	
21
+	T visitAssocKeyValueIterator();
22
+	
19 23
 	T visitStringCharacterIterator();
20 24
 	
21 25
 	T visitCustomIterator();

+ 0
- 0
CodeModel/src/main/java/org/openzen/zenscript/codemodel/member/CallerMember.java Vedi File


Dato che sono stati cambiati molti file in questo diff, alcuni di essi non verranno mostrati

Loading…
Annulla
Salva