Skip to content

Conversation

@keidax
Copy link
Collaborator

@keidax keidax commented Feb 17, 2025

The grammar has several types of escape sequence nodes:

  • char_escape_sequence (only for chars)
  • string_escape_sequence (everywhere else, not only for strings)
  • ignored_backslash (used for "identity" escape sequences)

This PR renames all the above to escape_sequence. I've adjusted the highlighting as well, so escape_sequence is always highlighted in a color that contrasts with the surrounding content.

There are also line continuation backslashes, which are currently hidden nodes without any highlighting. These are unchanged. My intent here is that a line continuation looks different because it's not escaping a newline, it's obscuring a newline.

Highlighting improvements:

Before

before screenshot

After

after screenshot

@keidax
Copy link
Collaborator Author

keidax commented Feb 17, 2025

@nobodywasishere probably needless to say, this is a breaking change for zed

@keidax keidax merged commit 2947333 into main Feb 18, 2025
4 checks passed
@keidax keidax deleted the keidax/escape-cleanup branch February 18, 2025 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants