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

#2686 #8

Open
trungtruong1 opened this issue May 10, 2024 · 11 comments
Open

#2686 #8

trungtruong1 opened this issue May 10, 2024 · 11 comments
Assignees

Comments

@trungtruong1
Copy link
Collaborator

I found another issue in the repo, which is #2686. It is a relatively new issue.

@trungtruong1
Copy link
Collaborator Author

trungtruong1 commented May 10, 2024

I managed to fix this issue.

Before:
image

After:
image

I created another branch and pushed the changes.
This issue is about TCL and I have some knowledge about this.

@IshaanVerma1130
Copy link
Collaborator

i'll run tests for your commit.

@trungtruong1
Copy link
Collaborator Author

Thanks! @IshaanVerma1130

@IshaanVerma1130
Copy link
Collaborator

IshaanVerma1130 commented May 16, 2024

image
It is still marking it as TEXT when it should be TEXT>Whitespace @trungtruong1

@trungtruong1
Copy link
Collaborator Author

I think \ and $ shouldn't be marked as TEXT.Whitespace

@IshaanVerma1130
Copy link
Collaborator

IshaanVerma1130 commented May 18, 2024

It's '\n' in the input code. But it's reading it separately as '\' and 'n'.

I believe it should be reading them as newlines as indicated by the comments in the code.

@trungtruong1
Copy link
Collaborator Author

Ah I see, missed that part, I'll fix it

@trungtruong1
Copy link
Collaborator Author

trungtruong1 commented May 25, 2024

Hello, I made a simple fix to the issue. This is the new output for a test file:
ExampleRun

Also, I think it is better to mark \(.) as String.Escape. I use a highlighter in VSCode for Tcl and found out that they do it too.
Highlight by VSCode Extension
This is the code highlighted by the extension. They counted the brackets } incorrectly but that does not apply to our case.

This is my result after the fix:
NewHighlighted

I believe this fixed a HACK in the lexer as well.
The fix is in 0285053

@IshaanVerma1130
Copy link
Collaborator

IshaanVerma1130 commented May 28, 2024

I believe it should still be marked as TEXT.WHITESPACE. Looking at the other Lexers and what they do. Also according to this message, the issue says that some characters should be read as escape character:
image
and just below that it said the sometimes it adds special meanings probably telling that it should be read as newline or TEXT.WHITESPACE according to the Pygments methodology.
image

Take a look at this: https://www.learnxinyminutes.com/docs/tcl/
Want to clarify this with the author?

@trungtruong1
Copy link
Collaborator Author

I think asking them would be nice, would you mind adding a comment to the issue asking for clarification?

@IshaanVerma1130
Copy link
Collaborator

The author still hasn't replied. T_T

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

No branches or pull requests

2 participants