Class SyntaxReader
Reads tokens from a string and transforms them into corresponding SyntaxNode instances
Inheritance
System.Object
SyntaxReader
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: CilTools.Syntax.Tokens
Assembly: CilTools.BytecodeAnalysis.dll
Syntax
public static class SyntaxReader
Methods
ReadAllNodes(String)
Reads all CIL assembler tokens from the specified string
Declaration
public static SyntaxNode[] ReadAllNodes(string src)
Parameters
Type | Name | Description |
---|---|---|
System.String | src | Input string |
Returns
Type | Description |
---|---|
SyntaxNode[] | Array of syntax nodes that contain tokens |
ReadAllNodes(String, IEnumerable<SyntaxTokenDefinition>, SyntaxFactory)
Reads all tokens from the specified string using the specified collection of token definitions and syntax factory
Declaration
public static SyntaxNode[] ReadAllNodes(string src, IEnumerable<SyntaxTokenDefinition> tokenDefinitions, SyntaxFactory factory)
Parameters
Type | Name | Description |
---|---|---|
System.String | src | Input string |
System.Collections.Generic.IEnumerable<SyntaxTokenDefinition> | tokenDefinitions | Collection of token definitions that will be used to split the input string into a sequence of tokens |
SyntaxFactory | factory | Syntax factory object that will be used to create new SyntaxNode instances |
Returns
Type | Description |
---|---|
SyntaxNode[] | Array of syntax nodes that contain tokens |