diff --git a/docs/now/2026-09-23-published-a-keyword-is-a-legal-variable-name-the-parser-dropped-it-and.md b/docs/now/2026-09-23-published-a-keyword-is-a-legal-variable-name-the-parser-dropped-it-and.md new file mode 100644 index 0000000000..a0abcf5c2d --- /dev/null +++ b/docs/now/2026-09-23-published-a-keyword-is-a-legal-variable-name-the-parser-dropped-it-and.md @@ -0,0 +1,11 @@ +# NOW -- A keyword is a legal variable name; the parser dropped it and emitted 'var ;' (published 2026-09-23) + +## A bee's work on #2703, published from `queen-2703` (Closes #2703) + +- The branch changes 1 file(s): `specs/compiler/parser.t27`. +- `git diff --stat origin/master...queen-2703` reads: 1 file changed, 1 insertion(+), 1 deletion(-) +- This entry is written by the publisher, not by the bee. A pull request must + add exactly one `docs/now/` entry and a bee has no way to know that: its brief + names a boundary file and acceptance criteria, and `docs/now/` is neither. +- What this entry does NOT establish: that the work is correct. The gates on the + pull request judge that, and they are the same gates every other change meets. diff --git a/specs/compiler/parser.t27 b/specs/compiler/parser.t27 index c52123396b..7c2d51600d 100644 --- a/specs/compiler/parser.t27 +++ b/specs/compiler/parser.t27 @@ -924,7 +924,7 @@ module Parsing { decl.extra_mutable = self.check(lexer::TokenKind::KwVar); self.advance(); - if (self.check(lexer::TokenKind::Ident)) { + if (self.current.kind == lexer::TokenKind::Ident or self.current.kind == lexer::TokenKind::KwModule) { decl.name = self.current.lexeme; self.advance(); }