|
@@ -143,7 +143,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
143
|
143
|
FunctionHeader addHeader = new FunctionHeader(VOID, new FunctionParameter(baseType, "value"));
|
144
|
144
|
members.addMethod(new MethodMember(CodePosition.BUILTIN, 0, "add", addHeader), TypeMemberPriority.SPECIFIED);
|
145
|
145
|
|
146
|
|
- members.addField(new FieldMember(CodePosition.BUILTIN, Modifiers.MODIFIER_FINAL, "length", INT), TypeMemberPriority.SPECIFIED);
|
|
146
|
+ members.addField(new FieldMember(CodePosition.BUILTIN, Modifiers.FINAL, "length", INT), TypeMemberPriority.SPECIFIED);
|
147
|
147
|
}
|
148
|
148
|
|
149
|
149
|
members.addGetter(new GetterMember(CodePosition.BUILTIN, 0, "empty", BOOL), TypeMemberPriority.SPECIFIED);
|
|
@@ -171,7 +171,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
171
|
171
|
|
172
|
172
|
members.addOperator(new OperatorMember(BUILTIN, 0, OperatorType.CONTAINS, new FunctionHeader(BOOL, new FunctionParameter(keyType, "key"))), TypeMemberPriority.SPECIFIED);
|
173
|
173
|
|
174
|
|
- members.addField(new FieldMember(BUILTIN, Modifiers.MODIFIER_FINAL, "length", INT), TypeMemberPriority.SPECIFIED);
|
|
174
|
+ members.addField(new FieldMember(BUILTIN, Modifiers.FINAL, "length", INT), TypeMemberPriority.SPECIFIED);
|
175
|
175
|
members.addGetter(new GetterMember(BUILTIN, 0, "empty", BOOL), TypeMemberPriority.SPECIFIED);
|
176
|
176
|
members.addGetter(new GetterMember(BUILTIN, 0, "keys", cache.getRegistry().getArray(keyType, 1)), TypeMemberPriority.SPECIFIED);
|
177
|
177
|
return null;
|
|
@@ -211,10 +211,10 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
211
|
211
|
if (constructors.getMethodMembers().isEmpty()) {
|
212
|
212
|
if (definition instanceof ClassDefinition) {
|
213
|
213
|
// add default constructor
|
214
|
|
- constructors.addMethod(new ConstructorMember(BUILTIN, Modifiers.MODIFIER_PUBLIC, new FunctionHeader(VOID)), TypeMemberPriority.SPECIFIED);
|
|
214
|
+ constructors.addMethod(new ConstructorMember(BUILTIN, Modifiers.PUBLIC, new FunctionHeader(VOID)), TypeMemberPriority.SPECIFIED);
|
215
|
215
|
} else if (definition instanceof StructDefinition) {
|
216
|
216
|
// add default struct constructors
|
217
|
|
- constructors.addMethod(new ConstructorMember(BUILTIN, Modifiers.MODIFIER_PUBLIC, new FunctionHeader(VOID)), TypeMemberPriority.SPECIFIED);
|
|
217
|
+ constructors.addMethod(new ConstructorMember(BUILTIN, Modifiers.PUBLIC, new FunctionHeader(VOID)), TypeMemberPriority.SPECIFIED);
|
218
|
218
|
|
219
|
219
|
List<FieldMember> fields = ((StructDefinition)definition).getFields();
|
220
|
220
|
if (!fields.isEmpty()) {
|
|
@@ -227,7 +227,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
227
|
227
|
}
|
228
|
228
|
} else if (definition instanceof EnumDefinition) {
|
229
|
229
|
// add default constructor
|
230
|
|
- constructors.addMethod(new ConstructorMember(BUILTIN, Modifiers.MODIFIER_PRIVATE, new FunctionHeader(VOID)), TypeMemberPriority.SPECIFIED);
|
|
230
|
+ constructors.addMethod(new ConstructorMember(BUILTIN, Modifiers.PRIVATE, new FunctionHeader(VOID)), TypeMemberPriority.SPECIFIED);
|
231
|
231
|
}
|
232
|
232
|
}
|
233
|
233
|
|
|
@@ -254,8 +254,8 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
254
|
254
|
ITypeID fromType = range.from;
|
255
|
255
|
ITypeID toType = range.to;
|
256
|
256
|
|
257
|
|
- members.addField(new FieldMember(BUILTIN, Modifiers.MODIFIER_FINAL, "from", fromType), TypeMemberPriority.SPECIFIED);
|
258
|
|
- members.addField(new FieldMember(BUILTIN, Modifiers.MODIFIER_FINAL, "to", toType), TypeMemberPriority.SPECIFIED);
|
|
257
|
+ members.addField(new FieldMember(BUILTIN, Modifiers.FINAL, "from", fromType), TypeMemberPriority.SPECIFIED);
|
|
258
|
+ members.addField(new FieldMember(BUILTIN, Modifiers.FINAL, "to", toType), TypeMemberPriority.SPECIFIED);
|
259
|
259
|
members.addIterator(new RangeIterator(range), TypeMemberPriority.SPECIFIED);
|
260
|
260
|
return null;
|
261
|
261
|
}
|
|
@@ -395,15 +395,15 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
395
|
395
|
|
396
|
396
|
members.addCaster(new CasterMember(CodePosition.BUILTIN, 0, BasicTypeID.BYTE), TypeMemberPriority.SPECIFIED);
|
397
|
397
|
members.addCaster(new CasterMember(CodePosition.BUILTIN, 0, BasicTypeID.SBYTE), TypeMemberPriority.SPECIFIED);
|
398
|
|
- members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.MODIFIER_IMPLICIT, BasicTypeID.SHORT), TypeMemberPriority.SPECIFIED);
|
399
|
|
- members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.MODIFIER_IMPLICIT, BasicTypeID.USHORT), TypeMemberPriority.SPECIFIED);
|
400
|
|
- members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.MODIFIER_IMPLICIT, BasicTypeID.INT), TypeMemberPriority.SPECIFIED);
|
401
|
|
- members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.MODIFIER_IMPLICIT, BasicTypeID.UINT), TypeMemberPriority.SPECIFIED);
|
402
|
|
- members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.MODIFIER_IMPLICIT, BasicTypeID.LONG), TypeMemberPriority.SPECIFIED);
|
403
|
|
- members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.MODIFIER_IMPLICIT, BasicTypeID.ULONG), TypeMemberPriority.SPECIFIED);
|
404
|
|
- members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.MODIFIER_IMPLICIT, BasicTypeID.FLOAT), TypeMemberPriority.SPECIFIED);
|
405
|
|
- members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.MODIFIER_IMPLICIT, BasicTypeID.DOUBLE), TypeMemberPriority.SPECIFIED);
|
406
|
|
- members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.MODIFIER_IMPLICIT, BasicTypeID.STRING), TypeMemberPriority.SPECIFIED);
|
|
398
|
+ members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.IMPLICIT, BasicTypeID.SHORT), TypeMemberPriority.SPECIFIED);
|
|
399
|
+ members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.IMPLICIT, BasicTypeID.USHORT), TypeMemberPriority.SPECIFIED);
|
|
400
|
+ members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.IMPLICIT, BasicTypeID.INT), TypeMemberPriority.SPECIFIED);
|
|
401
|
+ members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.IMPLICIT, BasicTypeID.UINT), TypeMemberPriority.SPECIFIED);
|
|
402
|
+ members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.IMPLICIT, BasicTypeID.LONG), TypeMemberPriority.SPECIFIED);
|
|
403
|
+ members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.IMPLICIT, BasicTypeID.ULONG), TypeMemberPriority.SPECIFIED);
|
|
404
|
+ members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.IMPLICIT, BasicTypeID.FLOAT), TypeMemberPriority.SPECIFIED);
|
|
405
|
+ members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.IMPLICIT, BasicTypeID.DOUBLE), TypeMemberPriority.SPECIFIED);
|
|
406
|
+ members.addCaster(new CasterMember(CodePosition.BUILTIN, Modifiers.IMPLICIT, BasicTypeID.STRING), TypeMemberPriority.SPECIFIED);
|
407
|
407
|
}
|
408
|
408
|
|
409
|
409
|
private void visitString() {
|