diff options
| author | nyamatongwe <unknown> | 2006-03-06 05:38:25 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2006-03-06 05:38:25 +0000 | 
| commit | afbd028b5593886324e202ca080bd00599debfe9 (patch) | |
| tree | b99de08cb3ea5b5b91619e0c135a3c3403002b8a /src | |
| parent | 9ee695e6c7114ca8e312d0407640d3da852e5eaf (diff) | |
| download | scintilla-mirror-afbd028b5593886324e202ca080bd00599debfe9.tar.gz | |
Update for Inno Setup from RFE 1414894.
Diffstat (limited to 'src')
| -rw-r--r-- | src/LexInno.cxx | 21 | 
1 files changed, 11 insertions, 10 deletions
diff --git a/src/LexInno.cxx b/src/LexInno.cxx index 9b500f069..ff99da7e4 100644 --- a/src/LexInno.cxx +++ b/src/LexInno.cxx @@ -62,7 +62,7 @@ static void ColouriseInnoDoc(unsigned int startPos, int length, int, WordList *k  				if (ch == ';' && isBOLWS) {  					// Start of a comment  					state = SCE_INNO_COMMENT; -				} else if (ch == '[' && isBOL) { +				} else if (ch == '[' && isBOLWS) {  					// Start of a section name  					bufferCount = 0;  					state = SCE_INNO_SECTION; @@ -72,7 +72,8 @@ static void ColouriseInnoDoc(unsigned int startPos, int length, int, WordList *k  				} else if (ch == '{' && chNext == '#') {  					// Start of a preprocessor inline directive  					state = SCE_INNO_PREPROC_INLINE; -				} else if (ch == '{' && (chNext == ' ' || chNext == '\t')) { +				} else if ((ch == '{' && (chNext == ' ' || chNext == '\t')) +					   || (ch == '(' && chNext == '*')) {  					// Start of a Pascal comment  					state = SCE_INNO_COMMENT_PASCAL;  				} else if (ch == '"') { @@ -81,7 +82,7 @@ static void ColouriseInnoDoc(unsigned int startPos, int length, int, WordList *k  				} else if (ch == '\'') {  					// Start of a single-quote string  					state = SCE_INNO_STRING_SINGLE; -				} else if (isascii(ch) && isalpha(ch)) { +				} else if (isascii(ch) && (isalpha(ch) || (ch == '_'))) {  					// Start of an identifier  					bufferCount = 0;  					buffer[bufferCount++] = static_cast<char>(tolower(ch)); @@ -100,17 +101,17 @@ static void ColouriseInnoDoc(unsigned int startPos, int length, int, WordList *k  				break;  			case SCE_INNO_IDENTIFIER: -				if (isascii(ch) && isalnum(ch)) { +				if (isascii(ch) && (isalnum(ch) || (ch == '_'))) {  					buffer[bufferCount++] = static_cast<char>(tolower(ch));  				} else {  					state = SCE_INNO_DEFAULT;  					buffer[bufferCount] = '\0'; -					// Check if the buffer contains a keyword or parameter -					if (ch == ':' && parameterKeywords.InList(buffer)) { -						styler.ColourTo(i-1,SCE_INNO_PARAMETER); -					} else if (standardKeywords.InList(buffer)) { +					// Check if the buffer contains a keyword +					if (standardKeywords.InList(buffer)) {  						styler.ColourTo(i-1,SCE_INNO_KEYWORD); +					} else if (parameterKeywords.InList(buffer)) { +						styler.ColourTo(i-1,SCE_INNO_PARAMETER);  					} else if (pascalKeywords.InList(buffer)) {  						styler.ColourTo(i-1,SCE_INNO_KEYWORD_PASCAL);  					} else if (userKeywords.InList(buffer)) { @@ -136,7 +137,7 @@ static void ColouriseInnoDoc(unsigned int startPos, int length, int, WordList *k  					} else {  						styler.ColourTo(i,SCE_INNO_DEFAULT);  					} -				} else if (isascii(ch) && isalpha(ch)) { +				} else if (isascii(ch) && (isalnum(ch) || (ch == '_'))) {  					buffer[bufferCount++] = static_cast<char>(tolower(ch));  				} else {  					state = SCE_INNO_DEFAULT; @@ -193,7 +194,7 @@ static void ColouriseInnoDoc(unsigned int startPos, int length, int, WordList *k  				break;  			case SCE_INNO_COMMENT_PASCAL: -				if (ch == '}') { +				if (ch == '}' || (ch == ')' && chPrev == '*')) {  					state = SCE_INNO_DEFAULT;  					styler.ColourTo(i,SCE_INNO_COMMENT_PASCAL);  				} else if (isEOL) {  | 
