Skip to content

Commit

Permalink
Update SQL keywords and function list to MySQL 8.0 and MariaDB 10.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Jul 21, 2018
1 parent 04124d6 commit cfc0e0a
Show file tree
Hide file tree
Showing 4 changed files with 792 additions and 531 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
* javap
* Jasmin
* SQL Query
* [MySQL](../master/tools/lang/MySQL.sql), up to 5.7.
* [MySQL](../master/tools/lang/MySQL.sql), up to MySQL 8.0, MariaDB 10.3.
* [SQLite3](../master/tools/lang/SQLite3.sql)
* TCL
* Texinfo
Expand Down Expand Up @@ -137,7 +137,7 @@
* Python Script
* PHP Script
* SQL Query
* [MySQL](../master/tools/lang/MySQL.sql), up to 5.7.
* [MySQL](../master/tools/lang/MySQL.sql), up to MySQL 8.0, MariaDB 10.3.
* [SQLite3](../master/tools/lang/SQLite3.sql)
* Syntax highlighting for function and type for C/C++ family language
* Syntax highlighting for annotation for Java like JVM based language
Expand Down
9 changes: 7 additions & 2 deletions scintilla/lexers/LexSQL.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,17 @@ static void ColouriseSqlDoc(Sci_PositionU startPos, Sci_Position length, int ini
if (!IsSqlWordChar(sc.ch, sqlAllowDottedWord)) {
int nextState = SCE_SQL_DEFAULT;
char s[128];
char chNext = LexGetNextChar(sc.currentPos, styler);
sc.GetCurrentLowered(s, sizeof(s));
if (keywords1.InList(s)) {
sc.ChangeState(SCE_SQL_WORD);
if (chNext == '(' && strcmp(s, "repeat") == 0) {
sc.ChangeState(SCE_SQL_USER1);
} else {
sc.ChangeState(SCE_SQL_WORD);
}
} else if (keywords2.InList(s)) {
sc.ChangeState(SCE_SQL_WORD2);
} else if (LexGetNextChar(sc.currentPos, styler) == '(' && kw_user1.InListAbbreviated(s, '(')) {
} else if (chNext == '(' && kw_user1.InListAbbreviated(s, '(')) {
sc.ChangeState(SCE_SQL_USER1);
}
//} else if (kw_sqlplus.InListAbbreviated(s, '~')) {
Expand Down

0 comments on commit cfc0e0a

Please sign in to comment.