tobogganSe connecter

louise

The Louise language: compiler, runtime, std, tooling

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

Syntax: string interpolation through Show; ADR 0034 (issue #152)

In every string literal, `{e}` is the prelude's `show(e)` and `{e:?}` is
`debug(e)`; any expression may fill a hole, and the parts are joined in
one tl_string_join call. `\{` and `\}` are literal braces, and a lone `}`
is E0111 (four existing literals escaped). No implicit Show-to-String
conversion: each hole only wants Show (or Debug) of its type.

A string with holes lexes as STRING_START, STRING_TEXT and STRING_END
around INTERP_HOLE nodes (a StringText lexer mode, as HTML text has);
others stay one STRING token. HTML text holes now take any type with
Show, shown then escaped, so E0601 is no longer reported (ADR 0009
note). The tree-sitter grammar gives strings content, escape and
interpolation children; highlighting and semantic tokens follow.

http_demo builds its log lines and messages with interpolation, and
shows a Username as the name itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

olivier · il y a 1 mois · d74037fe850b9f3dba2d57e114ce7b7fa2194583

Parents 388899b

35 fichiers modifiés, 11145 ajouts, 9530 suppressions

Mcrates/louise_core/src/lower/html.rs+19−4
Mcrates/louise_core/src/lower/mod.rs+52−2
Mcrates/louise_db/src/ide/tokens.rs+1−1
Mcrates/louise_hir/src/lower/mod.rs+56−1
Mcrates/louise_syntax/src/grammar/expr.rs+56−2
Mcrates/louise_syntax/src/lexer.rs+53−3
Mcrates/louise_syntax/src/syntax_kind.rs+14−1
Mcrates/louise_types/src/infer/mod.rs+24−16
Adocs/adr/0034-string-interpolation.md+56−0
Meditors/tree-sitter-louise/grammar.js+10−1
Meditors/tree-sitter-louise/queries/helix/generate.py+1−0
Meditors/tree-sitter-louise/queries/helix/highlights.scm+5−0
Meditors/tree-sitter-louise/queries/highlights.scm+3−0
Meditors/tree-sitter-louise/src/grammar.json+84−21
Meditors/tree-sitter-louise/src/node-types.json+127−1
Meditors/tree-sitter-louise/src/parser.c+10412−9450
Meditors/tree-sitter-louise/test/corpus/effects.txt+2−1
Meditors/tree-sitter-louise/test/corpus/expressions.txt+25−0
Mexamples/http_demo/src/credentials.lse+14−3
Mexamples/http_demo/test/app_test.lse+2−2