Permalink
Browse files

Handle T_ERROR properly in highlighter

  • Loading branch information...
aelliott committed Feb 17, 2012
1 parent 81b9b64 commit ea6fcaa07a2d803ea2c6fc6cadbd64cd33c83213
Showing with 3 additions and 0 deletions.
  1. +3 −0 expressionhighlighter.cpp
@@ -88,6 +88,7 @@ void ExpressionHighlighter::highlightBlock(const QString &text)
case T_NOT_SPACE:
setFormat(pos, value.length(), escapedFormat);
break;
+ case T_ALTERNATION:
case T_STARTING_POSITION:
case T_ENDING_POSITION:
case T_ANY_CHARACTER:
@@ -137,6 +138,8 @@ void ExpressionHighlighter::highlightBlock(const QString &text)
setFormat(pos + value.length() - 1, 1, braceFormat);
break;
case T_ERROR:
+ setFormat(pos, value.length(), errorFormat);
+ break;
default:
setFormat(pos, value.length(), normal);
}

0 comments on commit ea6fcaa

Please sign in to comment.