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:
parent
4c48077d68
commit
b7745a4600
70 changed files with 207 additions and 207 deletions
|
|
@ -19,13 +19,13 @@ var loc_ty: []ptr
|
|||
var loc_mut: []int # 1 = mutable (var / param / loop-var), 0 = immutable (let)
|
||||
var nloc: int = 0
|
||||
var g_uses_str: bool = false # a `str + str` / `str == str` was emitted -> emit the prelude
|
||||
var g_uses_intstr: bool = false # `str(int)` was emitted -> emit the int->string prelude
|
||||
var g_uses_intstr: bool = false # `string(int)` was emitted -> emit the int->string prelude
|
||||
var g_uses_strslice: bool = false # `s[a..b]` was emitted -> emit the substring prelude
|
||||
var g_uses_mathrt: bool = false # Math.sqrt/sin/cos/tan was emitted -> emit the math runtime prelude
|
||||
var g_uses_textrt: bool = false # Text.upper/lower/trim/repeat/pad was emitted -> emit the text builders
|
||||
var g_uses_textrt2: bool = false # Text.split/join/replace was emitted -> emit the string/slice builders
|
||||
var g_uses_hashrt: bool = false # Hash.of/fnv1a/crc32 was emitted -> emit the byte-stream hashers
|
||||
var g_uses_longstr: bool = false # str(long) / interpolating a long was emitted -> emit fn_long_str
|
||||
var g_uses_longstr: bool = false # string(long) / interpolating a long was emitted -> emit fn_long_str
|
||||
|
||||
# loop targets for break/continue (innermost last)
|
||||
var brk_lbl: []ptr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue