From a3e9e53e64a1aa5692bca2b60bcbff6a0fcfdba1 Mon Sep 17 00:00:00 2001 From: zinc Date: Wed, 14 Oct 2026 08:09:40 +0000 Subject: lsp: quick fixes for hints and bare library names; comment cleanup an undefined bare name that a module exports now says which one: "put_c is used but never defined; did you mean to include rt and use rt.put_c?", and the import quick fix is titled the same way and marked preferred when it is the only one, so the editor's auto-fix applies it. hints gain quick fixes that keep the program's meaning: an unused parameter, or a local with no other use, is renamed to _; a constant local with one declarator becomes const; a power-of-two multiply becomes a parenthesized shift (not when a * / or % binds its left operand); and let p = rt.new(n) with a small constant becomes let p[n]. the hints no longer fire for _ discards or for locals already declared const. whole-line /* */ comments in zc sources are // comments now, and //: is gone from the maintained sources: the notes it marked were mostly the documentation of the declaration below, which hovers now show. section headers are separated from the declarations after them. --- examples/learn/29-block-comments.zc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/learn') diff --git a/examples/learn/29-block-comments.zc b/examples/learn/29-block-comments.zc index a5088eb..9468cc5 100644 --- a/examples/learn/29-block-comments.zc +++ b/examples/learn/29-block-comments.zc @@ -1,7 +1,7 @@ namespace; include rt; -/* adds a memory offset to an address. */ +// adds a memory offset to an address. int offset_address(int address) { return address + /* offset in memory */ 0x40ff; } -- cgit v1.2.3