LangDescriptor class
A plain, isolate-sendable description of a CodeLanguage and the grammars it embeds.
Every field is a String, List<String>, List<GrammarCategory> (enums are
sendable), or List<LangDescriptor>: no closures, so an instance copies
cleanly across an isolate boundary.
Constructors
-
LangDescriptor({required String id, required String scopeName, required String displayName, required String json, List<
String> aliases = const [], List<GrammarCategory> categories = const [], List<LangDescriptor> embedded = const []}) -
Creates a LangDescriptor;
id,scopeName,displayName, andjsonare required, mirroring the required fields of CodeLanguage.const
Properties
-
aliases
→ List<
String> -
Alternative names that resolve to this language (e.g.
js->javascript).final -
categories
→ List<
GrammarCategory> -
The grammar's classification (from
tm-grammars, e.g.web,scripting). May be empty: not every grammar declares a category.final - displayName → String
-
A human-readable name for the language, e.g. for use as a label in a
language picker.
final
-
embedded
→ List<
LangDescriptor> -
The flattened grammars this language embeds, already expanded by
flattenBundledLanguage(in place of CodeLanguage's lazy thunk, which can't cross an isolate boundary).final - hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The language id (e.g.
dart,javascript).final - json → String
-
The raw
.tmLanguage.jsongrammar as a JSON string, parsed on load.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scopeName → String
-
The grammar's TextMate scope name (e.g.
source.dart).final
Methods
-
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