diff options
author | Jad Altahan <xviyy@aol.com> | 2018-11-21 19:58:45 +1100 |
---|---|---|
committer | Jad Altahan <xviyy@aol.com> | 2018-11-21 19:58:45 +1100 |
commit | 7beaa52594e8e34e5858dff6ff99e3ec6ab63468 (patch) | |
tree | 5ea1a4a2339f2fa95b70ab7be7b987fba06ead73 | |
parent | ff40789bb65ac03c27b6c1dd889bdda57a2c2f15 (diff) | |
download | scintilla-mirror-7beaa52594e8e34e5858dff6ff99e3ec6ab63468.tar.gz |
Changes to IsNumOctal & SCE_NIM_IDENTIFIER
- Removed 0c/0C prefix in IsNumOctal(). Not supported.
- Added upper-case type suffixes in SCE_NIM_NUMBER. They are case-insensitive.
-rw-r--r-- | lexers/LexNim.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lexers/LexNim.cxx b/lexers/LexNim.cxx index 2cfc30eeb..94d179e04 100644 --- a/lexers/LexNim.cxx +++ b/lexers/LexNim.cxx @@ -203,9 +203,7 @@ static int IsNumBinary(StyleContext &sc) { } static int IsNumOctal(StyleContext &sc) { - return IsADigit(sc.chNext) - || sc.chNext == 'o' - || sc.chNext == 'c' || sc.chNext == 'C'; + return IsADigit(sc.chNext) || sc.chNext == 'o'; } static bool IsNewline(const int ch) { @@ -273,8 +271,10 @@ void SCI_METHOD LexerNim::Lex(Sci_PositionU startPos, Sci_Position length, case SCE_NIM_NUMBER: // For a type suffix, such as 0x80'u8 if (sc.ch == '\'') { - if (sc.chNext == 'i' || sc.chNext == 'u' || - sc.chNext == 'f' || sc.chNext == 'd') { + if (sc.chNext == 'i' || sc.chNext == 'I' || + sc.chNext == 'u' || sc.chNext == 'U' || + sc.chNext == 'f' || sc.chNext == 'F' || + sc.chNext == 'd' || sc.chNext == 'D') { sc.Forward(2); } } else if (sc.ch == '.') { |