diff options
| author | nyamatongwe <devnull@localhost> | 2010-10-31 20:12:36 +1100 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2010-10-31 20:12:36 +1100 | 
| commit | 7481e4e62733fdbd1b684a2368505963dc60913a (patch) | |
| tree | b2b9534eeb195bec4b704178e02a066f7ae52315 | |
| parent | b6b05245a0ec38cca368f33ae344f4990bb23ee8 (diff) | |
| download | scintilla-mirror-7481e4e62733fdbd1b684a2368505963dc60913a.tar.gz | |
Feature request #3098071. Property to turn off '#' as comment start in SQL.
| -rw-r--r-- | doc/ScintillaHistory.html | 1 | ||||
| -rw-r--r-- | lexers/LexSQL.cxx | 7 | 
2 files changed, 7 insertions, 1 deletions
| diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 9d0cc32d6..dad037e23 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -357,6 +357,7 @@  	<td>Sam Rawlins</td>        </tr><tr>  	<td>Michael Mullin</td> +	<td>Carlos SS</td>      </tr>      </table>      <p> diff --git a/lexers/LexSQL.cxx b/lexers/LexSQL.cxx index 6ec32d04d..1375af5cb 100644 --- a/lexers/LexSQL.cxx +++ b/lexers/LexSQL.cxx @@ -70,6 +70,11 @@ static void ColouriseSQLDoc(unsigned int startPos, int length, int initStyle, Wo  	bool sqlBackslashEscapes = styler.GetPropertyInt("sql.backslash.escapes", 0) != 0;  	bool sqlBackticksIdentifier = styler.GetPropertyInt("lexer.sql.backticks.identifier", 0) != 0; + +	// property lexer.sql.numbersign.comment +	//  If "lexer.sql.numbersign.comment" property is set to 0 a line beginning with '#' will not be a comment. +	bool sqlNumbersignComment = styler.GetPropertyInt("lexer.sql.numbersign.comment", 1) != 0; +  	int styleBeforeDCKeyword = SCE_SQL_DEFAULT;  	for (; sc.More(); sc.Forward()) {  		// Determine if the current state should terminate. @@ -206,7 +211,7 @@ static void ColouriseSQLDoc(unsigned int startPos, int length, int initStyle, Wo  				// Perhaps we should enforce that with proper property:  //~ 			} else if (sc.Match("-- ")) {  				sc.SetState(SCE_SQL_COMMENTLINE); -			} else if (sc.ch == '#') { +			} else if (sc.ch == '#' && sqlNumbersignComment) {  				sc.SetState(SCE_SQL_COMMENTLINEDOC);  			} else if (sc.ch == '\'') {  				sc.SetState(SCE_SQL_CHARACTER); | 
