diff options
author | nyamatongwe <devnull@localhost> | 2005-10-20 00:25:10 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2005-10-20 00:25:10 +0000 |
commit | f41ed06745d208c36556ea66ae6a54f0eb607fef (patch) | |
tree | c744d8cc489178009bd830ae0b606722d77bc50a /src | |
parent | 37fe6daa20b6640a1fb34735b4d73bb3537973eb (diff) | |
download | scintilla-mirror-f41ed06745d208c36556ea66ae6a54f0eb607fef.tar.gz |
Patch from Iago allows backtick quoted identifiers for MySQL.
Diffstat (limited to 'src')
-rw-r--r-- | src/LexSQL.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/LexSQL.cxx b/src/LexSQL.cxx index dc4c7a804..6f2a703fb 100644 --- a/src/LexSQL.cxx +++ b/src/LexSQL.cxx @@ -109,6 +109,7 @@ static void ColouriseSQLDoc(unsigned int startPos, int length, bool fold = styler.GetPropertyInt("fold") != 0; bool sqlBackslashEscapes = styler.GetPropertyInt("sql.backslash.escapes", 0) != 0; + bool sqlBackticksString = styler.GetPropertyInt("sql.backticks.string", 0) != 0; int lineCurrent = styler.GetLine(startPos); int spaceFlags = 0; @@ -169,7 +170,7 @@ static void ColouriseSQLDoc(unsigned int startPos, int length, } else if (ch == '\'') { styler.ColourTo(i - 1, state); state = SCE_SQL_CHARACTER; - } else if (ch == '"') { + } else if (ch == '"' || (sqlBackticksString && ch == 0x60)) { styler.ColourTo(i - 1, state); state = SCE_SQL_STRING; } else if (isoperator(ch)) { @@ -192,7 +193,7 @@ static void ColouriseSQLDoc(unsigned int startPos, int length, state = SCE_SQL_COMMENTLINEDOC; } else if (ch == '\'') { state = SCE_SQL_CHARACTER; - } else if (ch == '"') { + } else if (ch == '"' || (sqlBackticksString && ch == 0x60)) { state = SCE_SQL_STRING; } else if (isoperator(ch)) { styler.ColourTo(i, SCE_SQL_OPERATOR); @@ -261,7 +262,7 @@ static void ColouriseSQLDoc(unsigned int startPos, int length, chNext = styler.SafeGetCharAt(i + 1); } } else if (state == SCE_SQL_STRING) { - if (ch == '"') { + if (ch == '"' || (sqlBackticksString && ch == 0x60)) { if (chNext == '"') { i++; } else { @@ -290,7 +291,7 @@ static void ColouriseSQLDoc(unsigned int startPos, int length, state = SCE_SQL_SQLPLUS_PROMPT; } else if (ch == '\'') { state = SCE_SQL_CHARACTER; - } else if (ch == '"') { + } else if (ch == '"' || (sqlBackticksString && ch == 0x60)) { state = SCE_SQL_STRING; } else if (iswordstart(ch)) { state = SCE_SQL_WORD; |