aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CharClassify.h
diff options
context:
space:
mode:
authorColomban Wendling <ban@herbesfolles.org>2013-11-18 17:44:22 +0100
committerColomban Wendling <ban@herbesfolles.org>2013-11-18 17:44:22 +0100
commit301a3ab4b84a95529db69c1b09f452b04dfb3da9 (patch)
treeed455de2bd0e257ec6fd049ec6b5a568a1e00a38 /src/CharClassify.h
parentc715e9dfc7da16a645ae75b57367155ed56061d5 (diff)
downloadscintilla-mirror-301a3ab4b84a95529db69c1b09f452b04dfb3da9.tar.gz
Bash: fix comment detection inside a word
A comment in bash is defined as "[...] a word beginning with # causes that word and all remaining characters on that line to be ignored". A word is defined as "a sequence of characters considered as a single unit by the shell"; and there is a set of metacharacters defined as "a character that, when unquoted, separates words. One of the following: | & ; ( ) < > space tab". In practice, "foo#bar" is one single word, not "foo" followed by a comment. Trickier, "foo\;#bar" is also a single word, but "foo;bar" are 2 words and a control character. So, fix the Bash lexer to check whether the character preceding the hash sign to be either a metacharacter or part of a word. A maybe better fix would be to understand the Bash conception of a word, and analyze those, but it would require a large rewrite.
Diffstat (limited to 'src/CharClassify.h')
0 files changed, 0 insertions, 0 deletions