Highlighting doesn't know characters aren't strings of chars
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Highlighting doesn't know characters aren't strings of chars
Syntax highlighting doesn't seem to know that characters (unlike strings) consist of exactly one character. This is a problem in languages where ' is both a valid part of an identifier and the character delimiter - for example, it's not uncommon to see identifiers like f, f', f'' etc in Haskell where it follows a mathematical tradition and having two such identifiers on the same line messes up the highlighting.
Re: Highlighting doesn't know characters aren't strings of c
This is because in some languages a character representation consists of more than one character.PhilippaC wrote:Syntax highlighting doesn't seem to know that characters (unlike strings) consist of exactly one character.
Examples:
HTML: ä represents ä.
XML: represents a non-breakable space.
C/C++/Java: \' represents the ' character.
Many languages: \t represents the tab character.
...