Skip to content
Snippets Groups Projects
Commit e0e975cc authored by Johannes Mey's avatar Johannes Mey
Browse files

show message when unsupported options were used

parent ffd1205c
No related branches found
No related tags found
No related merge requests found
......@@ -17,8 +17,6 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class Compiler {
......@@ -47,7 +45,7 @@ public class Compiler {
addOptions();
commandLine = new ArgumentParser();
commandLine.addOptions(options);
commandLine.parseArgs(args, System.err);
boolean unknownOptions = !commandLine.parseArgs(args, System.err);
Path inputPath;
if (optionInputDir.isMatched()) {
......@@ -79,10 +77,8 @@ public class Compiler {
printMessage("Running RelAST Preprocessor");
// TODO treat unknown options appropriately
List<String> otherArgs = Collections.emptyList();
if (!otherArgs.isEmpty()) {
printMessage("Unsupported arguments will be ignored: " + otherArgs);
if (unknownOptions) {
printMessage("Some options were unsupported!");
}
Program program = parseProgram(inputPath);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment