HTFunction constructor

HTFunction(
  1. String file,
  2. String module,
  3. HTInterpreter interpreter, {
  4. required String internalName,
  5. String? id,
  6. String? classId,
  7. String? explicityNamespaceId,
  8. HTDeclarationNamespace? closure,
  9. HTSource? source,
  10. String? documentation,
  11. bool isPrivate = false,
  12. bool isExternal = false,
  13. bool isStatic = false,
  14. bool isConst = false,
  15. bool isTopLevel = false,
  16. bool isField = false,
  17. FunctionCategory category = FunctionCategory.normal,
  18. String? externalTypeId,
  19. List<HTGenericTypeParameter> genericTypeParameters = const [],
  20. bool hasParamDecls = true,
  21. Map<String, HTAbstractParameter> paramDecls = const {},
  22. required HTFunctionType? declType,
  23. bool isAsync = false,
  24. bool isAbstract = false,
  25. bool isVariadic = false,
  26. int minArity = 0,
  27. int maxArity = 0,
  28. Function? externalFunc,
  29. int? ip,
  30. int? line,
  31. int? column,
  32. RedirectingConstructor? redirectingConstructor,
  33. HTClass? klass,
  34. HTNamespace? namespace,
})

Create a standard HTFunction.

A TypedFunctionDeclaration has to be defined in a HTNamespace of an Interpreter before it can be called within a script.

Implementation

HTFunction(
  String file,
  String module,
  HTInterpreter interpreter, {
  required super.internalName,
  super.id,
  super.classId,
  super.explicityNamespaceId,
  super.closure,
  super.source,
  super.documentation,
  super.isPrivate,
  super.isExternal,
  super.isStatic,
  super.isConst,
  super.isTopLevel,
  super.isField,
  super.category = FunctionCategory.normal,
  super.externalTypeId,
  super.genericTypeParameters = const [],
  super.hasParamDecls = true,
  super.paramDecls = const {},
  required super.declType,
  super.isAsync,
  super.isAbstract,
  super.isVariadic,
  super.minArity,
  super.maxArity,
  this.externalFunc,
  int? ip,
  int? line,
  int? column,
  this.redirectingConstructor,
  this.klass,
  this.namespace,
}) {
  this.interpreter = interpreter;
  this.file = file;
  this.module = module;
  this.ip = ip;
  this.line = line;
  this.column = column;
}