formatting change

This commit is contained in:
ChUrl
2020-12-14 18:17:48 +01:00
parent de88d650d3
commit ce92dcad6e
6 changed files with 5 additions and 11 deletions

View File

@ -64,9 +64,7 @@ public final class StupsCompiler {
StupsParser stupsParser = StupsParser.fromGrammar(grammar);
AST tree = stupsParser.parse(lexer.getAllTokens(), lexer.getVocabulary());
tree.postprocess(grammar);
TypeChecker.validate(tree);
System.out.println("Compilation completed.");

View File

@ -6,12 +6,8 @@ import static util.Logger.log;
public class ParseException extends RuntimeException {
public ParseException(String message) {
super(message);
}
public ParseException(String message, AST ast) {
super(message);
super("\n" + message);
log("\nAST at last state:\n" + ast);
}

View File

@ -3,6 +3,6 @@ package typechecker;
public class AssignmentTypeMismatchException extends RuntimeException {
public AssignmentTypeMismatchException(String message) {
super(message);
super("\n" + message);
}
}

View File

@ -3,6 +3,6 @@ package typechecker;
public class OperatorTypeMismatchException extends RuntimeException {
public OperatorTypeMismatchException(String message) {
super(message);
super("\n" + message);
}
}

View File

@ -3,6 +3,6 @@ package typechecker;
public class OperatorUsageException extends RuntimeException {
public OperatorUsageException(String message) {
super(message);
super("\n" + message);
}
}

View File

@ -3,6 +3,6 @@ package typechecker;
public class SymbolAlreadyDefinedException extends RuntimeException {
public SymbolAlreadyDefinedException(String message) {
super(message);
super("\n" + message);
}
}