- Refactored code into different packages

- Fixed some non-static expansion methods
- Fixed scripts not reloading properly
- Implemented mod support build system
- Fixed recipe removal breaking on recipes without predefined output
- Fixed NPE on parsing a bracket expression that doesn't exist - now prints an appropriate error
This commit is contained in:
Stan Hebben committed 2014-06-21 18:51:11 +02:00
1 parent 1789aa74b5
commit 2de467d7d8
93 files changed
+321 -262

No files matched your search

@@ -24,6 +24,7 @@ import stanhebben.zenscript.parser.ParseException;
import stanhebben.zenscript.parser.Token;
import stanhebben.zenscript.expression.partial.IPartialExpression;
import stanhebben.zenscript.statements.Statement;
import stanhebben.zenscript.symbols.IZenSymbol;
import stanhebben.zenscript.type.ZenType;
import stanhebben.zenscript.type.ZenTypeAny;
import stanhebben.zenscript.type.ZenTypeDouble;
@@ -365,9 +366,25 @@ public abstract class ParsedExpression {
tokens.add(next);
next = parser.next();
}
return new ParsedExpressionValue(
start.getPosition(),
parser.getEnvironment().getBracketed(tokens).instance(start.getPosition()));
IZenSymbol resolved = parser.getEnvironment().getBracketed(tokens);
if (resolved == null) {
StringBuilder builder = new StringBuilder();
builder.append('<');
Token last = null;
for (Token token : tokens) {
if (last != null) builder.append(' ');
builder.append(token.getValue());
last = token;
}
builder.append('>');
parser.getEnvironment().getErrorLogger().error(start.getPosition(), "Could not resolve " + builder.toString());
return new ParsedExpressionInvalid(start.getPosition());
} else {
return new ParsedExpressionValue(
start.getPosition(),
parser.getEnvironment().getBracketed(tokens).instance(start.getPosition()));
}
}
case T_SQBROPEN: {
parser.next();
@@ -26,7 +26,6 @@ public class MethodOutput {
private final LocalVariablesSorter visitor;
public MethodOutput(ClassVisitor cls, int access, String name, String descriptor, String signature, String[] exceptions) {
System.out.println("Method output: " + name + descriptor);
MethodVisitor methodVisitor = cls.visitMethod(access, name, descriptor, signature, exceptions);
visitor = new LocalVariablesSorter(access, descriptor, methodVisitor);
}