private void SetPos(Runtime runtime, IP5Any val, out Position pos) { var scalar = val as P5Scalar; if (!scalar.IsDefined(runtime)) { pos.File = null; pos.Line = 0; } else { var arr = scalar.DereferenceArray(runtime); pos.File = arr.GetItem(runtime, 0).AsString(runtime); pos.Line = arr.GetItem(runtime, 1).AsInteger(runtime); } }
public static void ReadPos(BinaryReader reader, out Position pos) { ReadPos(reader, out pos.File, out pos.Line); }