Avoid highlighting tuple indexes as numbers
This commit is contained in:
4
rust.mm
4
rust.mm
@@ -939,7 +939,9 @@ OSErr calculateRuns(BBLMParamBlock ¶ms, const BBLMCallbackBlock *callbacks)
|
|||||||
runStart = iter.Offset();
|
runStart = iter.Offset();
|
||||||
}
|
}
|
||||||
|
|
||||||
wordchr = isalpha(ch) || isdigit(ch) || ch == '_';
|
// '.' is considered a word char to avoid the "0.0" in "tuple.0.0"
|
||||||
|
// being classified as a floating-point number.
|
||||||
|
wordchr = isalpha(ch) || isdigit(ch) || ch == '_' || ch == '.';
|
||||||
}
|
}
|
||||||
|
|
||||||
makeCodeRun(iter, runStart, *callbacks);
|
makeCodeRun(iter, runStart, *callbacks);
|
||||||
|
|||||||
5
smoke.rs
5
smoke.rs
@@ -85,8 +85,11 @@
|
|||||||
5.974e24 // lowercase e
|
5.974e24 // lowercase e
|
||||||
7.348e+22 // uppercase E and plus
|
7.348e+22 // uppercase E and plus
|
||||||
|
|
||||||
|
.1234 // no leading zero (invalid)
|
||||||
|
|
||||||
let tuple = ((8, 4), 48);
|
let tuple = ((8, 4), 48);
|
||||||
let a = tuple.0.0;
|
tuple.0
|
||||||
|
tuple.0.0 // tuple indexing (not really numbers)
|
||||||
|
|
||||||
// Numeric Suffixes
|
// Numeric Suffixes
|
||||||
// ----------------
|
// ----------------
|
||||||
|
|||||||
Reference in New Issue
Block a user