Skip to content

Support for case statements #34

Open
@arcanemachine

Description

@arcanemachine

HEEx templates support the valid (if not somewhat esoteric) usage of case statements (as referenced in this Elixir Forum post). For example:

<%= case some_value do %>
  <% something -> %>
    Some stuff
  <% something_else -> %>
    Some other stuff
  <% _ -> %>
    Default stuff
<% end %>

The syntax currently breaks the highlighting. I have not worked with Tree-sitter grammars before, although I'm looking into it to see if I can implement this myself. If not, I would appreciate some help getting this working if possible.

As an alternative, I could definitely use a series of if blocks, but the syntax above is perfectly valid (and much more elegant and Elixir-esque IMO) so it would be nice to be able to get that working.

Thanks

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