diff --git a/prometeu-compiler/prometeu-build-pipeline/src/main/java/p/studio/compiler/Compile.java b/prometeu-compiler/prometeu-build-pipeline/src/main/java/p/studio/compiler/Compile.java new file mode 100644 index 00000000..5bec8d2c --- /dev/null +++ b/prometeu-compiler/prometeu-build-pipeline/src/main/java/p/studio/compiler/Compile.java @@ -0,0 +1,13 @@ +package p.studio.compiler; + +import p.studio.compiler.messages.BuilderPipelineConfig; +import p.studio.compiler.workspaces.BuilderPipelineService; +import p.studio.utilities.logs.LogAggregator; + +public class Compile { + public static void main(String[] args) { + final var logAggregator = LogAggregator.stdout(); + final var config = new BuilderPipelineConfig(false, "test-projects/main"); + BuilderPipelineService.INSTANCE.run(config, logAggregator); + } +} diff --git a/test-projects/main/src/main.pbs b/test-projects/main/src/main.pbs index 5337be41..ad8ff950 100644 --- a/test-projects/main/src/main.pbs +++ b/test-projects/main/src/main.pbs @@ -3,8 +3,29 @@ import { Input } from @sdk:input; fn frame() -> void { + let a = 10; + let b = 15; + let total = a + b; + if (Input.pad().a().pressed()) { - Log.debug("Hello World!"); + total += 25; } -} \ No newline at end of file + else if (Input.pad().b().pressed()) + { + total += 5; + } + + if (total == 30) + { + Log.info("30 is the magic number!"); + } + else if (total == 50) + { + Log.error("50 is the magic number!"); + } + else + { + Log.warn("The magic number is neither 30 nor 50!"); + } +}