A simple version of Compiler that takes a single input and produces a StringBuilder. Pre-opens LeMP.Prelude namespaces.
More...
Source file:
A simple version of Compiler that takes a single input and produces a StringBuilder. Pre-opens LeMP.Prelude namespaces.
|
|
| TestCompiler (IMessageSink sink, ICharSource text, params string[] preOpenedNamespaces) |
| |
|
| Compiler (IMessageSink sink, Type prelude=null, bool registerEcsAndLes=true) |
| |
|
| Compiler (IMessageSink sink, Type prelude, IEnumerable< InputOutput > sourceFiles) |
| |
| BMultiMap< string, string > | ProcessArguments (IList< string > args, bool warnAboutUnknownOptions, bool autoOpenInputFiles, IList< string > inputFiles=null) |
| | Processes command-line arguments to build a BMultiMap and sends those options to the other overload of this method. More...
|
| |
| bool | ProcessArguments (BMultiMap< string, string > options, bool warnAboutUnknownOptions, IList< string > inputFiles=null) |
| | Processes all standard command-line arguments from KnownOptions, except –help. More...
|
| |
| void | AddStdMacros () |
| | Adds standard macros from LeMP.StdMacros.dll, and adds the namespaces LeMP and LeMP.Prelude to the pre-opened namespace list. More...
|
| |
| void | CompleteInputOutputOptions () |
| | Fills in all fields of Files that are still null, based on the command-line options. Calling this is optional, since Run() calls it anyway. More...
|
| |
|
void | CompleteInputOutputOptions (InputOutput file) |
| |
|
int | AddMacros (Assembly assembly) |
| |
| void | Run () |
| | Calls CompleteInputOutputOptions, runs the MacroProcessor on all input Files, and writes the output to the output files by calling the protected method WriteOutput. More...
|
| |
|
|
static void | Test (string input, string output, IMessageSink sink, int maxExpand=0xFFFF, params string[] preOpenedNamespaces) |
| |
| static string | StripExtraWhitespace (string a, string[] commentPrefixes=null) |
| | Strips whitespace and single-line comments from a string. Helps test whether two blocks of code are "sufficiently equal". More...
|
| |
|
static void | Main (string[] args) |
| |
|
static void | WarnAboutUnknownOptions (BMultiMap< string, string > options, IMessageSink sink, IDictionary< string, Pair< string, string >> knownOptions) |
| |
|
static bool | MaybeShowHelp (ICollection< KeyValuePair< string, string >> options, ICollection< KeyValuePair< string, Pair< string, string >>> knownOptions, TextWriter @out=null) |
| |
|
static void | ShowHelp (IEnumerable< KeyValuePair< string, Pair< string, string >>> knownOptions, TextWriter @out=null, bool includeUsageLine=true) |
| |
| static List< InputOutput > | OpenSourceFiles (IMessageSink sink, IEnumerable< string > fileNames) |
| | Opens a set of source files by file name, and creates an InputOutput object for each. More...
|
| |
|
| override void | WriteOutput (InputOutput io) |
| | Writes results from InputOutput.Output to InputOutput.OutFileName using InputOutput.OutPrinter according to InputOutput.OutOptions. More...
|
| |
|
|
static InvertibleSet< string > | TwoArgOptions = new InvertibleSet<string>(new[] { "macros" }) |
| |
| static Dictionary< char, string > | ShortOptions |
| |
static MMap< string, Pair
< string, string > > | KnownOptions |
| |
|
IMessageSink | Sink [get, set] |
| |
|
int | MaxExpansions [get, set] |
| |
|
TimeSpan | AbortTimeout [get, set] |
| |
|
bool | Verbose [get] |
| |
| static string LeMP.TestCompiler.StripExtraWhitespace |
( |
string |
a, |
|
|
string[] |
commentPrefixes = null |
|
) |
| |
|
inlinestatic |
Strips whitespace and single-line comments from a string. Helps test whether two blocks of code are "sufficiently equal".
Writes results from InputOutput.Output to InputOutput.OutFileName using InputOutput.OutPrinter according to InputOutput.OutOptions.
In case of –eval inputs, output is sent to the Console. Status, warning and error messages are sent to Sink.
Reimplemented from LeMP.Compiler.