github-linguist / linguist

Language Savant. If your repository's language is being reported incorrectly, send us a pull request!
MIT License
12.13k stars 4.2k forks source link

FreeBASIC support #1350

Closed ghost closed 9 years ago

ghost commented 10 years ago

It would be nice to have support for FreeBASIC.

pchaigno commented 10 years ago

If there are enough people using it on GitHub you can open a pull request. It's quite simple to add a new language, see https://github.com/github/linguist#contributing

ghost commented 10 years ago

Is there some magic involved in performing the actual syntax highlighting? Or how does it work?

pchaigno commented 10 years ago

Yes, the magic is done by Pygments :-) Linguist just handles the detection. If you want FreeBASIC to be highlighted in GitHub you'll have to make a pull request for a lexer in Pygments. Their repository in on BitBucket.

ghost commented 10 years ago

I see. There seems to be a lexer for QBasic already, so it should be easy to add FreeBASIC. I'll look into it.

pchaigno commented 10 years ago

In the meantime, if the two lexers are similar, maybe QBasic can be used in GitHub?

ghost commented 10 years ago

Sure, but we need a way to distinguish between Visual Basic and QBasic/FreeBASIC.

pchaigno commented 10 years ago

If their lexicals are sufficiently different, the Bayesian classifier should be able to distinguish them. If not, we can use heuristics but they are not enabled yet.

arfon commented 9 years ago

Closing as stale.