From 9e8ba6e00dc4a4137a5187dbe5fe5b1394219735 Mon Sep 17 00:00:00 2001 From: Melodi <62381002+Melodi17@users.noreply.github.com> Date: Fri, 5 Sep 2025 10:20:03 +1000 Subject: stuff --- Compiler.Testing/TestingHelpers.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Compiler.Testing/TestingHelpers.cs (limited to 'Compiler.Testing/TestingHelpers.cs') diff --git a/Compiler.Testing/TestingHelpers.cs b/Compiler.Testing/TestingHelpers.cs new file mode 100644 index 0000000..a3d85fe --- /dev/null +++ b/Compiler.Testing/TestingHelpers.cs @@ -0,0 +1,14 @@ +namespace Compiler.Testing; + +using Antlr4.Runtime; +using Q1.Compiler; + +public class TestingHelpers +{ + public static string CompileString(string input) + { + CompilerOptions options = new() { CommentCompilationMode = CommentCompilationMode.None }; + IEnumerable lines = Program.Compile(options, new AntlrInputStream(input)); + return Program.Optimize(lines); + } +} \ No newline at end of file -- cgit v1.3.1