codegen library

The parts of airglot_l10n that airglot_l10n_gen uses. No Flutter imports.

Classes

IcuArgument
IcuCase
IcuDateArgument
IcuLiteral
IcuNode
IcuParser
Parses the ICU subset that flutter gen-l10n accepts, with the same lexing rules as flutter_tools' message_parser.dart.
IcuPlural
IcuSelect

Constants

airglotDateFormats → const Set<String>
The intl.DateFormat named constructors gen-l10n accepts as a placeholder format or an inline {d, date, ::skeleton}.
airglotNumberFormats → const Set<String>
The intl.NumberFormat named constructors gen-l10n accepts as a placeholder format.
airglotNumberFormatsWithNamedParameters → const Set<String>
The number formats gen-l10n calls with named parameters, so optionalParameters applies to them.

Functions

airglotLocaleKey(String tag) → String
The library's one spelling of a locale: pt_BR, zh_Hant_TW. The pointer writes pt-BR and gen-l10n's ARB files write pt_BR; both map here.
airglotLocaleParents(String key) → Iterable<String>
key and its parents by truncation, nearest first: zh_Hant_TW, zh_Hant, zh.
airglotSourceDigest(List<String> getterTexts) → String
A short hash of the template-locale getter texts, in message order. The generator embeds it; debug builds recompute it from the compiled getters.
airglotSourceHash(String message, Object? declaredPlaceholders) → String
The spec §9.4 source hash of a template message, equal to the service's sourceHash for the same message and @key.placeholders.
canonicalJson(Object? value) → String
Port of the service's canonical-json.ts: keys sorted by UTF-16 code unit, scalars as JavaScript's JSON.stringify writes them.
icuArguments(List<IcuNode> nodes) → Iterable<(String, IcuArgumentUse)>
Every argument reference in nodes, depth first, in source order.

Exceptions / Errors

IcuSyntaxError