aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexBash.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2005-11-08 01:30:39 +0000
committernyamatongwe <unknown>2005-11-08 01:30:39 +0000
commit3dbaf18f481bce2f7d7a79e38469fd9ec32450e9 (patch)
tree8bd40b98201ddf262dea3fa62d11a371a684f570 /src/LexBash.cxx
parentb652296c5931c363cff6da18addc5616c95a8a8b (diff)
downloadscintilla-mirror-3dbaf18f481bce2f7d7a79e38469fd9ec32450e9.tar.gz
Patch from Kein-Hong Man allows here docs with double quoted
delimiters and ! as a delimiter.
Diffstat (limited to 'src/LexBash.cxx')
-rw-r--r--src/LexBash.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/LexBash.cxx b/src/LexBash.cxx
index 64c9bad2a..903d793bb 100644
--- a/src/LexBash.cxx
+++ b/src/LexBash.cxx
@@ -445,7 +445,7 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
HereDoc.Quoted = false;
HereDoc.DelimiterLength = 0;
HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0';
- if (chNext == '\'') { // a quoted here-doc delimiter (' only)
+ if (chNext == '\'' || chNext == '\"') { // a quoted here-doc delimiter (' or ")
i++;
ch = chNext;
chNext = chNext2;
@@ -454,8 +454,9 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
HereDoc.Indent = true;
HereDoc.State = 0;
} else if (isalpha(chNext) || chNext == '_' || chNext == '\\'
- || chNext == '-' || chNext == '+') {
+ || chNext == '-' || chNext == '+' || chNext == '!') {
// an unquoted here-doc delimiter, no special handling
+ // TODO check what exactly bash considers part of the delim
} else if (chNext == '<') { // HERE string <<<
i++;
ch = chNext;
@@ -489,7 +490,7 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0';
}
} else { // an unquoted here-doc delimiter
- if (isalnum(ch) || ch == '_' || ch == '-' || ch == '+') {
+ if (isalnum(ch) || ch == '_' || ch == '-' || ch == '+' || ch == '!') {
HereDoc.Delimiter[HereDoc.DelimiterLength++] = ch;
HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0';
} else if (ch == '\\') {