memberGet method
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}) {
if (varName == interpreter.lexicon.idBind) {
return (HTEntity entity,
{List<dynamic> positionalArgs = const [],
Map<String, dynamic> namedArgs = const {},
List<HTType> typeArgs = const []}) =>
bind(positionalArgs.first);
} else if (varName == interpreter.lexicon.idApply) {
return (HTEntity entity,
{List<dynamic> positionalArgs = const [],
Map<String, dynamic> namedArgs = const {},
List<HTType> typeArgs = const []}) =>
apply(positionalArgs.first,
positionalArgs: positionalArgs,
namedArgs: namedArgs,
typeArgs: typeArgs);
} else {
throw HTError.undefined(varName);
}
}