C# Class LeMP.TestCompiler

A simple version of Compiler that takes a single input and produces a StringBuilder. Pre-opens LeMP.Prelude namespace.
Inheritance: Compiler
Show file Open project: qwertie/ecsharp Class Usage Examples

Public Properties

Property Type Description
Output StringBuilder
Results VList

Public Methods

Method Description
StripExtraWhitespace ( string a, string commentPrefixes = null ) : string

Strips whitespace and single-line comments from a string. Helps test whether two blocks of code are "sufficiently equal".

Test ( string input, string output, IMessageSink sink, int maxExpand = 0xFFFF, bool plainCS = true ) : void
TestCompiler ( IMessageSink sink, ICharSource text, string fileName = "" ) : System

Protected Methods

Method Description
WriteOutput ( InputOutput io ) : void

Private Methods

Method Description
MaybeId ( char c ) : bool

Method Details

StripExtraWhitespace() public static method

Strips whitespace and single-line comments from a string. Helps test whether two blocks of code are "sufficiently equal".
public static StripExtraWhitespace ( string a, string commentPrefixes = null ) : string
a string
commentPrefixes string
return string

Test() public static method

public static Test ( string input, string output, IMessageSink sink, int maxExpand = 0xFFFF, bool plainCS = true ) : void
input string
output string
sink IMessageSink
maxExpand int
plainCS bool
return void

TestCompiler() public method

public TestCompiler ( IMessageSink sink, ICharSource text, string fileName = "" ) : System
sink IMessageSink
text ICharSource
fileName string
return System

WriteOutput() protected method

protected WriteOutput ( InputOutput io ) : void
io InputOutput
return void

Property Details

Output public property

public StringBuilder Output
return StringBuilder

Results public property

public VList Results
return VList