refactor(lang): rename the str type (and stringify builtin) to string

Expand the abbreviated string type and its conversion builtin to the full
word everywhere:
  str            ->  string        (the immutable-string type)
  str(x) -> str  ->  string(x) -> string   (the stringify builtin;
                                            what `{…}` interpolation calls)

Types are recognized by identifier, and llty maps both spellings to LLVM
`ptr`, so this is an atomic source rewrite: type annotations, the Ludic
type tags, the builtin name/dispatch, and the interpolation desugar, plus
the grammars, LSP, docs (type-str -> type-string, fn-str -> fn-string), and
inventory. int/bool stay (universally accepted, like Math).

Reseeded; C-free fixpoint holds; all suites green (45/24/29); site + check.py OK.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-08-30 01:51:11 +03:00
parent 4c48077d68
commit b7745a4600
70 changed files with 207 additions and 207 deletions

View file

@ -42,7 +42,7 @@ function png_tag(b: ptr, at: int, a: int, c: int, d: int, e: int) -> bool {
return true
}
function rt_read_file(path: str) -> ptr {
function rt_read_file(path: string) -> ptr {
let f = file_open(path, "rb")
if (f == null) { return null }
file_seek(f, 0, 2)
@ -62,7 +62,7 @@ var png_w: int = 0
var png_h: int = 0
var png_px: words = null
function rt_decode_png(path: str) -> bool {
function rt_decode_png(path: string) -> bool {
png_w = 0
png_h = 0
png_px = null
@ -227,7 +227,7 @@ function rt_decode_png(path: str) -> bool {
}
# ---- images ---------------------------------------------------------------
function rt_image_load(path: str) -> int {
function rt_image_load(path: string) -> int {
if img_n >= IMG_MAX { return 0 - 1 }
if rt_decode_png(path) == false { return 0 - 1 }
let id = img_n
@ -315,7 +315,7 @@ function rt_draw_9slice(id: int, dx: int, dy: int, dw: int, dh: int, inset: int)
}
# ---- sprites (16x16 art) --------------------------------------------------
function rt_png_load(path: str) -> int {
function rt_png_load(path: string) -> int {
if spr_n >= SPR_MAX { return 0 - 1 }
if rt_decode_png(path) == false { return 0 - 1 }
let id = spr_n
@ -375,7 +375,7 @@ function rt_hexval(c: int) -> int {
return 0 - 1
}
function rt_sprites_load(path: str) -> void {
function rt_sprites_load(path: string) -> void {
let d = rt_read_file(path)
if (d == null) { spr_n = 0; return }
let size = rt_file_len