Skip to content

More Parser Validation + CI Hardening

Choose a tag to compare

@sbdchd sbdchd released this 24 May 23:20
· 26 commits to master since this release
c3dc1e6

v2.54.0 - 2026-05-24

Added

  • lexer: add parsing and erroring for num trailing suffix (#1159)

    error[syntax-error]: trailing junk after numeric literal
      β•­β–Έ stdin:1:11
      β”‚
    1 β”‚ SELECT 0x0y;
      β•°β•΄          ━
    
  • parser: warn about empty / invalid params & empty quoted idents (#1164)

    error[syntax-error]: empty delimited identifier
      β•­β–Έ stdin:1:8
      β”‚
    1 β”‚ select "", $, $2147483648
      β•°β•΄       ━━
    error[syntax-error]: missing parameter number
      β•­β–Έ stdin:1:12
      β”‚
    1 β”‚ select "", $, $2147483648
      β•°β•΄           ━
    error[syntax-error]: parameter number too large
      β•­β–Έ stdin:1:15
      β”‚
    1 β”‚ select "", $, $2147483648
      β•°β•΄              ━━━━━━━━━━━
    
  • parser: warn about invalid octal/hex/binary digits (#1163)

    error[syntax-error]: invalid digit for a base 2 literal
      β•­β–Έ stdin:1:12
      β”‚
    1 β”‚ select 0b104, 0o7719, 0xg
      β•°β•΄           ━
    error[syntax-error]: invalid digit for a base 8 literal
      β•­β–Έ stdin:1:20
      β”‚
    1 β”‚ select 0b104, 0o7719, 0xg
      β•°β•΄                   ━
    error[syntax-error]: trailing junk after numeric literal
      β•­β–Έ stdin:1:25
      β”‚
    1 β”‚ select 0b104, 0o7719, 0xg
      β•°β•΄                        ━
    
  • parser: improve error reporting for malformed literals (#1162)

    error[syntax-error]: trailing junk after positional parameter
      β•­β–Έ stdin:1:10
      β”‚
    1 β”‚ SELECT $1a;
      β•°β•΄         ━
    

    instead of

    error[syntax-error]: trailing junk after positional parameter
      β•­β–Έ stdin:1:10
      β”‚
    1 β”‚ SELECT $1a;
      β•°β•΄       ━━━
    
  • parser: improve lexing numbers (#1161)

    select .4;

    now produces:

    NUMERIC_NUMBER@7..9 ".4"
    

    instead of:

    INT_NUMBER@7..9 ".4"
    
  • ide: goto def for t.c%type (#1161)

    create table t(a int, b text);
    --           ^ dest
    create function f(x t.a%type) returns s.t.b%type
    --                  ^ source
      as $$ select 'hello'::text $$ language sql;
  • ide: find refs for types like bit (#1153)

    create type pg_catalog.bit;
    --                     ^^^ source
    
    create function pg_catalog.bit(bigint, integer) returns bit
    --                                                      ^^^ ref
      language internal;
  • ide: add hover for string literals (#1155)

    Now we decode the escape sequences for string literals on hover and show the
    value up to the first new line.

  • ide: improve numeric literal type inference (#1156)

    select 2147483647; -- type: integer
    select 2147483648; -- type: bigint
    select 100000000000000000000000; -- type: numeric
  • fmt: literals & binary operators (#1169)

    Format binary operators and literals.

    -- before
    select TRUE  and  FALSE;
    select X'AF';
    
    -- after
    select true and false;
    select
      x'AF';
  • fmt: unquote column aliases when possible (#1168)

    -- before
    select 1 as "foo";
    
    -- after
    select 1 as foo;

Changed

Fixed

  • lexer: fix unicode escape string issue (#1158)
  • vscode: update TextMate grammar to support other numeric literal kinds (#1157)

v2.53.0 - 2026-05-17

Added

  • parser: validate string continuations (#1137)
  • parser: improve create rule ast (#1147)

Changed

  • parser: update ast nodes to include their trailing semicolons (#1145, #1148)

Fixed

  • install: fix windows npx install bug (#1140)