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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
@takase1121 takase1121 moved this from PR to Freeze in Bugfix Release Tracker Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant