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; ...@@ -17,8 +17,6 @@ import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class Compiler { public class Compiler {
...@@ -47,7 +45,7 @@ public class Compiler { ...@@ -47,7 +45,7 @@ public class Compiler {
addOptions(); addOptions();
commandLine = new ArgumentParser(); commandLine = new ArgumentParser();
commandLine.addOptions(options); commandLine.addOptions(options);
commandLine.parseArgs(args, System.err); boolean unknownOptions = !commandLine.parseArgs(args, System.err);
Path inputPath; Path inputPath;
if (optionInputDir.isMatched()) { if (optionInputDir.isMatched()) {
...@@ -79,10 +77,8 @@ public class Compiler { ...@@ -79,10 +77,8 @@ public class Compiler {
printMessage("Running RelAST Preprocessor"); printMessage("Running RelAST Preprocessor");
// TODO treat unknown options appropriately if (unknownOptions) {
List<String> otherArgs = Collections.emptyList(); printMessage("Some options were unsupported!");
if (!otherArgs.isEmpty()) {
printMessage("Unsupported arguments will be ignored: " + otherArgs);
} }
Program program = parseProgram(inputPath); 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