dimgigov
|
17c896c4dc
|
feat: string interpolation via f"..." syntax
Bootstrap compiler:
- Add ekStringInterp AST node with text/expr parts
- Lexer: recognize f"..." prefix for interpolation strings
- Parser: split f"..." into ekStringInterp, parse inner expressions
via sub-lexer/sub-parser. Supports escaped braces \{ and \}.
- Sema: type-check interpolated expressions, return String type
- HIR lowerer: desugar ekStringInterp to chained String_Concat
calls with automatic type conversions:
- int/uint types -> String_FromInt
- float types -> String_FromFloat
- bool -> String_FromBool
- String -> as-is
Selfhost compiler:
- ast.bux: add ekStringInterp constant (reserved for future)
- lexer.bux: accept f" prefix, treat as plain string literal
(selfhost parser does not implement interpolation yet)
Tests:
- _test_string_interp verifies int, float, bool, String,
multiple interpolations, plain strings, and Fmt-style {0} templates
|
2026-06-08 21:48:10 +03:00 |
|
dimgigov
|
ac969b37c1
|
v0.3.0: restructure directories
- src/ ← compiler/selfhost/ (canonical Bux compiler)
- bootstrap/ ← compiler/bootstrap/ (Nim bootstrap)
- lib/ ← library/std/ (standard library)
- rt/ ← library/runtime/ (C runtime)
- tests/ ← compiler/tests/ (unit tests)
- Remove _selfhost/ (built into build/selfhost/ now)
- Update all path references (Makefile, cli.nim, cli.bux, docs)
- Bump version to 0.3.0
|
2026-06-06 04:53:39 +03:00 |
|