Skip to content

[WIP] Batch highlightining#60

Draft
Sobak wants to merge 15 commits into
feature/lang-dockerfilefrom
feature/lang-batch
Draft

[WIP] Batch highlightining#60
Sobak wants to merge 15 commits into
feature/lang-dockerfilefrom
feature/lang-batch

Conversation

@Sobak

@Sobak Sobak commented Feb 11, 2024

Copy link
Copy Markdown
Collaborator

This is one big of a mess draft. It's based off a #56 and obviously it will have to be rebased but for now I kept the somehow-original commit history to make it easier to understand the pain process I was going through.

Open questions

  1. Do we have any support for tokenizing goto labels? From the quick grep of the codebase, I didn't spot anything like that. I think it could be nice but of course it's outside of the scope for this PR
  2. I have a problem with matching variables. Batch allows two variants of syntax: %foo% and %foo - I have created two regex-based rules to match these. However, no matter how I set their priorities, %foo% always gets matched as "comment %foo" and then "comment %" (even though I use \w+). This can be seen in the token dump of small.bat or with the debug formatter
  3. What is the delimiter rule used in Shell highlighting for?
  4. For whatever reason I can't match just some of the comments in the bit.batch. This one really puzzles me tbh oO it can be seen from the token dump but lemme attach a screenshot to make it even more obvious

image

pls send help

@Sobak
Sobak requested a review from kadet1090 February 11, 2024 09:34
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.

1 participant