Project Files
src / flatbuffers / text-range.ts
import * as flatbuffers from 'flatbuffers';
// struct TextRange { location:int; length:int; }
export class TextRange {
bb: flatbuffers.ByteBuffer | null = null;
bb_pos = 0;
__init(i: number, bb: flatbuffers.ByteBuffer): TextRange {
this.bb_pos = i;
this.bb = bb;
return this;
}
static createTextRange(bb: flatbuffers.ByteBuffer, offset: number, obj?: TextRange): TextRange {
return (obj || new TextRange()).__init(offset, bb);
}
location(): number {
// struct fields are inline at bb_pos
return this.bb!.readInt32(this.bb_pos);
}
length(): number {
return this.bb!.readInt32(this.bb_pos + 4);
}
}