Class Language
Represents and abstraction of the language
Inheritance
System.Object
Language
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Azos.CodeAnalysis
Assembly: Azos.dll
Syntax
public abstract class Language
Constructors
Language()
Declaration
protected Language()
Properties
All
Returns all languages registered in the system
Declaration
public static IEnumerable<Language> All { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Language> |
Family
Returns language family categorization
Declaration
public abstract LanguageFamily Family { get; }
Property Value
Type | Description |
---|---|
LanguageFamily |
FileExtensions
Returns file extensions without '.'
Declaration
public abstract IEnumerable<string> FileExtensions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
Methods
MakeLexer(IAnalysisContext, SourceCodeRef, ISourceText, MessageList, Boolean)
Makes lexer capable of this language analysis
Declaration
public abstract ILexer MakeLexer(IAnalysisContext context, SourceCodeRef srcRef, ISourceText source, MessageList messages = null, bool throwErrors = false)
Parameters
Type | Name | Description |
---|---|---|
IAnalysisContext | context | |
SourceCodeRef | srcRef | |
ISourceText | source | |
MessageList | messages | |
System.Boolean | throwErrors |
Returns
Type | Description |
---|---|
ILexer |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()
TryFindLanguageByFileExtension(String)
Tries to find a language by file extension or returns UnspecifiedLanguage
Declaration
public static Language TryFindLanguageByFileExtension(string fileExtension)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileExtension |
Returns
Type | Description |
---|---|
Language |