HTFunction constructor

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

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 fileName, String moduleName, HTInterpreter interpreter,
    {required super.internalName,
    super.id,
    super.classId,
    super.closure,
    super.source,
    super.documentation,
    super.isExternal = false,
    super.isStatic = false,
    super.isConst = false,
    super.isTopLevel = false,
    super.category = FunctionCategory.normal,
    super.externalTypeId,
    super.genericTypeParameters = const [],
    super.hasParamDecls = true,
    super.paramDecls = const {},
    required super.declType,
    super.isAsync = false,
    super.isField = false,
    super.isAbstract = false,
    super.isVariadic = false,
    super.minArity = 0,
    super.maxArity = 0,
    super.namespace,
    this.externalFunc,
    int? definitionIp,
    int? definitionLine,
    int? definitionColumn,
    this.redirectingConstructor,
    this.klass}) {
  this.interpreter = interpreter;
  this.fileName = fileName;
  this.moduleName = moduleName;
  this.definitionIp = definitionIp;
  this.definitionLine = definitionLine;
  this.definitionColumn = definitionColumn;
}