MCPcopy
hub / github.com/lutzroeder/netron / value

Method value

source/python.js:4626–4719  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4624 }
4625 };
4626 const value = () => {
4627 const m = buffer[p++];
4628 switch (m) {
4629 case 0x5A: return null;
4630 case 0x54: return true;
4631 case 0x46: return false;
4632 case 0x69: return view.getInt8(p++);
4633 case 0x55: return view.getUint8(p++);
4634 case 0x49: {
4635 const v = view.getInt16(p);
4636 p += 2;
4637 return v;
4638 }
4639 case 0x6C: {
4640 const v = view.getInt32(p);
4641 p += 4;
4642 return v;
4643 }
4644 case 0x4C: {
4645 const v = view.getBigInt64(p);
4646 p += 8;
4647 return Number(v);
4648 }
4649 case 0x64: {
4650 const v = view.getFloat32(p);
4651 p += 4;
4652 return v;
4653 }
4654 case 0x44: {
4655 const v = view.getFloat64(p);
4656 p += 8;
4657 return v;
4658 }
4659 case 0x53: return str();
4660 case 0x7B: {
4661 const o = {};
4662 if (buffer[p] === 0x7D) {
4663 p++;
4664 return o;
4665 }
4666 let n = -1;
4667 if (buffer[p] === 0x23) {
4668 p++;
4669 n = integer();
4670 }
4671 if (n >= 0) {
4672 for (let i = 0; i < n; i++) {
4673 const k = str();
4674 o[k] = value();
4675 }
4676 } else {
4677 while (buffer[p] !== 0x7D) {
4678 const k = str();
4679 o[k] = value();
4680 }
4681 p++;
4682 }
4683 return o;

Callers 9

mapMethod · 0.45
arrayMethod · 0.45
constructorMethod · 0.45
callMethod · 0.45
emitIfElseBlocksMethod · 0.45
getValuesMethod · 0.45
emitApplySpecialFormMethod · 0.45
emitBinaryOpMethod · 0.45
emitTupleSliceMethod · 0.45

Calls 2

pushMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected