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

DetectIdentifiers parsing decimals with suffix are considered as Identifier #300

Closed
tyl24 opened this issue Jan 3, 2024 · 1 comment · Fixed by #316
Closed

DetectIdentifiers parsing decimals with suffix are considered as Identifier #300

tyl24 opened this issue Jan 3, 2024 · 1 comment · Fixed by #316
Labels

Comments

@tyl24
Copy link

tyl24 commented Jan 3, 2024

Hello,
In the DetectIdentifiers method an expression like this one : "amount=Math.Round(455.7 * (0.2m/1000))"
considere that the decimal suffix m is an unknownIdentifier, which is wrong !
This behaviours was not the case in previous version 2.13.

In file Detector.cs, I propose to change the RegEx :IdentifiersDetectionRegex like this :
(?<id>@?(?<!\d)(?<!\dm)(?<!\df)(?<!\dd)[\p{L}\p{Nl}_][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}_]*)

@davideicardi
Copy link
Member

Thank you! If you are able to create a PR I can merge it. Otherwise I will do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants