Browse Source

Fix names for JSONAPI's internal methods

pull/8/head
Anton Tarasenko 2 years ago
parent
commit
499b4359ed
  1. 10
      sources/Text/JSON/JSONAPI.uc

10
sources/Text/JSON/JSONAPI.uc

@ -733,7 +733,7 @@ public function HashTable ParseHashTableWith(
} }
// Parse property // Parse property
parsedEntries[parsedEntries.length] = parsedEntries[parsedEntries.length] =
ParseHashTableProperty(parser, parseAsMutable); ParseProperty(parser, parseAsMutable);
if (!parser.Ok()) { if (!parser.Ok()) {
break; break;
} }
@ -744,13 +744,12 @@ public function HashTable ParseHashTableWith(
else { else {
parser.Fail(); parser.Fail();
} }
FreeHashTableEntries(parsedEntries); FreeEntries(parsedEntries);
return result; return result;
} }
// TODO: ParseProperty
// Parses a JSON key-value pair (there must not be any leading spaces). // Parses a JSON key-value pair (there must not be any leading spaces).
private function HashTable.Entry ParseHashTableProperty( private function HashTable.Entry ParseProperty(
Parser parser, Parser parser,
bool parseAsMutable) bool parseAsMutable)
{ {
@ -762,9 +761,8 @@ private function HashTable.Entry ParseHashTableProperty(
return entry; return entry;
} }
// TODO: FreeEntries
// Auxiliary method for deallocating unneeded objects in entry pairs. // Auxiliary method for deallocating unneeded objects in entry pairs.
private function FreeHashTableEntries(array<HashTable.Entry> entries) private function FreeEntries(array<HashTable.Entry> entries)
{ {
local int i; local int i;
for (i = 0; i < entries.length; i += 1) for (i = 0; i < entries.length; i += 1)

Loading…
Cancel
Save