mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-19 11:49:05 +00:00
- Making preparations for the automatic documentation generator
- Fixed crash opening DartCraft clipboard. - Fixed some GregTech machines - Improved error reporting when not finding functions
This commit is contained in:
1 parent
3283664f4b
commit
7390f94404
12 files changed
+349
-44
No files matched your search
@@ -292,12 +292,17 @@ public class ZenTypeNative extends ZenType {
|
||||
}
|
||||
}
|
||||
if (member2 == null) {
|
||||
return binary(
|
||||
position,
|
||||
environment,
|
||||
value.eval(environment),
|
||||
new ExpressionString(position, name),
|
||||
OperatorType.MEMBERGETTER);
|
||||
if (hasBinary(STRING, OperatorType.MEMBERGETTER)) {
|
||||
return binary(
|
||||
position,
|
||||
environment,
|
||||
value.eval(environment),
|
||||
new ExpressionString(position, name),
|
||||
OperatorType.MEMBERGETTER);
|
||||
} else {
|
||||
environment.error(position, "No such member in " + getName() + ": " + name);
|
||||
return new ExpressionInvalid(position);
|
||||
}
|
||||
} else {
|
||||
return member2;
|
||||
}
|
||||
@@ -876,6 +881,16 @@ public class ZenTypeNative extends ZenType {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
private boolean hasBinary(ZenType type, OperatorType operator) {
|
||||
for (ZenNativeOperator binaryOperator : binaryOperators) {
|
||||
if (binaryOperator.getOperator() == operator) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void compileAnyUnary(String anySignature, OperatorType operator, IEnvironmentMethod environment) {
|
||||
List<ZenNativeOperator> operators = new ArrayList<ZenNativeOperator>();
|
||||
for (ZenNativeOperator unary : this.unaryOperators) {
|
||||
|
||||
Reference in new issue
Block a user