read static method
Implementation
static ScriptProblem read(BinaryReader reader) {
final typeValue = reader.readUint8();
final type = typeValue < ScriptProblemType.values.length
? ScriptProblemType.values[typeValue]
: ScriptProblemType.unknown;
final severityValue = reader.readUint8();
final sourceValue = reader.readUint8();
final code = reader.readString();
return ScriptProblem(
type: type,
severity: severityValue < ScriptProblemSeverity.values.length
? ScriptProblemSeverity.values[severityValue]
: ScriptProblemSeverity.error,
source: sourceValue < ScriptProblemTool.values.length
? ScriptProblemTool.values[sourceValue]
: ScriptProblemTool.luau,
code: code,
range: ScriptRange.read(reader),
message: reader.readString(),
);
}