blob: a3d85fea28046737d131f0fc38afc7e76b04ddda (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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<string> lines = Program.Compile(options, new AntlrInputStream(input));
return Program.Optimize(lines);
}
}
|