Diff of /lexers/LexMSSQL.cxx [b74b4a] .. [b8e130]  Maximize  Restore

  Switch to unified view

a/lexers/LexMSSQL.cxx b/lexers/LexMSSQL.cxx
...
...
32
#define KW_MSSQL_SYSTEM_TABLES      2
32
#define KW_MSSQL_SYSTEM_TABLES      2
33
#define KW_MSSQL_GLOBAL_VARIABLES   3
33
#define KW_MSSQL_GLOBAL_VARIABLES   3
34
#define KW_MSSQL_FUNCTIONS          4
34
#define KW_MSSQL_FUNCTIONS          4
35
#define KW_MSSQL_STORED_PROCEDURES  5
35
#define KW_MSSQL_STORED_PROCEDURES  5
36
#define KW_MSSQL_OPERATORS          6
36
#define KW_MSSQL_OPERATORS          6
37
38
static bool isMSSQLOperator(char ch) {
39
  if (IsASCII(ch) && isalnum(ch))
40
      return false;
41
  // '.' left out as it is used to make up numbers
42
  if (ch == '%' || ch == '^' || ch == '&' || ch == '*' ||
43
        ch == '-' || ch == '+' || ch == '=' || ch == '|' ||
44
        ch == '<' || ch == '>' || ch == '/' ||
45
        ch == '!' || ch == '~' || ch == '(' || ch == ')' ||
46
      ch == ',')
47
      return true;
48
  return false;
49
}
50
37
51
static char classifyWordSQL(unsigned int start,
38
static char classifyWordSQL(unsigned int start,
52
                            unsigned int end,
39
                            unsigned int end,
53
                            WordList *keywordlists[],
40
                            WordList *keywordlists[],
54
                            Accessor &styler,
41
                            Accessor &styler,
...
...
218
                state = SCE_MSSQL_COLUMN_NAME;
205
                state = SCE_MSSQL_COLUMN_NAME;
219
            } else if (ch == '[') {
206
            } else if (ch == '[') {
220
                styler.ColourTo(i - 1, SCE_MSSQL_DEFAULT);
207
                styler.ColourTo(i - 1, SCE_MSSQL_DEFAULT);
221
                prevState = state;
208
                prevState = state;
222
                state = SCE_MSSQL_COLUMN_NAME_2;
209
                state = SCE_MSSQL_COLUMN_NAME_2;
223
            } else if (isMSSQLOperator(ch)) {
210
            } else if (isoperator(ch)) {
224
                styler.ColourTo(i - 1, SCE_MSSQL_DEFAULT);
211
                styler.ColourTo(i - 1, SCE_MSSQL_DEFAULT);
225
                styler.ColourTo(i, SCE_MSSQL_OPERATOR);
212
                styler.ColourTo(i, SCE_MSSQL_OPERATOR);
226
                //~ style = SCE_MSSQL_DEFAULT;
213
                //~ style = SCE_MSSQL_DEFAULT;
227
                prevState = state;
214
                prevState = state;
228
                state = SCE_MSSQL_DEFAULT;
215
                state = SCE_MSSQL_DEFAULT;

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks