MCPcopy Index your code
hub / github.com/simstudioai/sim / skip

Method skip

apps/sim/app/api/tools/evernote/lib/thrift.ts:165–214  ·  view source on GitHub ↗

Skip a value of the given Thrift type

(type: number)

Source from the content-addressed store, hash-verified

163
164 /** Skip a value of the given Thrift type */
165 skip(type: number): void {
166 switch (type) {
167 case TYPE_BOOL:
168 this.pos += 1
169 break
170 case 6: // I16
171 this.pos += 2
172 break
173 case 3: // BYTE
174 this.pos += 1
175 break
176 case TYPE_I32:
177 this.pos += 4
178 break
179 case TYPE_I64:
180 case 4: // DOUBLE
181 this.pos += 8
182 break
183 case TYPE_STRING: {
184 const len = this.readI32()
185 this.pos += len
186 break
187 }
188 case TYPE_STRUCT:
189 this.skipStruct()
190 break
191 case TYPE_LIST:
192 case 14: {
193 // SET
194 const { elementType, size } = this.readListBegin()
195 for (let i = 0; i < size; i++) {
196 this.skip(elementType)
197 }
198 break
199 }
200 case 13: {
201 // MAP
202 const keyType = this.view.getUint8(this.pos++)
203 const valueType = this.view.getUint8(this.pos++)
204 const count = this.readI32()
205 for (let i = 0; i < count; i++) {
206 this.skip(keyType)
207 this.skip(valueType)
208 }
209 break
210 }
211 default:
212 throw new Error(`Cannot skip unknown Thrift type: ${type}`)
213 }
214 }
215
216 private skipStruct(): void {
217 for (;;) {

Callers 15

skipStructMethod · 0.95
pptxgenjs.cjsFile · 0.80
UBFunction · 0.80
readExceptionMethod · 0.80
checkEvernoteExceptionFunction · 0.80
readNotebookFunction · 0.80
readNoteFunction · 0.80
readTagFunction · 0.80
readNoteMetadataFunction · 0.80
listNotebooksFunction · 0.80
getNoteFunction · 0.80
createNoteFunction · 0.80

Calls 3

readI32Method · 0.95
skipStructMethod · 0.95
readListBeginMethod · 0.95

Tested by

no test coverage detected