aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2009-09-04 13:05:11 +0000
committernyamatongwe <unknown>2009-09-04 13:05:11 +0000
commitc872aaf71dfe7656a65bd21047f757d8a8b3ae82 (patch)
treea8950c41d144d986bd0f4ffd13a66c7373cac3e7 /src
parentd9b50ef1a69897f0465df61ab4592ee3e40db926 (diff)
downloadscintilla-mirror-c872aaf71dfe7656a65bd21047f757d8a8b3ae82.tar.gz
Keyword spotting in MySQL highlighter/folder now uses the current position.
Diffstat (limited to 'src')
-rw-r--r--src/LexMySQL.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/LexMySQL.cxx b/src/LexMySQL.cxx
index f29a183cd..e8496ceea 100644
--- a/src/LexMySQL.cxx
+++ b/src/LexMySQL.cxx
@@ -361,7 +361,7 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
// Not really a standard, but we add support for single line comments
// with special curly braces syntax as foldable comments too.
// MySQL needs -- comments to be followed by space or control char
- if (styler.Match(startPos, "--"))
+ if (styler.Match(i, "--"))
{
char chNext2 = styler.SafeGetCharAt(i + 2);
char chNext3 = styler.SafeGetCharAt(i + 3);
@@ -394,12 +394,12 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
// Reserved and other keywords.
if (style != stylePrev)
{
- bool beginFound = MatchIgnoreCase(styler, startPos, "begin");
- bool ifFound = MatchIgnoreCase(styler, startPos, "if");
- bool thenFound = MatchIgnoreCase(styler, startPos, "then");
- bool whileFound = MatchIgnoreCase(styler, startPos, "while");
- bool loopFound = MatchIgnoreCase(styler, startPos, "loop");
- bool repeatFound = MatchIgnoreCase(styler, startPos, "repeat");
+ bool beginFound = MatchIgnoreCase(styler, i, "begin");
+ bool ifFound = MatchIgnoreCase(styler, i, "if");
+ bool thenFound = MatchIgnoreCase(styler, i, "then");
+ bool whileFound = MatchIgnoreCase(styler, i, "while");
+ bool loopFound = MatchIgnoreCase(styler, i, "loop");
+ bool repeatFound = MatchIgnoreCase(styler, i, "repeat");
if (!foldOnlyBegin && endFound && (ifFound || whileFound || loopFound))
{
@@ -413,7 +413,7 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
// will be increased later, if not, then at eol.
}
else
- if (!foldOnlyBegin && MatchIgnoreCase(styler, startPos, "else"))
+ if (!foldOnlyBegin && MatchIgnoreCase(styler, i, "else"))
{
levelNext--;
elseFound = true;
@@ -430,7 +430,7 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
if (ifFound)
elseFound = false;
else
- if (MatchIgnoreCase(styler, startPos, "when"))
+ if (MatchIgnoreCase(styler, i, "when"))
whenFound = true;
else
{
@@ -445,7 +445,7 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
levelNext++;
}
else
- if (MatchIgnoreCase(styler, startPos, "end"))
+ if (MatchIgnoreCase(styler, i, "end"))
{
// Multiple "end" in a row are counted multiple times!
if (endFound)