{"id":"language--literals","name":"Literals and escapes","owner":"yeho","package":"language","kind":"language","signature":"\"text\"\n'c'\n42\n3.14\n6.02e23\ntrue\nfalse\nnull","description":"Yeho has text, character, integer, floating-point, boolean, and null literals with explicit escape sequences.","context":"Use literals for small values that are obvious at the point of use. Give repeated domain values a named field or function.","parameters":[],"returns":"","members":[],"tags":["cpu","false","language","null","true","values","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"docs/language/language-core.md §2.6-2.9; lexer literal fixtures"},"status":"stable","notes":["Supported escapes include \\\\, \\n, \\r, \\t, \\0, escaped quotes, and Unicode \\u{...}.","Interpolated text and hex, binary, or separator numeric literals are not admitted."],"examples":[{"id":"complete-0","title":"Literal forms","description":"Use literals for small values that are obvious at the point of use. Give repeated domain values a named field or function.","code":"class Pilot { }\ntext greeting = \"hello\\nworld\"\nchar initial = 'Y'\nint count = 42\nfloat ratio = 1.5\nbool ready = true\nPilot? selected = null\n","tags":["cpu","language"],"run":"cpu-oracle","expected":null,"verifyRun":false,"manifest":"manifestVersion = \"2\"\npackage = \"api.example.language__literals\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n","verification":"type checked","sha256":"1165d52b0547b062c85aaeef9aa86b48d19c5fa529ccff8477b2ad321a34316a","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=language--literals","json":"https://demonhunterlabs.com/reference/items/language--literals.json","markdown":"https://demonhunterlabs.com/reference/text/language--literals.md"}
