From d8db03d10a2f335eacd6208e54e2722341cb7629 Mon Sep 17 00:00:00 2001 From: SiegeLord Date: Tue, 29 Jul 2014 11:58:21 -0400 Subject: Rust: Update hashbang comment syntax. Hashbang comments that start with the following 3 characters: #![ do not count as hashbang comments, but rather some other syntax (inner attribute). --- lexers/LexRust.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lexers/LexRust.cxx') diff --git a/lexers/LexRust.cxx b/lexers/LexRust.cxx index 8a3020532..0d1106849 100644 --- a/lexers/LexRust.cxx +++ b/lexers/LexRust.cxx @@ -645,7 +645,7 @@ void SCI_METHOD LexerRust::Lex(unsigned int startPos, int length, int initStyle, int n = styler.SafeGetCharAt(pos + 1, '\0'); int n2 = styler.SafeGetCharAt(pos + 2, '\0'); - if (pos == 0 && c == '#' && n == '!') { + if (pos == 0 && c == '#' && n == '!' && n2 != '[') { pos += 2; ResumeLineComment(styler, pos, max, NotDocComment); } else if (IsWhitespace(c)) { -- cgit v1.2.3