MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / reread

Method reread

src/resolution/jsx-code.ts:193–204  ·  view source on GitHub ↗

* Undo back to the innermost element still open among code and read its * `<` again as an operator. False when there is none, or too many have * failed: the file is then read as it is.

()

Source from the content-addressed store, hash-verified

191 * failed: the file is then read as it is.
192 */
193 private reread(): boolean {
194 const root = this.roots.pop();
195 if (!root || ++this.rereads > MAX_REREADS) return false;
196 this.stack.length = root.depth;
197 this.blanks.length = root.blanks;
198 for (const k of this.operators) if (k > root.at) this.operators.delete(k);
199 this.operators.add(root.at);
200 this.i = root.at;
201 this.exprEnd = false;
202 this.afterDot = false;
203 return true;
204 }
205
206 /** Open the element whose `<` is at `lt`. False when it cannot be one. */
207 private openElement(lt: number): boolean {

Callers 4

readMethod · 0.95
codeMethod · 0.95
tagMethod · 0.95
childrenMethod · 0.95

Calls 2

deleteMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected