Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multi-type usage in delimited patterns #1740

Merged

Conversation

Guldoman
Copy link
Member

@Guldoman Guldoman commented Mar 8, 2024

In the "end" pattern we weren't considering the multiple types.

Creating as draft as I need to check some more cases.

Example:
Using

local syntax = require "core.syntax"
syntax.add({
  name = "test",
  files = { "%.TEST$" },
  patterns = {
    { pattern = { "hello()", "world()123" }, type = { "string", "number" } },
    { pattern = "[^h]+", type = "comment" }
  },
  symbols = {}
})

Before:
Schermata del 2024-04-15 10-03-23

After:
Schermata del 2024-04-15 10-02-50

In the "end" pattern we weren't considering the multiple types.
@Guldoman Guldoman marked this pull request as ready for review March 11, 2024 21:15
@adamharrison
Copy link
Member

Merged as part of PR committee meeting 10.

@adamharrison adamharrison merged commit 46b1499 into lite-xl:master Oct 22, 2024
10 checks passed
takase1121 pushed a commit to takase1121/lite-xl that referenced this pull request Nov 25, 2024
In the "end" pattern we weren't considering the multiple types.
takase1121 pushed a commit that referenced this pull request Nov 27, 2024
In the "end" pattern we weren't considering the multiple types.
takase1121 pushed a commit that referenced this pull request Nov 27, 2024
In the "end" pattern we weren't considering the multiple types.
takase1121 pushed a commit that referenced this pull request Nov 27, 2024
In the "end" pattern we weren't considering the multiple types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants