formatting change
This commit is contained in:
@ -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.");
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -3,6 +3,6 @@ package typechecker;
|
||||
public class AssignmentTypeMismatchException extends RuntimeException {
|
||||
|
||||
public AssignmentTypeMismatchException(String message) {
|
||||
super(message);
|
||||
super("\n" + message);
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,6 @@ package typechecker;
|
||||
public class OperatorTypeMismatchException extends RuntimeException {
|
||||
|
||||
public OperatorTypeMismatchException(String message) {
|
||||
super(message);
|
||||
super("\n" + message);
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,6 @@ package typechecker;
|
||||
public class OperatorUsageException extends RuntimeException {
|
||||
|
||||
public OperatorUsageException(String message) {
|
||||
super(message);
|
||||
super("\n" + message);
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,6 @@ package typechecker;
|
||||
public class SymbolAlreadyDefinedException extends RuntimeException {
|
||||
|
||||
public SymbolAlreadyDefinedException(String message) {
|
||||
super(message);
|
||||
super("\n" + message);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user