public MacroProcessor(Type prelude, IMessageSink sink) { _sink = sink; AddMacros(prelude ?? typeof(BuiltinMacros)); AbortTimeout = TimeSpan.FromSeconds(30); PreOpenedNamespaces.Add((Symbol)"LeMP.Prelude"); }
/// <summary>Initializes MacroProcessor.</summary> /// <param name="sink">The destination for warning and error messages. NOTE: /// this class can process files in parallel. Consider using a thread-safe /// implementation of <see cref="IMessageSink"/>.</param> /// <param name="prelude">An initial type from which to add macros. /// Omit this parameter to use typeof(LeMP.Prelude.BuiltinMacros).</param> public MacroProcessor(IMessageSink sink, Type prelude) { _sink = sink; if (prelude != null) { AddMacros(prelude); } AbortTimeout = TimeSpan.FromSeconds(30); PreOpenedNamespaces.Add((Symbol)"LeMP.Prelude"); }