Browse Source

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

kindlich 6 years ago
parent
commit
6900a1e11d
No known key found for this signature in database
100 changed files with 204 additions and 127 deletions
  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 View File

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

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

5
  */
5
  */
6
 package org.openzen.zenscript.formatter;
6
 package org.openzen.zenscript.formatter;
7
 
7
 
8
+import org.openzen.zencode.shared.StringExpansion;
8
 import org.openzen.zenscript.codemodel.expression.switchvalue.CharSwitchValue;
9
 import org.openzen.zenscript.codemodel.expression.switchvalue.CharSwitchValue;
9
 import org.openzen.zenscript.codemodel.expression.switchvalue.EnumConstantSwitchValue;
10
 import org.openzen.zenscript.codemodel.expression.switchvalue.EnumConstantSwitchValue;
10
 import org.openzen.zenscript.codemodel.expression.switchvalue.IntSwitchValue;
11
 import org.openzen.zenscript.codemodel.expression.switchvalue.IntSwitchValue;
11
 import org.openzen.zenscript.codemodel.expression.switchvalue.StringSwitchValue;
12
 import org.openzen.zenscript.codemodel.expression.switchvalue.StringSwitchValue;
12
 import org.openzen.zenscript.codemodel.expression.switchvalue.SwitchValueVisitor;
13
 import org.openzen.zenscript.codemodel.expression.switchvalue.SwitchValueVisitor;
13
 import org.openzen.zenscript.codemodel.expression.switchvalue.VariantOptionSwitchValue;
14
 import org.openzen.zenscript.codemodel.expression.switchvalue.VariantOptionSwitchValue;
14
-import org.openzen.zenscript.shared.StringUtils;
15
 
15
 
16
 /**
16
 /**
17
  *
17
  *
31
 
31
 
32
 	@Override
32
 	@Override
33
 	public String acceptChar(CharSwitchValue value) {
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
 	@Override
37
 	@Override
38
 	public String acceptString(StringSwitchValue value) {
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
 	@Override
42
 	@Override

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

23
 import org.openzen.zenscript.codemodel.type.IteratorTypeID;
23
 import org.openzen.zenscript.codemodel.type.IteratorTypeID;
24
 import org.openzen.zenscript.codemodel.type.OptionalTypeID;
24
 import org.openzen.zenscript.codemodel.type.OptionalTypeID;
25
 import org.openzen.zenscript.codemodel.type.RangeTypeID;
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
 		if (array.dimension == 1) {
49
 		if (array.dimension == 1) {
50
 			return element + "[]";
50
 			return element + "[]";
51
 		} else {
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.formattershared;
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
 		if (useTabs) {
25
 		if (useTabs) {
26
 			indent = "\t";
26
 			indent = "\t";
27
 		} else {
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 View File

205
 		if (!lineAfter.isEmpty())
205
 		if (!lineAfter.isEmpty())
206
 			output.append('\n').append(indent).append(lineAfter);
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
 	@Override
226
 	@Override
210
 	public void writeInnerMulti(String lineBefore, List<StatementFormattingSubBlock> contents, LoopStatement loop, String lineAfter) {
227
 	public void writeInnerMulti(String lineBefore, List<StatementFormattingSubBlock> contents, LoopStatement loop, String lineAfter) {
211
 		output.append('\n').append(indent).append(lineBefore);
228
 		output.append('\n').append(indent).append(lineBefore);
212
 		
229
 		
213
 		String newIndent = indent + settings.indent + settings.indent;
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
 		for (StatementFormattingSubBlock subBlock : contents) {
233
 		for (StatementFormattingSubBlock subBlock : contents) {
217
 			output.append('\n').append(indent).append(settings.indent).append(subBlock.header);
234
 			output.append('\n').append(indent).append(settings.indent).append(subBlock.header);
278
 	}
295
 	}
279
 	
296
 	
280
 	public interface Formatter {
297
 	public interface Formatter {
298
+		public Formatter forLoop(LoopStatement statement);
299
+		
281
 		public void formatBlock(StatementFormattingTarget target, BlockStatement statement);
300
 		public void formatBlock(StatementFormattingTarget target, BlockStatement statement);
282
 	
301
 	
283
 		public void formatBreak(StatementFormattingTarget target, BreakStatement statement);
302
 		public void formatBreak(StatementFormattingTarget target, BreakStatement statement);

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

23
 	
23
 	
24
 	void writeInner(String lineBefore, Statement contents, LoopStatement loop, String lineAfter);
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
 	void writeInnerMulti(String lineBefore, List<StatementFormattingSubBlock> contents, LoopStatement loop, String lineAfter);
28
 	void writeInnerMulti(String lineBefore, List<StatementFormattingSubBlock> contents, LoopStatement loop, String lineAfter);
27
 	
29
 	
28
 	void writeBlock(String lineBefore, BlockStatement contents, String lineAfter);
30
 	void writeBlock(String lineBefore, BlockStatement contents, String lineAfter);

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

29
 	public final FunctionParameter[] parameters;
29
 	public final FunctionParameter[] parameters;
30
 	public final ITypeID thrownType;
30
 	public final ITypeID thrownType;
31
 	
31
 	
32
+	public final int minParameters;
33
+	public final int maxParameters;
34
+	
32
 	public FunctionHeader(ITypeID returnType) {
35
 	public FunctionHeader(ITypeID returnType) {
33
 		if (returnType == null)
36
 		if (returnType == null)
34
 			throw new NullPointerException();
37
 			throw new NullPointerException();
37
 		this.returnType = returnType;
40
 		this.returnType = returnType;
38
 		this.parameters = NO_PARAMETERS;
41
 		this.parameters = NO_PARAMETERS;
39
 		this.thrownType = null;
42
 		this.thrownType = null;
43
+		
44
+		minParameters = 0;
45
+		maxParameters = 0;
40
 	}
46
 	}
41
 	
47
 	
42
 	public FunctionHeader(ITypeID returnType, ITypeID... parameterTypes) {
48
 	public FunctionHeader(ITypeID returnType, ITypeID... parameterTypes) {
50
 		
56
 		
51
 		for (int i = 0; i < parameterTypes.length; i++)
57
 		for (int i = 0; i < parameterTypes.length; i++)
52
 			parameters[i] = new FunctionParameter(parameterTypes[i], null);
58
 			parameters[i] = new FunctionParameter(parameterTypes[i], null);
59
+		
60
+		minParameters = parameterTypes.length;
61
+		maxParameters = parameterTypes.length;
53
 	}
62
 	}
54
 	
63
 	
55
 	public FunctionHeader(ITypeID returnType, FunctionParameter... parameters) {
64
 	public FunctionHeader(ITypeID returnType, FunctionParameter... parameters) {
60
 		this.returnType = returnType;
69
 		this.returnType = returnType;
61
 		this.parameters = parameters;
70
 		this.parameters = parameters;
62
 		this.thrownType = null;
71
 		this.thrownType = null;
72
+		
73
+		minParameters = getMinParameters(parameters);
74
+		maxParameters = getMaxParameters(parameters);
63
 	}
75
 	}
64
 	
76
 	
65
 	public FunctionHeader(TypeParameter[] genericParameters, ITypeID returnType, ITypeID thrownType, FunctionParameter... parameters) {
77
 	public FunctionHeader(TypeParameter[] genericParameters, ITypeID returnType, ITypeID thrownType, FunctionParameter... parameters) {
70
 		this.returnType = returnType;
82
 		this.returnType = returnType;
71
 		this.parameters = parameters;
83
 		this.parameters = parameters;
72
 		this.thrownType = thrownType;
84
 		this.thrownType = thrownType;
85
+		
86
+		minParameters = getMinParameters(parameters);
87
+		maxParameters = getMaxParameters(parameters);
73
 	}
88
 	}
74
 	
89
 	
75
 	public int getNumberOfTypeParameters() {
90
 	public int getNumberOfTypeParameters() {
76
 		return typeParameters == null ? 0 : typeParameters.length;
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
 	public String getCanonical() {
120
 	public String getCanonical() {
80
 		StringBuilder result = new StringBuilder();
121
 		StringBuilder result = new StringBuilder();
81
 		if (getNumberOfTypeParameters() > 0) {
122
 		if (getNumberOfTypeParameters() > 0) {
304
 		result.append(")");
345
 		result.append(")");
305
 		return result.toString();
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 View File

7
 
7
 
8
 import org.openzen.zenscript.codemodel.annotations.Annotation;
8
 import org.openzen.zenscript.codemodel.annotations.Annotation;
9
 import java.util.Objects;
9
 import java.util.Objects;
10
+import org.openzen.zencode.shared.Taggable;
10
 import org.openzen.zenscript.codemodel.expression.Expression;
11
 import org.openzen.zenscript.codemodel.expression.Expression;
11
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

7
 
7
 
8
 import java.util.ArrayList;
8
 import java.util.ArrayList;
9
 import java.util.List;
9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
11
+import org.openzen.zencode.shared.Taggable;
10
 import org.openzen.zenscript.codemodel.annotations.DefinitionAnnotation;
12
 import org.openzen.zenscript.codemodel.annotations.DefinitionAnnotation;
11
 import org.openzen.zenscript.codemodel.definition.DefinitionVisitor;
13
 import org.openzen.zenscript.codemodel.definition.DefinitionVisitor;
12
 import org.openzen.zenscript.codemodel.definition.ZSPackage;
14
 import org.openzen.zenscript.codemodel.definition.ZSPackage;
15
 import org.openzen.zenscript.codemodel.member.FieldMember;
17
 import org.openzen.zenscript.codemodel.member.FieldMember;
16
 import org.openzen.zenscript.codemodel.member.IDefinitionMember;
18
 import org.openzen.zenscript.codemodel.member.IDefinitionMember;
17
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

6
 package org.openzen.zenscript.codemodel;
6
 package org.openzen.zenscript.codemodel;
7
 
7
 
8
 import java.util.List;
8
 import java.util.List;
9
+import org.openzen.zencode.shared.Taggable;
9
 import org.openzen.zenscript.codemodel.statement.Statement;
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 View File

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

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

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

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

6
 package org.openzen.zenscript.codemodel.annotations;
6
 package org.openzen.zenscript.codemodel.annotations;
7
 
7
 
8
 import java.util.List;
8
 import java.util.List;
9
+import org.openzen.zencode.shared.CodePosition;
9
 import org.openzen.zenscript.codemodel.FunctionHeader;
10
 import org.openzen.zenscript.codemodel.FunctionHeader;
10
 import org.openzen.zenscript.codemodel.FunctionParameter;
11
 import org.openzen.zenscript.codemodel.FunctionParameter;
11
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
12
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
15
 import org.openzen.zenscript.codemodel.scope.ExpressionScope;
16
 import org.openzen.zenscript.codemodel.scope.ExpressionScope;
16
 import org.openzen.zenscript.codemodel.scope.StatementScope;
17
 import org.openzen.zenscript.codemodel.scope.StatementScope;
17
 import org.openzen.zenscript.codemodel.statement.Statement;
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 View File

7
 
7
 
8
 import java.util.Collections;
8
 import java.util.Collections;
9
 import java.util.List;
9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
10
 import org.openzen.zenscript.codemodel.FunctionHeader;
11
 import org.openzen.zenscript.codemodel.FunctionHeader;
11
 import org.openzen.zenscript.codemodel.FunctionParameter;
12
 import org.openzen.zenscript.codemodel.FunctionParameter;
12
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
13
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
18
 import org.openzen.zenscript.codemodel.scope.StatementScope;
19
 import org.openzen.zenscript.codemodel.scope.StatementScope;
19
 import org.openzen.zenscript.codemodel.statement.Statement;
20
 import org.openzen.zenscript.codemodel.statement.Statement;
20
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

8
 import java.util.Arrays;
8
 import java.util.Arrays;
9
 import java.util.Collections;
9
 import java.util.Collections;
10
 import java.util.List;
10
 import java.util.List;
11
+import org.openzen.zencode.shared.CodePosition;
11
 import org.openzen.zenscript.codemodel.FunctionHeader;
12
 import org.openzen.zenscript.codemodel.FunctionHeader;
12
 import org.openzen.zenscript.codemodel.FunctionParameter;
13
 import org.openzen.zenscript.codemodel.FunctionParameter;
13
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
14
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
23
 import org.openzen.zenscript.codemodel.statement.Statement;
24
 import org.openzen.zenscript.codemodel.statement.Statement;
24
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
25
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
25
 import org.openzen.zenscript.codemodel.type.GenericName;
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 View File

7
 
7
 
8
 import java.util.ArrayList;
8
 import java.util.ArrayList;
9
 import java.util.List;
9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
10
 import org.openzen.zenscript.codemodel.expression.Expression;
11
 import org.openzen.zenscript.codemodel.expression.Expression;
11
 import org.openzen.zenscript.codemodel.expression.ExpressionBuilder;
12
 import org.openzen.zenscript.codemodel.expression.ExpressionBuilder;
13
+import org.openzen.zenscript.codemodel.expression.PanicExpression;
12
 import org.openzen.zenscript.codemodel.member.FunctionalMember;
14
 import org.openzen.zenscript.codemodel.member.FunctionalMember;
13
 import org.openzen.zenscript.codemodel.member.IDefinitionMember;
15
 import org.openzen.zenscript.codemodel.member.IDefinitionMember;
14
 import org.openzen.zenscript.codemodel.scope.BaseScope;
16
 import org.openzen.zenscript.codemodel.scope.BaseScope;
15
 import org.openzen.zenscript.codemodel.scope.ExpressionScope;
17
 import org.openzen.zenscript.codemodel.scope.ExpressionScope;
16
 import org.openzen.zenscript.codemodel.statement.BlockStatement;
18
 import org.openzen.zenscript.codemodel.statement.BlockStatement;
19
+import org.openzen.zenscript.codemodel.statement.ExpressionStatement;
17
 import org.openzen.zenscript.codemodel.statement.IfStatement;
20
 import org.openzen.zenscript.codemodel.statement.IfStatement;
18
 import org.openzen.zenscript.codemodel.statement.Statement;
21
 import org.openzen.zenscript.codemodel.statement.Statement;
19
-import org.openzen.zenscript.codemodel.statement.ThrowStatement;
20
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
22
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
21
-import org.openzen.zenscript.shared.CodePosition;
22
 
23
 
23
 /**
24
 /**
24
  *
25
  *
55
 		List<Statement> statements = new ArrayList<>();
56
 		List<Statement> statements = new ArrayList<>();
56
 		ExpressionBuilder expressionBuilder = new ExpressionBuilder(position, expressionScope);
57
 		ExpressionBuilder expressionBuilder = new ExpressionBuilder(position, expressionScope);
57
 		Expression inverseCondition = expressionBuilder.not(condition);
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
 		if (member.body instanceof BlockStatement) {
61
 		if (member.body instanceof BlockStatement) {
61
 			statements.addAll(((BlockStatement)member.body).statements);
62
 			statements.addAll(((BlockStatement)member.body).statements);
62
 		} else {
63
 		} else {

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

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.definition;
6
 package org.openzen.zenscript.codemodel.definition;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
9
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
9
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.definition;
6
 package org.openzen.zenscript.codemodel.definition;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
9
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
9
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

7
 
7
 
8
 import java.util.ArrayList;
8
 import java.util.ArrayList;
9
 import java.util.List;
9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
10
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
11
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
11
 import org.openzen.zenscript.codemodel.member.EnumConstantMember;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.definition;
6
 package org.openzen.zenscript.codemodel.definition;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
9
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
9
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.definition;
6
 package org.openzen.zenscript.codemodel.definition;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.FunctionHeader;
9
 import org.openzen.zenscript.codemodel.FunctionHeader;
9
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
10
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
10
 import org.openzen.zenscript.codemodel.Modifiers;
11
 import org.openzen.zenscript.codemodel.Modifiers;
13
 import org.openzen.zenscript.codemodel.statement.Statement;
14
 import org.openzen.zenscript.codemodel.statement.Statement;
14
 import org.openzen.zenscript.codemodel.type.member.DefinitionMemberGroup;
15
 import org.openzen.zenscript.codemodel.type.member.DefinitionMemberGroup;
15
 import org.openzen.zenscript.codemodel.type.member.TypeMemberPriority;
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 View File

7
 
7
 
8
 import java.util.ArrayList;
8
 import java.util.ArrayList;
9
 import java.util.List;
9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
10
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
11
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
11
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.definition;
6
 package org.openzen.zenscript.codemodel.definition;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
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 View File

7
 
7
 
8
 import java.util.ArrayList;
8
 import java.util.ArrayList;
9
 import java.util.List;
9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
11
+import org.openzen.zencode.shared.Taggable;
10
 import org.openzen.zenscript.codemodel.GenericMapper;
12
 import org.openzen.zenscript.codemodel.GenericMapper;
11
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
13
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
12
 import org.openzen.zenscript.codemodel.member.ref.VariantOptionRef;
14
 import org.openzen.zenscript.codemodel.member.ref.VariantOptionRef;
13
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

8
 import java.util.HashMap;
8
 import java.util.HashMap;
9
 import java.util.List;
9
 import java.util.List;
10
 import java.util.Map;
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
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
14
 import org.openzen.zenscript.codemodel.HighLevelDefinition;
14
 import org.openzen.zenscript.codemodel.partial.IPartialExpression;
15
 import org.openzen.zenscript.codemodel.partial.IPartialExpression;
15
 import org.openzen.zenscript.codemodel.partial.PartialPackageExpression;
16
 import org.openzen.zenscript.codemodel.partial.PartialPackageExpression;
17
 import org.openzen.zenscript.codemodel.type.GenericName;
18
 import org.openzen.zenscript.codemodel.type.GenericName;
18
 import org.openzen.zenscript.codemodel.type.GlobalTypeRegistry;
19
 import org.openzen.zenscript.codemodel.type.GlobalTypeRegistry;
19
 import org.openzen.zenscript.codemodel.type.ITypeID;
20
 import org.openzen.zenscript.codemodel.type.ITypeID;
20
-import org.openzen.zenscript.shared.CodePosition;
21
 import org.openzen.zenscript.codemodel.scope.TypeScope;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.ArrayTypeID;
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 View File

6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
 import java.util.Arrays;
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
 import org.openzen.zenscript.codemodel.FunctionHeader;
12
 import org.openzen.zenscript.codemodel.FunctionHeader;
10
 import org.openzen.zenscript.codemodel.scope.TypeScope;
13
 import org.openzen.zenscript.codemodel.scope.TypeScope;
11
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.FunctionHeader;
9
 import org.openzen.zenscript.codemodel.FunctionHeader;
9
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
10
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
10
 import org.openzen.zenscript.codemodel.scope.TypeScope;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.FunctionHeader;
9
 import org.openzen.zenscript.codemodel.FunctionHeader;
9
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
10
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
10
 import org.openzen.zenscript.codemodel.scope.TypeScope;
11
 import org.openzen.zenscript.codemodel.scope.TypeScope;
11
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.FunctionHeader;
9
 import org.openzen.zenscript.codemodel.FunctionHeader;
9
 import org.openzen.zenscript.codemodel.scope.TypeScope;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.statement.VarStatement;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.FunctionParameter;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.member.ref.CasterMemberRef;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
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
  * Converts a value from X? to X. Throws a NullPointerException if the value is null.
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
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 View File

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

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.member.EnumConstantMember;
9
 import org.openzen.zenscript.codemodel.member.EnumConstantMember;
9
 import org.openzen.zenscript.codemodel.member.ref.ConstMemberRef;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
9
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
9
 import org.openzen.zenscript.codemodel.scope.TypeScope;
10
 import org.openzen.zenscript.codemodel.scope.TypeScope;
10
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
11
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
11
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
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
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
9
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
10
 import org.openzen.zenscript.codemodel.scope.TypeScope;
10
 import org.openzen.zenscript.codemodel.scope.TypeScope;
11
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
11
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
12
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.definition.EnumDefinition;
9
 import org.openzen.zenscript.codemodel.definition.EnumDefinition;
9
 import org.openzen.zenscript.codemodel.member.EnumConstantMember;
10
 import org.openzen.zenscript.codemodel.member.EnumConstantMember;
10
 import org.openzen.zenscript.codemodel.type.GlobalTypeRegistry;
11
 import org.openzen.zenscript.codemodel.type.GlobalTypeRegistry;
11
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

9
 import java.util.List;
9
 import java.util.List;
10
 import java.util.function.Consumer;
10
 import java.util.function.Consumer;
11
 import java.util.stream.Collectors;
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
 import org.openzen.zenscript.codemodel.FunctionHeader;
15
 import org.openzen.zenscript.codemodel.FunctionHeader;
13
 import org.openzen.zenscript.codemodel.OperatorType;
16
 import org.openzen.zenscript.codemodel.OperatorType;
14
 import org.openzen.zenscript.codemodel.member.EnumConstantMember;
17
 import org.openzen.zenscript.codemodel.member.EnumConstantMember;
16
 import org.openzen.zenscript.codemodel.type.GenericName;
19
 import org.openzen.zenscript.codemodel.type.GenericName;
17
 import org.openzen.zenscript.codemodel.type.ITypeID;
20
 import org.openzen.zenscript.codemodel.type.ITypeID;
18
 import org.openzen.zenscript.codemodel.type.member.TypeMembers;
21
 import org.openzen.zenscript.codemodel.type.member.TypeMembers;
19
-import org.openzen.zenscript.shared.CodePosition;
20
 import org.openzen.zenscript.codemodel.scope.TypeScope;
22
 import org.openzen.zenscript.codemodel.scope.TypeScope;
21
 import org.openzen.zenscript.codemodel.statement.Statement;
23
 import org.openzen.zenscript.codemodel.statement.Statement;
22
 import org.openzen.zenscript.codemodel.statement.StatementTransformer;
24
 import org.openzen.zenscript.codemodel.statement.StatementTransformer;
23
 import org.openzen.zenscript.codemodel.type.FunctionTypeID;
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 View File

7
 
7
 
8
 import java.util.ArrayList;
8
 import java.util.ArrayList;
9
 import java.util.List;
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
 import org.openzen.zenscript.codemodel.OperatorType;
13
 import org.openzen.zenscript.codemodel.OperatorType;
11
-import org.openzen.zenscript.codemodel.member.ConstructorMember;
12
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
14
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
13
 import org.openzen.zenscript.codemodel.scope.ExpressionScope;
15
 import org.openzen.zenscript.codemodel.scope.ExpressionScope;
14
 import org.openzen.zenscript.codemodel.type.GenericName;
16
 import org.openzen.zenscript.codemodel.type.GenericName;
15
 import org.openzen.zenscript.codemodel.type.ITypeID;
17
 import org.openzen.zenscript.codemodel.type.ITypeID;
16
 import org.openzen.zenscript.codemodel.type.member.DefinitionMemberGroup;
18
 import org.openzen.zenscript.codemodel.type.member.DefinitionMemberGroup;
17
 import org.openzen.zenscript.codemodel.type.member.TypeMembers;
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
 	}
33
 	}
35
 	
34
 	
36
 	public Expression constructNew(String typename, Expression... arguments) {
35
 	public Expression constructNew(String typename, Expression... arguments) {
37
-		List<String> nameParts = StringUtils.split(typename, '.');
36
+		String[] nameParts = Strings.split(typename, '.');
38
 		List<GenericName> name = new ArrayList<>();
37
 		List<GenericName> name = new ArrayList<>();
39
 		for (String namePart : nameParts)
38
 		for (String namePart : nameParts)
40
 			name.add(new GenericName(namePart));
39
 			name.add(new GenericName(namePart));

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

8
 import java.util.HashMap;
8
 import java.util.HashMap;
9
 import java.util.Map;
9
 import java.util.Map;
10
 import java.util.function.Consumer;
10
 import java.util.function.Consumer;
11
+import org.openzen.zencode.shared.CodePosition;
12
+import org.openzen.zencode.shared.ConcatMap;
11
 import org.openzen.zenscript.codemodel.FunctionHeader;
13
 import org.openzen.zenscript.codemodel.FunctionHeader;
12
 import org.openzen.zenscript.codemodel.FunctionParameter;
14
 import org.openzen.zenscript.codemodel.FunctionParameter;
13
 import org.openzen.zenscript.codemodel.statement.ExpressionStatement;
15
 import org.openzen.zenscript.codemodel.statement.ExpressionStatement;
16
+import org.openzen.zenscript.codemodel.statement.LoopStatement;
14
 import org.openzen.zenscript.codemodel.statement.ReturnStatement;
17
 import org.openzen.zenscript.codemodel.statement.ReturnStatement;
15
 import org.openzen.zenscript.codemodel.statement.Statement;
18
 import org.openzen.zenscript.codemodel.statement.Statement;
16
 import org.openzen.zenscript.codemodel.type.FunctionTypeID;
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
 
46
 
46
 	@Override
47
 	@Override
47
 	public FunctionExpression transform(ExpressionTransformer transformer) {
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
 		return tBody == body ? this : new FunctionExpression(position, (FunctionTypeID)type, closure, tBody);
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 View File

7
 
7
 
8
 import java.util.Collections;
8
 import java.util.Collections;
9
 import java.util.List;
9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
10
 import org.openzen.zenscript.codemodel.member.ref.FieldMemberRef;
11
 import org.openzen.zenscript.codemodel.member.ref.FieldMemberRef;
11
 import org.openzen.zenscript.codemodel.scope.TypeScope;
12
 import org.openzen.zenscript.codemodel.scope.TypeScope;
12
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.FunctionParameter;
9
 import org.openzen.zenscript.codemodel.FunctionParameter;
9
-import org.openzen.zenscript.shared.CodePosition;
10
 import org.openzen.zenscript.codemodel.scope.TypeScope;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.statement.VarStatement;
9
 import org.openzen.zenscript.codemodel.statement.VarStatement;
9
-import org.openzen.zenscript.shared.CodePosition;
10
 import org.openzen.zenscript.codemodel.scope.TypeScope;
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 View File

7
 
7
 
8
 import java.util.Collections;
8
 import java.util.Collections;
9
 import java.util.List;
9
 import java.util.List;
10
+import org.openzen.zencode.shared.CodePosition;
10
 import org.openzen.zenscript.codemodel.member.ref.FieldMemberRef;
11
 import org.openzen.zenscript.codemodel.member.ref.FieldMemberRef;
11
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.member.ref.GetterMemberRef;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
 import java.util.ArrayList;
8
 import java.util.ArrayList;
9
-import java.util.Arrays;
10
 import java.util.Collections;
9
 import java.util.Collections;
11
 import java.util.List;
10
 import java.util.List;
11
+import org.openzen.zencode.shared.CodePosition;
12
 import org.openzen.zenscript.codemodel.expression.switchvalue.SwitchValue;
12
 import org.openzen.zenscript.codemodel.expression.switchvalue.SwitchValue;
13
 import org.openzen.zenscript.codemodel.statement.BreakStatement;
13
 import org.openzen.zenscript.codemodel.statement.BreakStatement;
14
 import org.openzen.zenscript.codemodel.statement.ExpressionStatement;
14
 import org.openzen.zenscript.codemodel.statement.ExpressionStatement;
18
 import org.openzen.zenscript.codemodel.statement.VarStatement;
18
 import org.openzen.zenscript.codemodel.statement.VarStatement;
19
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
19
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
20
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.FunctionHeader;
9
 import org.openzen.zenscript.codemodel.FunctionHeader;
9
-import org.openzen.zenscript.codemodel.member.ConstructorMember;
10
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
10
 import org.openzen.zenscript.codemodel.member.ref.FunctionalMemberRef;
11
 import org.openzen.zenscript.codemodel.scope.TypeScope;
11
 import org.openzen.zenscript.codemodel.scope.TypeScope;
12
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
9
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

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

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

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.GlobalTypeRegistry;
9
 import org.openzen.zenscript.codemodel.type.GlobalTypeRegistry;
9
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.BasicTypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.member.ref.FieldMemberRef;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.FunctionParameter;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.statement.VarStatement;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.member.ref.FieldMemberRef;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.member.ref.SetterMemberRef;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.member.ref.GetterMemberRef;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.member.ref.SetterMemberRef;
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 View File

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

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

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.partial.IPartialExpression;
9
 import org.openzen.zenscript.codemodel.partial.IPartialExpression;
9
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
 import java.util.List;
8
 import java.util.List;
9
+import org.openzen.zencode.shared.CodePosition;
9
 import org.openzen.zenscript.codemodel.member.ref.VariantOptionRef;
10
 import org.openzen.zenscript.codemodel.member.ref.VariantOptionRef;
10
 import org.openzen.zenscript.codemodel.scope.TypeScope;
11
 import org.openzen.zenscript.codemodel.scope.TypeScope;
11
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.expression;
6
 package org.openzen.zenscript.codemodel.expression;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.type.ITypeID;
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 View File

5
  */
5
  */
6
 package org.openzen.zenscript.codemodel.generic;
6
 package org.openzen.zenscript.codemodel.generic;
7
 
7
 
8
+import org.openzen.zencode.shared.CodePosition;
8
 import org.openzen.zenscript.codemodel.GenericMapper;
9
 import org.openzen.zenscript.codemodel.GenericMapper;
9
 import org.openzen.zenscript.codemodel.type.member.TypeMembers;
10
 import org.openzen.zenscript.codemodel.type.member.TypeMembers;
10
 import org.openzen.zenscript.codemodel.type.ITypeID;
11
 import org.openzen.zenscript.codemodel.type.ITypeID;
11
 import org.openzen.zenscript.codemodel.type.member.LocalMemberCache;
12
 import org.openzen.zenscript.codemodel.type.member.LocalMemberCache;
12
 import org.openzen.zenscript.codemodel.type.member.TypeMemberPriority;
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 View File

8
 import java.util.ArrayList;
8
 import java.util.ArrayList;
9
 import java.util.List;
9
 import java.util.List;
10
 import java.util.Map;
10
 import java.util.Map;
11
+import org.openzen.zencode.shared.CodePosition;
11
 import org.openzen.zenscript.codemodel.type.GlobalTypeRegistry;
12
 import org.openzen.zenscript.codemodel.type.GlobalTypeRegistry;
12
 import org.openzen.zenscript.codemodel.type.ITypeID;
13
 import org.openzen.zenscript.codemodel.type.ITypeID;
13
 import org.openzen.zenscript.codemodel.type.member.LocalMemberCache;
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 View File

16
 	
16
 	
17
 	T visitArrayKeyValueIterator();
17
 	T visitArrayKeyValueIterator();
18
 	
18
 	
19
+	T visitAssocKeyIterator();
20
+	
21
+	T visitAssocKeyValueIterator();
22
+	
19
 	T visitStringCharacterIterator();
23
 	T visitStringCharacterIterator();
20
 	
24
 	
21
 	T visitCustomIterator();
25
 	T visitCustomIterator();

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


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save