using System;
using Upsilon.Binder;
using Upsilon.Evaluator;
namespace Upsilon
{
public class ScriptOptions
{
///
/// Whether to persist comments on functions and variables as data or not. This is generally helpful for tools
/// or IDEs, but not for actual runtime.
///
public bool SaveDataComments { get; set; } = false;
///
/// Whether or not to throw an exception when errors are encountered. Throwing exceptions is useful for general
/// execution, as it will quickly tell you something is wrong, however this will only show the first error in a
/// script, which may not be helpful. IDEs and other tools should use false for this to show all errors in a script.
///
public bool ThrowExceptionOnError { get; set; } = true;
public BoundScope OverrideStaticBoundScope { get; set; } = null;
public EvaluationScope OverrideStaticScope { get; set; } = null;
public ScriptLoader ScriptLoader { get; set; } = new ScriptLoader();
public ModuleHandler ModuleHandler { get; set; } = new ModuleHandler();
public Action PrintResult { get; set; } = Console.WriteLine;
}
}