From b68e3e3b77b19d48069ec819c2568160e0418ec1 Mon Sep 17 00:00:00 2001 From: Ben S Date: Sun, 9 Nov 2014 20:19:55 +0000 Subject: [PATCH] Allow decimal points in numbers --- rust.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rust.mm b/rust.mm index 22fcac6..56b1811 100644 --- a/rust.mm +++ b/rust.mm @@ -161,7 +161,7 @@ SInt32 skipNumber(BBLMTextIterator &iter) while ((ch = iter.GetNextChar())) { - if (isdigit(ch) || (ch == '_' && length > 0)) + if (isdigit(ch) || ((ch == '_' || ch == '.') && length > 0)) { length++; } @@ -581,7 +581,8 @@ static bool isSpecialKind(NSString* kind) || [kBBLMLineCommentRunKind isEqualToString:kind] || [identifierColour isEqualToString:kind] || [attributeColour isEqualToString:kind] - || [lifetimeColour isEqualToString:kind]; + || [lifetimeColour isEqualToString:kind] + || [functionColour isEqualToString:kind]; } OSErr adjustRange(BBLMParamBlock ¶ms, const BBLMCallbackBlock &callbacks)