Class AsmGenerator
Inheritance
Namespace: XSharp
Assembly: XSharp.dll
Syntax
public class AsmGenerator : object
Fields
| Improve this Doc View SourceEmitSourceCode
Declaration
public bool EmitSourceCode
Field Value
Type | Description |
---|---|
System.Boolean |
EmitUserComments
Should we keep the user comments in the generated target assembly program ?
Declaration
public bool EmitUserComments
Field Value
Type | Description |
---|---|
System.Boolean |
mLineNo
Declaration
protected int mLineNo
Field Value
Type | Description |
---|---|
System.Int32 |
mPathname
Declaration
protected string mPathname
Field Value
Type | Description |
---|---|
System.String |
mPatterns
Declaration
protected TokenPatterns mPatterns
Field Value
Type | Description |
---|---|
TokenPatterns |
Methods
| Improve this Doc View SourceGenerate(String)
Parse the input X# source code file and generate the matching target assembly language.
Declaration
public Assembler Generate(string aSrcPathname)
Parameters
Type | Name | Description |
---|---|---|
System.String | aSrcPathname | X# source code file. |
Returns
Type | Description |
---|---|
Assembler | The resulting target assembler content. The returned object contains a code and a data block. |
Generate(TextReader)
Parse the input X# source code file and generate the matching target assembly language.
Declaration
public Assembler Generate(TextReader aReader)
Parameters
Type | Name | Description |
---|---|---|
TextReader | aReader | X# source code reader. |
Returns
Type | Description |
---|---|
Assembler | The resulting target assembler content. The returned object contains a code and a data block. |
Generate(TextReader, TextWriter)
Parse the input X# source code from the given reader and write both target assembler code and target assembler data in their respective writers.
Declaration
public void Generate(TextReader aIn, TextWriter aOut)
Parameters
Type | Name | Description |
---|---|---|
TextReader | aIn | A reader to acquire X# source code from. |
TextWriter | aOut | A writer that will receive target assembler data. |
GenerateToFile(String, TextReader, TextWriter)
Declaration
public void GenerateToFile(string aFileName, TextReader aSourceReader, TextWriter aDestinationWriter)
Parameters
Type | Name | Description |
---|---|---|
System.String | aFileName | |
TextReader | aSourceReader | |
TextWriter | aDestinationWriter |
GenerateToFiles(String)
Parse the input X# source code file and generate two new files with target assembly language. The two generated files contain target assembler source and target assembler data respectively.
Declaration
public void GenerateToFiles(string aSrcPathname)
Parameters
Type | Name | Description |
---|---|---|
System.String | aSrcPathname | X# source code file. |
ProcessLine(String, Int32)
Process a single X# source code line and translate it into the target assembler syntax.
Declaration
protected void ProcessLine(string aLine, int aLineNo)
Parameters
Type | Name | Description |
---|---|---|
System.String | aLine | The processed X# source code line. |
System.Int32 | aLineNo | Line number for debugging and diagnostic messages. |