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 support for the BASIC family of programming languages #5166

Merged
merged 9 commits into from
Apr 6, 2021

Conversation

telnet23
Copy link
Contributor

Description

As I reported in #5156, many BASIC programs have been incorrectly labeled as VBA (or Visual Basic .NET if they have not been updated since #4725). There are numerous dialects of BASIC (e.g. AppleSoft, Commodore, GW-BASIC), but most dialects share similar syntax and reserved words, and all dialects are collectively known as BASIC. At the very least, a file with the extension .bas and line numbering should be labeled as BASIC rather than Visual Basic .NET or VBA. Therefore, I have added a BASIC language along with an appropriate grammar and sample, and I have added a heuristic to check for line numbering.

Checklist

@zspitz
Copy link
Contributor

zspitz commented Jan 31, 2021

Your query searches for GOTO, but AFAICT the search is case-insensitive. GoTo is a keyword (albeit an infrequently used one) in VBA and VB.NET.

Do members of the BASIC family generally use all-caps GOTO? Would it be worth adding GOTO to the heuristic for BASIC languages and GoTo for VBA and VB.NET, as a last-case heuristic?

@telnet23
Copy link
Contributor Author

@zspitz Correct, the GitHub search is case-insensitive, which is why I also included 10 20 30 in the search. Line numbers in BASIC programs are often (but certainly not always) chosen to be multiples of 10. The search is not all-inclusive but it does provide clear evidence that BASIC programs have been incorrectly labeled as Visual Basic .NET or VBA.

Some dialects of BASIC are case-insensitive while others are case-sensitive, requiring uppercase keywords. Even in dialects of BASIC that are case-insensitive, programs are sometimes written entirely in uppercase anyway.

@telnet23
Copy link
Contributor Author

telnet23 commented Apr 2, 2021

@lildude Any update on this pull request?

@lildude
Copy link
Member

lildude commented Apr 2, 2021

@lildude Any update on this pull request?

I was waiting for you to address the failing tests as the PR isn't complete whilst they're failing.

@telnet23
Copy link
Contributor Author

telnet23 commented Apr 2, 2021

@lildude OK, all checks have passed now.

Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🙇

@lildude lildude merged commit 8b1f601 into github-linguist:master Apr 6, 2021
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants