parseFloatOperand function

dynamic parseFloatOperand(
  1. dynamic parser
)

Implementation

parseFloatOperand(parser) {
  var s = '';
  var eof = 15;
  var lookup = [
    '0',
    '1',
    '2',
    '3',
    '4',
    '5',
    '6',
    '7',
    '8',
    '9',
    '.',
    'E',
    'E-',
    null,
    '-'
  ];
  while (true) {
    var b = parser.parseByte();
    var n1 = b >> 4;
    var n2 = b & 15;

    if (n1 == eof) {
      break;
    }

    s += lookup[n1]!;

    if (n2 == eof) {
      break;
    }

    s += lookup[n2]!;
  }

  print(" cff.dart  parseFloatOperand s: ${s} todo debug ");

  return double.parse(s);
}