aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2004-05-04 12:24:13 +0000
committernyamatongwe <unknown>2004-05-04 12:24:13 +0000
commit9fd021ae3e20a47b271b94c88e99377e557feb44 (patch)
treea8e78fd388b08f0f7a79fcd9573e3a39b888ece7 /src
parent89856486bcd877b71dab79db5575a7b393e32b4b (diff)
downloadscintilla-mirror-9fd021ae3e20a47b271b94c88e99377e557feb44.tar.gz
Support from Bruce Dodson for Lua tracebacks.
Diffstat (limited to 'src')
-rw-r--r--src/LexOthers.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/LexOthers.cxx b/src/LexOthers.cxx
index df02d16a9..1681ba5d4 100644
--- a/src/LexOthers.cxx
+++ b/src/LexOthers.cxx
@@ -528,6 +528,8 @@ static void ColouriseErrorListLine(
// Look for Microsoft <filename>(line) :message
// Look for Microsoft <filename>(line,pos)message
// Look for CTags \tmessage
+ // Look for Lua 5 traceback \t<filename>:<line>:message
+ bool initialTab = (lineBuffer[0] == '\t');
int state = 0;
for (unsigned int i = 0; i < lengthLine; i++) {
char ch = lineBuffer[i];
@@ -536,17 +538,17 @@ static void ColouriseErrorListLine(
chNext = lineBuffer[i+1];
if (state == 0) {
if (ch == ':') {
- // May be GCC
+ // May be GCC, or might be Lua 5 (Lua traceback same but with tab prefix)
if ((chNext != '\\') && (chNext != '/')) {
// This check is not completely accurate as may be on
// GTK+ with a file name that includes ':'.
state = 1;
}
- } else if ((ch == '(') && Is1To9(chNext)) {
+ } else if ((ch == '(') && Is1To9(chNext) && (!initialTab)) {
// May be Microsoft
// Check against '0' often removes phone numbers
state = 10;
- } else if (ch == '\t') {
+ } else if ((ch == '\t') && (!initialTab)) {
// May be CTags
state = 20;
}
@@ -599,7 +601,7 @@ static void ColouriseErrorListLine(
styler.ColourTo(endPos, SCE_ERR_GCC);
} else if ((state == 13) || (state == 14) || (state == 15)) {
styler.ColourTo(endPos, SCE_ERR_MS);
- } else if (((state == 22) || (state == 24)) && (lineBuffer[0] != '\t')) {
+ } else if ((state == 22) || (state == 24)) {
styler.ColourTo(endPos, SCE_ERR_CTAG);
} else {
styler.ColourTo(endPos, SCE_ERR_DEFAULT);