Class SourceParser
Provides static methods that convert source text into syntax nodes
Inheritance
System.Object
SourceParser
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.SourceCode.Common
Assembly: CilTools.SourceCode.dll
Syntax
public static class SourceParser
Methods
Parse(String, String)
Converts the specified source text into a collection of parsed syntax nodes, using the language specified by source file extension.
Declaration
public static SyntaxNodeCollection Parse(string sourceText, string ext)
Parameters
Type | Name | Description |
---|---|---|
System.String | sourceText | Source text to parse |
System.String | ext | Source file extension with a leading dot (for example, |
Returns
Type | Description |
---|---|
SyntaxNodeCollection |
RegisterSyntaxFactory(String, SyntaxFactory)
Registers a syntax factory for the specified source file extension. Extension should be with a leading dot and in all lowercase letters.
Declaration
public static void RegisterSyntaxFactory(string ext, SyntaxFactory factory)
Parameters
Type | Name | Description |
---|---|---|
System.String | ext | |
SyntaxFactory | factory |