private static void Main() { var instance = new MobLang.Program(); instance.Writer += Console.WriteLine; instance.AddStd(); instance.AddImpure(); while (true) { Console.Write(@"> "); var builder = new StringBuilder(); string line; do { line = Console.ReadLine(); builder.Append(line); } while (line != ""); var input = builder.ToString(); instance.Execute(input, true); } }
public SimpleStatements() { _sb = new StringBuilder(); _program = new MobLang.Program(); _program.AddStd(); _program.AddImpure(); _program.Writer += str => _sb.Append(str); }
public OutputlessTests() { _program = new MobLang.Program(); _program.AddStd(); _program.AddImpure(); _program.UnsafeExecute("def undefined : undefined as undefined"); _program.UnsafeExecute("def assert x as if not x then undefined"); _program.UnsafeExecute("def assert_eq x y as assert (x == y)"); }
public ExceptionsTest() { _program = new MobLang.Program(); _program.AddStd(); _program.AddImpure(); }