update protobuffers

This commit is contained in:
lingdocs 2021-07-04 13:12:04 +03:00
parent 3d9cc0547f
commit daddaebe30
3 changed files with 4 additions and 0 deletions

View File

@ -65,6 +65,7 @@ Entry._readField = function (tag, obj, pbf) {
else if (tag === 31) obj.separationAtP = pbf.readVarint(true); else if (tag === 31) obj.separationAtP = pbf.readVarint(true);
else if (tag === 32) obj.separationAtF = pbf.readVarint(true); else if (tag === 32) obj.separationAtF = pbf.readVarint(true);
else if (tag === 33) obj.diacExcept = pbf.readBoolean(); else if (tag === 33) obj.diacExcept = pbf.readBoolean();
else if (tag === 34) obj.ec = pbf.readString();
}; };
Entry.write = function (obj, pbf) { Entry.write = function (obj, pbf) {
if (obj.ts) pbf.writeVarintField(1, obj.ts); if (obj.ts) pbf.writeVarintField(1, obj.ts);
@ -100,6 +101,7 @@ Entry.write = function (obj, pbf) {
if (obj.separationAtP) pbf.writeVarintField(31, obj.separationAtP); if (obj.separationAtP) pbf.writeVarintField(31, obj.separationAtP);
if (obj.separationAtF) pbf.writeVarintField(32, obj.separationAtF); if (obj.separationAtF) pbf.writeVarintField(32, obj.separationAtF);
if (obj.diacExcept) pbf.writeBooleanField(33, obj.diacExcept); if (obj.diacExcept) pbf.writeBooleanField(33, obj.diacExcept);
if (obj.ec) pbf.writeStringField(34, obj.ec);
}; };
// Dictionary ======================================== // Dictionary ========================================

View File

@ -43,6 +43,7 @@ message Entry {
int32 separationAtP = 31; int32 separationAtP = 31;
int32 separationAtF = 32; int32 separationAtF = 32;
bool diacExcept = 33; bool diacExcept = 33;
string ec = 34;
} }
message Dictionary { message Dictionary {

View File

@ -28,6 +28,7 @@ export type Dictionary = {
entries: DictionaryEntry[]; entries: DictionaryEntry[];
} }
// TODO: BETTER TYPING OF THIS WITH RECORD TO MAKE SURE THAT THE FIELDS LINE UP
export type DictionaryEntry = { export type DictionaryEntry = {
// BASE REQUIRED INFO // BASE REQUIRED INFO
/** timestamp - used for word id */ /** timestamp - used for word id */