diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-07-20 16:35:39 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-07-20 16:35:39 +0100 |
| commit | f522f1d19f71a8554bc1b7ef660c421f180cfbb7 (patch) | |
| tree | a594d3042c1db0f64637aac14af13322fe5ac7bb /src/main/java/org/shedlang/compiler/cli | |
| parent | 8fb3252df007fb74fcd695908f285915b4facda2 (diff) | |
Add Patio backend
Diffstat (limited to 'src/main/java/org/shedlang/compiler/cli')
| -rw-r--r-- | src/main/java/org/shedlang/compiler/cli/ShedCli.java | 9 |
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, } } |
