-
Notifications
You must be signed in to change notification settings - Fork 59
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
Modula lexer bug #129
Comments
Please add an example file that illustrates the problem. |
No example file needed. Open a new file on any Scintilla based editor (e.g: BowPad, it uses Lexilla). Set the lexer to Modula. Type HMOD into it, you will immediately see it's highlighted as HMOD. Only MOD as a standalone word should be highlighted. |
An example file is necessary to reproduce and fix the problem and then ensure that the fix is checked against future changes. Moving the onus of producing an example file onto bug fixers makes it more difficult to reproduce the bug and less likely that the bug will be addressed at all. |
If you so wanted it:
As I told you, just open a Modula-3 source file (.i3 or .m3) and type HMOD, you will see it's highlighted as HMOD. It's so simple like that, why a sample file is even needed? Always asking for a sample file is an overly too rigid discipline that really doesn't needed at all in this situation 👎 |
This appears to be a trivial fix. The keyword matching loop beginning at line 365 has an empty Lines 387 to 389 in 557d750
The author's memo here suggests he would've corrected the logic himself given more time. |
The patch appears to HMOD(* Handle of module *) = HANDLE; That doesn't occur just after keywords. |
Preventing an early exit with |
Fixed in 5.2.2. |
MOD is a keyword for modulo on both Modula-2 and Modula-3. The problem is, if MOD is part of another word, e.g: HMOD, it will also highlight MOD like this: HMOD. It should only highlight MOD when it's a standalone word!
The text was updated successfully, but these errors were encountered: