aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexRust.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-01-22 12:31:05 +1100
committerNeil <nyamatongwe@gmail.com>2015-01-22 12:31:05 +1100
commit2b780ca53f10ecf514fe962088dd64054c2f8f61 (patch)
tree966ad530b308c8bb873946f3d6c4d2124ec11e75 /lexers/LexRust.cxx
parent1b3dd73be71d3b4f4575a8d1c44ec06ef039f604 (diff)
downloadscintilla-mirror-2b780ca53f10ecf514fe962088dd64054c2f8f61.tar.gz
Feature [feature-requests:#1098]. Accept `is`/`us` integer suffixes instead of
`i`/`u`. From Mika Attila.
Diffstat (limited to 'lexers/LexRust.cxx')
-rw-r--r--lexers/LexRust.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/lexers/LexRust.cxx b/lexers/LexRust.cxx
index 3b1201c7f..80ec014ca 100644
--- a/lexers/LexRust.cxx
+++ b/lexers/LexRust.cxx
@@ -271,7 +271,7 @@ static void ScanNumber(Accessor& styler, int& pos) {
pos++;
c = styler.SafeGetCharAt(pos, '\0');
n = styler.SafeGetCharAt(pos + 1, '\0');
- if (c == '8') {
+ if (c == '8' || c == 's') {
pos++;
} else if (c == '1' && n == '6') {
pos += 2;
@@ -279,6 +279,8 @@ static void ScanNumber(Accessor& styler, int& pos) {
pos += 2;
} else if (c == '6' && n == '4') {
pos += 2;
+ } else {
+ error = true;
}
/* See if it's a floating point literal. These literals have to be base 10.
*/