MCPcopy Index your code
hub / github.com/aiscript-dev/aiscript / parseLoop

Function parseLoop

src/parser/syntaxes/statements.ts:438–446  ·  view source on GitHub ↗

* ```abnf * Loop = "loop" Block * ```

(s: ITokenStream)

Source from the content-addressed store, hash-verified

436 * ```
437*/
438function parseLoop(s: ITokenStream): Ast.Loop {
439 const startPos = s.getPos();
440
441 s.expect(TokenKind.LoopKeyword);
442 s.next();
443 const statements = parseBlock(s);
444
445 return NODE('loop', { statements }, startPos, s.getPos());
446}
447
448/**
449 * ```abnf

Callers 1

parseStatementFunction · 0.85

Calls 5

parseBlockFunction · 0.85
NODEFunction · 0.85
getPosMethod · 0.65
expectMethod · 0.65
nextMethod · 0.65

Tested by

no test coverage detected