{"id":"word--loop","name":"loop","owner":"yeho","package":"language","kind":"keyword","signature":"loop","description":"Repeat until explicitly ended","context":"Use loop for event pumps or retry flows with clear exit points. Use while when one condition explains the whole lifetime.","parameters":[],"returns":"","members":[],"tags":["cpu","keyword","language","loops","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"parser_statements.cpp parseLoopStatement and parseLoopControlStatement"},"status":"stable","notes":["next and end target the nearest active loop.","The historical endLoops token is not supported."],"examples":[{"id":"complete-0","title":"Controlled indefinite loop","description":"Use loop for event pumps or retry flows with clear exit points. Use while when one condition explains the whole lifetime.","code":"int attempt = 0\nloop\n{\n    attempt = attempt + 1\n    if attempt < 3 { next }\n    Console.Log(\"Connected\")\n    end\n}\n","tags":["cpu","language"],"run":"cpu-oracle","expected":null,"verifyRun":false,"manifest":"manifestVersion = \"2\"\npackage = \"api.example.word__loop\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n","verification":"type checked","sha256":"31d46a94cc5bcd38fc2e0af214ea6be3aa78b5ce06cb92a12d49373f14a95da1","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=word--loop","json":"https://demonhunterlabs.com/reference/items/word--loop.json","markdown":"https://demonhunterlabs.com/reference/text/word--loop.md"}
