From ca27f47d394801765bc3bb7c94482fc618dcc519 Mon Sep 17 00:00:00 2001 From: prql-bot <107324867+prql-bot@users.noreply.github.com> Date: Sun, 12 Apr 2026 07:13:46 +0000 Subject: [PATCH] fix: correct Annotate display, fix typos, update stale docs - Fix Annotate token Display impl: render as `@` not `@{` (matches the comment on lr.rs:53 and the lexer in mod.rs:169) - Fix typo in transforms.rs: "much" -> "must" - Update lezer README: remove stale 2022-12 claim, acknowledge existing test/ directory Co-Authored-By: Claude Opus 4.6 --- grammars/prql-lezer/README.md | 6 +++--- prqlc/prqlc-parser/src/lexer/lr.rs | 2 +- prqlc/prqlc/src/semantic/resolver/transforms.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/grammars/prql-lezer/README.md b/grammars/prql-lezer/README.md index 6de4e226e8e9..072d2e7ef666 100644 --- a/grammars/prql-lezer/README.md +++ b/grammars/prql-lezer/README.md @@ -4,15 +4,15 @@ A Lezer / CodeMirror grammar for PRQL. It's largely fully-functioning, with a few small TODOs in the [grammar file](src/prql.grammar). CodeMirror grammars are required by some downstream tools, including -[Jupyter syntax highlighting](https://github.com/PRQL/pyprql/issues/45). As of -2022-12 none yet use it. +[Jupyter syntax highlighting](https://github.com/PRQL/pyprql/issues/45). We don't yet have the JS machinery around it, and it's not published to any package managers. We can add that shortly. Possibly it'll go into its own repo. ## Developing -Given there aren't yet tests, we've been developing this by: +Tests are in the `test/` directory. The Lezer playground can also be useful for +interactive development: - Opening - Pasting an example query diff --git a/prqlc/prqlc-parser/src/lexer/lr.rs b/prqlc/prqlc-parser/src/lexer/lr.rs index a33bac1c8574..9498ca581975 100644 --- a/prqlc/prqlc-parser/src/lexer/lr.rs +++ b/prqlc/prqlc-parser/src/lexer/lr.rs @@ -231,7 +231,7 @@ impl std::fmt::Display for TokenKind { TokenKind::Coalesce => f.write_str("??"), TokenKind::DivInt => f.write_str("//"), TokenKind::Pow => f.write_str("**"), - TokenKind::Annotate => f.write_str("@{"), + TokenKind::Annotate => f.write_str("@"), TokenKind::Param(id) => write!(f, "${id}"), diff --git a/prqlc/prqlc/src/semantic/resolver/transforms.rs b/prqlc/prqlc/src/semantic/resolver/transforms.rs index c6a66aa62bb0..1f3f14363d6e 100644 --- a/prqlc/prqlc/src/semantic/resolver/transforms.rs +++ b/prqlc/prqlc/src/semantic/resolver/transforms.rs @@ -942,7 +942,7 @@ impl Lineage { // special case: include a tuple if expr.ty.as_ref().is_some_and(|x| x.kind.is_tuple()) && expr.kind.is_ident() { - // this ident is a tuple, which means it much point to an input + // this ident is a tuple, which means it must point to an input let input_id = expr.target_id.unwrap(); self.columns.push(LineageColumn::All {