Use null for erased values to aid serialization

This commit is contained in:
2025-01-18 14:48:29 -08:00
parent cecb1d73c1
commit f9279bb255
6 changed files with 43 additions and 28 deletions

15
scripts/stats.py Normal file
View File

@@ -0,0 +1,15 @@
stats = {}
acc = ''
name = ''
for line in open('newt.js'):
if line.startswith('const'):
if name: stats[name] = len(acc)
acc = line
name = line.split()[1]
else:
acc += line
if name: stats[name] = len(acc)
sorted_stats = sorted(((v, k) for k, v in stats.items()))
for value, key in sorted_stats:
print(value, key)