Skip to content

Improved Parser Validation for Strings + Updated Install Method

Choose a tag to compare

@sbdchd sbdchd released this 13 May 01:37
· 57 commits to master since this release
4f5762b

Added

  • parser: validation for bit, byte, and escape string types (#1132)

    select b'01' '10';
    select x'0F' '10';
    select e'foo' 'bar';

    now gives:

    error[syntax-error]: Expected new line or comma between string literals
      β•­β–Έ stdin:1:13
      β”‚
    1 β”‚ select b'01' '10';
      β•°β•΄            ━
    error[syntax-error]: Expected new line or comma between string literals
      β•­β–Έ stdin:2:13
      β”‚
    2 β”‚ select x'0F' '10';
      β•°β•΄            ━
    error[syntax-error]: Expected new line or comma between string literals
      β•­β–Έ stdin:3:14
      β”‚
    3 β”‚ select e'foo' 'bar';
      β•°β•΄             ━
  • parser: validation for escape sequences (#1125, #1123, #1122, #1128, #1129)

    select U&'wrong: !061' UESCAPE '!';
    select U&"wrong: \06" UESCAPE '\';

    now gives:

    error[syntax-error]: Unicode escape requires 4 hex digits: !XXXX
      β•­β–Έ stdin:1:20
      β”‚
    1 β”‚   select U&'wrong: !061' UESCAPE '!';
      β•°β•΄                   ━━━━
    error[syntax-error]: Unicode escape requires 4 hex digits: \XXXX
      β•­β–Έ stdin:2:20
      β”‚
    2 β”‚   select U&"wrong: \06" UESCAPE '\';
      β•°β•΄                   ━━━

Changed

  • ci: update npm based install method (#1133)

    Instead of fetching the binary via an install script we use an optional
    peer dependency, mirroring ESBuild and Sentry.

Fixed

  • cli: fix missing binary exit code (#1130)

    Before if the install script didn't run the NPM JS shim would exit without
    erroring. Thanks @nwalters512!

  • parser: parsing unicode escape idents in cast position (#1127)

    select 2::U&"!0069!006E!0074!0038" UESCAPE '!' from t;

    now parses without error