HTFunction constructor
HTFunction(
- String fileName,
- String moduleName,
- HTInterpreter interpreter, {
- required String internalName,
- String? id,
- String? classId,
- HTDeclarationNamespace? closure,
- HTSource? source,
- String? documentation,
- bool isExternal = false,
- bool isStatic = false,
- bool isConst = false,
- bool isTopLevel = 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 isField = false,
- bool isAbstract = false,
- bool isVariadic = false,
- int minArity = 0,
- int maxArity = 0,
- HTDeclarationNamespace? namespace,
- Function? externalFunc,
- int? definitionIp,
- int? definitionLine,
- int? definitionColumn,
- RedirectingConstructor? redirectingConstructor,
- 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;
}