HTFunction constructor
HTFunction(
- String file,
- String module,
- HTInterpreter interpreter, {
- required String internalName,
- String? id,
- String? classId,
- String? explicityNamespaceId,
- HTDeclarationNamespace? closure,
- HTSource? source,
- String? documentation,
- bool isPrivate = false,
- bool isExternal = false,
- bool isStatic = false,
- bool isConst = false,
- bool isTopLevel = false,
- bool isField = false,
- FunctionCategory category = FunctionCategory.normal,
- String? externalTypeId,
- List<
HTGenericTypeParameter> genericTypeParameters = const [], - bool hasParamDecls = true,
- Map<
String, HTAbstractParameter> paramDecls = const {}, - required HTFunctionType? declType,
- bool isAsync = false,
- bool isAbstract = false,
- bool isVariadic = false,
- int minArity = 0,
- int maxArity = 0,
- Function? externalFunc,
- int? ip,
- int? line,
- int? column,
- RedirectingConstructor? redirectingConstructor,
- HTClass? klass,
- 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;
}