HTVariable constructor

HTVariable({
  1. required String id,
  2. HTInterpreter? interpreter,
  3. String? fileName,
  4. String? moduleName,
  5. String? classId,
  6. HTNamespace? closure,
  7. String? documentation,
  8. HTType? declType,
  9. dynamic value,
  10. bool isPrivate = false,
  11. bool isExternal = false,
  12. bool isStatic = false,
  13. bool isConst = false,
  14. bool isMutable = false,
  15. bool isTopLevel = false,
  16. bool lateFinalize = false,
  17. int? definitionIp,
  18. int? definitionLine,
  19. int? definitionColumn,
})

Create a HTVariable.

If it has initializer code, it will have to be defined in a HTNamespace of an Interpreter before it can be acessed within a script.

Implementation

HTVariable(
    {required super.id,
    HTInterpreter? interpreter,
    String? fileName,
    String? moduleName,
    super.classId,
    HTNamespace? closure,
    super.documentation,
    super.declType,
    dynamic value,
    super.isPrivate = false,
    super.isExternal = false,
    super.isStatic = false,
    super.isConst = false,
    super.isMutable = false,
    super.isTopLevel = false,
    super.lateFinalize = false,
    int? definitionIp,
    int? definitionLine,
    int? definitionColumn})
    : _closure = closure,
      super(closure: closure) {
  if (interpreter != null) {
    this.interpreter = interpreter;
  }
  if (fileName != null) {
    this.fileName = fileName;
  }
  if (moduleName != null) {
    this.moduleName = moduleName;
  }
  this.definitionIp = definitionIp;
  this.definitionLine = definitionLine;
  this.definitionColumn = definitionColumn;

  if (value != null) {
    _value = value;
    _isInitialized = true;
  }
}