Skip to content

Span for Expr::Case does not include the heading and trailing keywords #1878

Closed
@eliaperantoni

Description

@eliaperantoni

How to reproduce

  1. Build a Expr::Case expression, e.g.:
CASE col1 WHEN col2 THEN col3 ELSE col4 END
  1. Call Spanned:span on it.

You'll notice that the Span only selects nodes that appear within the CASE and implement Spanned correctly, but the CASE and END keywords are not highlighted.

CASE col1 WHEN col2 THEN col3 ELSE col4 END
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     Span covers this

Expected behavior

The Span should include CASE and END too:

CASE col1 WHEN col2 THEN col3 ELSE col4 END
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Span should cover this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions