You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The identifier module' triggers the syntax highlighting associated with the normal module keyword, even though the inclusion of the prime/single-quote symbol should turn it into an ordinary, non-reserved identifier. Importantly, all text after the identifier module' is highlighted as though it were part of a module declaration, which can seriously break syntax highlighting on large parts of valid source files.
Here's an example of the incorrect syntax highlighting for the identifier module':
And an example of correct syntax highlighting for the identifier module_:
The text was updated successfully, but these errors were encountered:
exists-forall
changed the title
module' is not recognized as a non-reserved identifier
module' ("module-prime") is incorrectly highlight as a keyword
Jun 26, 2017
exists-forall
changed the title
module' ("module-prime") is incorrectly highlight as a keyword
module' ("module" then a "prime" symbol) is incorrectly highlight as a keyword
Jun 26, 2017
The problem is this line \b(module)\b where it requires a word end after module. The problem is that the regex implementation does not recognise the ' as a word character.
I assume the same (or a similar one would be present if you tried using import' as an identifier or let').
I assume something like (\b(?!')) might fix it.
That regex fixed it. I also applied the same technique to all other keywords like let', import' etc.
I'd appreciate if you can check that it I got them all.
The identifier
module'
triggers the syntax highlighting associated with the normalmodule
keyword, even though the inclusion of the prime/single-quote symbol should turn it into an ordinary, non-reserved identifier. Importantly, all text after the identifiermodule'
is highlighted as though it were part of a module declaration, which can seriously break syntax highlighting on large parts of valid source files.Here's an example of the incorrect syntax highlighting for the identifier
module'
:And an example of correct syntax highlighting for the identifier
module_
:The text was updated successfully, but these errors were encountered: