aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/shedlang/compiler/cli
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/shedlang/compiler/cli')
-rw-r--r--src/main/java/org/shedlang/compiler/cli/ShedCli.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/shedlang/compiler/cli/ShedCli.java b/src/main/java/org/shedlang/compiler/cli/ShedCli.java
index 95dfcd95..29f27161 100644
--- a/src/main/java/org/shedlang/compiler/cli/ShedCli.java
+++ b/src/main/java/org/shedlang/compiler/cli/ShedCli.java
@@ -6,6 +6,7 @@ import net.sourceforge.argparse4j.inf.Namespace;
import org.shedlang.compiler.ShedCompiler;
import org.shedlang.compiler.backends.Backends;
import org.shedlang.compiler.backends.GenerateInstructionsBackend;
+import org.shedlang.compiler.backends.PatioBackend;
import org.shedlang.compiler.errors.SourceError;
import java.io.IOException;
@@ -35,6 +36,9 @@ public class ShedCli {
case GENERATE_INSTRUCTIONS -> {
compiler.compile(sourcePath, new GenerateInstructionsBackend());
}
+ case PATIO -> {
+ compiler.compile(sourcePath, new PatioBackend());
+ }
}
}
@@ -53,6 +57,10 @@ public class ShedCli {
generateInstructionsSubParser.setDefault("command", Command.GENERATE_INSTRUCTIONS);
generateInstructionsSubParser.addArgument("source").required(true);
+ var patioSubParser = subparsers.addParser("patio");
+ patioSubParser.setDefault("command", Command.PATIO);
+ patioSubParser.addArgument("source").required(true);
+
try {
return parser.parseArgs(args);
} catch (ArgumentParserException e) {
@@ -65,5 +73,6 @@ public class ShedCli {
private enum Command {
COMPILE,
GENERATE_INSTRUCTIONS,
+ PATIO,
}
}