LanguageDev / Yoakke

A collection of libraries for implementing compilers in .NET.
https://languagedev.github.io/Yoakke/
Apache License 2.0
143 stars 7 forks source link

Ability to disable Cyrillic and other non Latin characters in C syntax #116

Closed kant2002 closed 2 years ago

kant2002 commented 2 years ago

Also add same tests for Regex lexer.

ForNeVeR commented 2 years ago

To be honest, I would vote against this. C standard allows the implementations to accept additional characters outside of basic ANSI letters, so the current implementation (before this PR) is a. Perfectly valid according to the modern standard's letter b. Usable c. I would even say "expected" of a modern programming language

LPeter1997 commented 2 years ago

Having an option to enable/disable this is not unreasonable. If we had a flag to disable non-ASCII characters, I'd accept this. I believe the default should just accept any character-set, as most implementations that I know of also have no problem with this.

kant2002 commented 2 years ago

What should I do to please SonarCube?

LPeter1997 commented 2 years ago

@kant2002 Don't worry about Sonar, it will be turned off soon as it causes more pain than help. Thank you so much for the contribution!