parse method

  1. @override
Future<void> parse()

Initiates the parsing of the UCD file

Implementation

@override
Future<void> parse() async {
  final parser = UcdParser.parseFile(filename, (row) {
    if (row.error.isNotEmpty) {
      throw UcdException(row.error);
    }

    codePoints.add(
      UnicodeDataItem(
        row.rangeStart,
        row.rangeEnd,
        name: row.getField(1),
        category: row.getField(2),
        canonicalCombiningClass: row.getField(3),
        bidiClass: row.getField(4),
        decomposition: row.getField(5),
        decimalDigitValue: row.getField(6),
        digitValue: row.getField(7),
        numericValue: row.getField(8),
        mirrored: row.getField(9),
        unicode1Name: row.getField(10),
        isoComment: row.getField(11),
        simpleUppercaseMapping: row.getField(12),
        simpleLowercaseMapping: row.getField(13),
        simpleTitlecaseMapping: row.getField(14),
      ),
    );
  });

  await parser.parse();
  sort();
}