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

Add VB6 highlighting based on the VBA syntax #74

Open
MartinHickling101 opened this issue May 17, 2023 · 6 comments
Open

Add VB6 highlighting based on the VBA syntax #74

MartinHickling101 opened this issue May 17, 2023 · 6 comments

Comments

@MartinHickling101
Copy link

Describe the feature

.ctl file not resolving.

Proposed Solution

add .ctl to the list of available files

Additional Information

No response

@serkonda7
Copy link
Owner

Could you please provide a short explanation or link what ctl files are used for?

@DecimalTurn
Copy link
Contributor

.ctl files are for VB6 not VBA, but since the syntax between the two is very similar, some people might want to use VBA syntax highlighting for VB6.

I recently had to figure out the exact syntax differences between VBA and VB6 for this PR, and the only 2 differences I could find were these:

  1. VBA7 has new 64-bit features that were not implemented in VB6
  2. VBA has some unique top module declarations
    a. Option Private Module
    b. Option Compare Database

@serkonda7
Copy link
Owner

serkonda7 commented Jun 6, 2023

We already provide highlighting for WWB on top of VBA due to it's similarities: https://github.com/serkonda7/vscode-vba/blob/main/syntaxes/wwb.tmGrammar.yml

So I would be fine to include VB6 highlighting the same way.
However I'm not sure whether VS Code supports heuristics for file extension disambiguation.

Although I might have to consider renaming the extension to something like basic-all-in-one as the scope keeps expanding.

@serkonda7 serkonda7 changed the title Highlighting Add VB6 highlighting based on the VBA syntax Jun 6, 2023
@DecimalTurn
Copy link
Contributor

DecimalTurn commented Jun 6, 2023

We already provide highlighting for WWB on top of VBA due to it's similarities: main/syntaxes/wwb.tmGrammar.yml

So I would be fine to include VB6 highlighting the same way.

Interesting option. In the case of VBA and VB6, if we adopt the same logic, it would be VB6's grammar that would be included in VBA's grammar.

However, I think that if we want to keep things simple, a solution for someone using the VS code extension for VB6 is simply to add VBA as the language mode for the file extensions .Dsr and .ctl.

Just need to press Ctrl+Shift+P, then Change Language Mode and select VBA.

@serkonda7
Copy link
Owner

Thanks for your input and thoughts!

Just need to press Ctrl+Shift+P, then Change Language Mode and select VBA.

Until this language binding is a lot more requested, it has to be changed manually like above.

@serkonda7 serkonda7 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 6, 2023
@DecimalTurn
Copy link
Contributor

FYI, once this PR is merged, we will be using the VBA grammar provided here for syntax highlighting of VB6 code on GitHub.

@serkonda7 serkonda7 reopened this Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants