LanguageDescription class
Language descriptions are used to store metadata about languages and to dynamically load them.
Their main role is finding the appropriate language for a filename or dynamically loading nested parsers.
Properties
-
alias
→ List<
String> -
Alternative names for the mode (lowercased, includes name).
final
-
extensions
→ List<
String> -
File extensions associated with this language.
final
- filename → RegExp?
-
Optional filename pattern that should be associated with this language.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The name of this language.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- support ↔ LanguageSupport?
-
If the language has been loaded, this will hold its value.
getter/setter pair
Methods
-
load(
) → Future< LanguageSupport> - Start loading the language.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
matchFilename(
List< LanguageDescription> descs, String filename) → LanguageDescription? - Look for a language in the given list of descriptions that matches the filename.
-
matchLanguageName(
List< LanguageDescription> descs, String name, [bool fuzzy = true]) → LanguageDescription? - Look for a language whose name or alias matches the given name (case-insensitively).
-
of(
{required String name, List< String> ? alias, List<String> ? extensions, RegExp? filename, Future<LanguageSupport> load()?, LanguageSupport? support}) → LanguageDescription - Create a language description.