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

[WIP] Batch highlightining #60

Draft
wants to merge 15 commits into
base: feature/lang-dockerfile
Choose a base branch
from

Conversation

Sobak
Copy link
Collaborator

@Sobak Sobak commented Feb 11, 2024

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