diff options
author | SiegeLord <slabode@aim.com> | 2013-12-21 11:20:47 -0500 |
---|---|---|
committer | SiegeLord <slabode@aim.com> | 2013-12-21 11:20:47 -0500 |
commit | c6a0e3b827eb85e9c66b3db5019ed3b796f3ed5a (patch) | |
tree | 337eb8b0aa325918bf6806ceb626dff0187a1f4c | |
parent | 87ea7e131a1e67f2af76231e67057033e3d711de (diff) | |
download | scintilla-mirror-c6a0e3b827eb85e9c66b3db5019ed3b796f3ed5a.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.cxx | 8 |
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 { |