memberGet method

  1. @override
dynamic memberGet(
  1. String varName, {
  2. String? from,
})
override

Fetch a member by the varName, in the form of

object.varName

varName must be of String type.

Implementation

@override
dynamic memberGet(String varName, {String? from}) {
  switch (varName) {
    case 'float.nan':
      return double.nan;
    case 'float.infinity':
      return double.infinity;
    case 'float.negativeInfinity':
      return double.negativeInfinity;
    case 'float.minPositive':
      return double.minPositive;
    case 'float.maxFinite':
      return double.maxFinite;
    case 'float.parse':
      return (HTEntity entity,
              {List<dynamic> positionalArgs = const [],
              Map<String, dynamic> namedArgs = const {},
              List<HTType> typeArgs = const []}) =>
          double.tryParse(positionalArgs[0]);
    default:
      throw HTError.undefined(varName);
  }
}