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
commit423b71c92cce374b886ed226e2f57c37a2560d72 (patch)
tree884e79dfef7739595573fa2e188567b4115cf085 /lexers/LexRust.cxx
parent0da64693cf9132a2feb628e47c61b2df1c00d9a9 (diff)
downloadscintilla-mirror-423b71c92cce374b886ed226e2f57c37a2560d72.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.
*/