aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSiegeLord <slabode@aim.com>2013-12-21 11:20:47 -0500
committerSiegeLord <slabode@aim.com>2013-12-21 11:20:47 -0500
commit3feafde0de295fa5a9e156aa7231df203b31b40d (patch)
tree950f7b22f709006736bb50e4b415a3f95698d560
parent843f3614503db17a312cf79a546317eff5fd2f91 (diff)
downloadscintilla-mirror-3feafde0de295fa5a9e156aa7231df203b31b40d.tar.gz
rust: NULL is a valid Rust source character, so do not explicitly consider it as an error state.
-rw-r--r--lexers/LexRust.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/lexers/LexRust.cxx b/lexers/LexRust.cxx
index 8fd0b0867..d86b659a5 100644
--- a/lexers/LexRust.cxx
+++ b/lexers/LexRust.cxx
@@ -467,7 +467,7 @@ static void ResumeBlockComment(Accessor &styler, int& pos, int max, CommentState
} else {
any_non_asterisk = true;
}
- if (c == '\0' || pos >= max) {
+ if (pos >= max) {
if (state == DocComment || (state == UnknownComment && maybe_doc_comment))
styler.ColourTo(pos - 1, SCE_RUST_COMMENTBLOCKDOC);
else
@@ -507,7 +507,7 @@ static void ResumeLineComment(Accessor &styler, int& pos, int max, CommentState
}
bool non_white_space = false;
- while (pos < max && c != '\n' && c != '\0') {
+ while (pos < max && c != '\n') {
if (!IsWhitespace(c))
non_white_space = true;
if (pos == styler.LineEnd(styler.GetLine(pos)))
@@ -538,7 +538,7 @@ static void ResumeString(Accessor &styler, int& pos, int max) {
int c = styler.SafeGetCharAt(pos, '\0');
bool error = false;
while (c != '"' && !error) {
- if (c == '\0' || pos >= max) {
+ if (pos >= max) {
error = true;
break;
}
@@ -589,7 +589,7 @@ static void ResumeRawString(Accessor &styler, int& pos, int max, int num_hashes)
styler.ColourTo(pos - 1, SCE_RUST_STRINGR);
break;
}
- } else if (c == '\0' || pos >= max) {
+ } else if (pos >= max) {
styler.ColourTo(pos - 1, SCE_RUST_STRINGR);
break;
} else {