diff options
| author | Neil <nyamatongwe@gmail.com> | 2014-01-08 13:50:22 +1100 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2014-01-08 13:50:22 +1100 | 
| commit | d34c7a075649b4b4e9b4ee4c4287acf74dbf7169 (patch) | |
| tree | b7a3602ab349506c1081d14cc9a52ae50456b322 | |
| parent | 38e38ba14e753b2c7d2f5fc2ed62e4991a28c703 (diff) | |
| download | scintilla-mirror-d34c7a075649b4b4e9b4ee4c4287acf74dbf7169.tar.gz | |
Feature [feature-requests:#1041]. Highlight hex, octal, and binary numbers in FreeBASIC
which use the prefixes &h, &o and &b respectively.
From Ebben.
| -rw-r--r-- | doc/ScintillaHistory.html | 6 | ||||
| -rw-r--r-- | lexers/LexBasic.cxx | 4 | 
2 files changed, 8 insertions, 2 deletions
| diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 23b4ca27d..d7710bf30 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -439,6 +439,7 @@  	<td>Thomas Martitz</td>  	<td>felix</td>  	<td>Christian Walther</td> +	<td>Ebben</td>      </tr>      </table>      <p> @@ -461,6 +462,11 @@  	Added DropSelectionN API to drop a selection from a multiple selection.  	</li>  	<li> +	Basic lexer highlights hex, octal, and binary numbers in FreeBASIC which use the prefixes +	&h, &o and &b respectively. +	<a href="http://sourceforge.net/p/scintilla/feature-requests/1041/">Feature #1041.</a> +	</li> +	<li>  	C++ lexer fixes bug where keyword followed immediately by quoted string continued  	keyword style.  	<a href="http://sourceforge.net/p/scintilla/bugs/1564/">Bug #1564</a>. diff --git a/lexers/LexBasic.cxx b/lexers/LexBasic.cxx index 55285201f..b73fac8b6 100644 --- a/lexers/LexBasic.cxx +++ b/lexers/LexBasic.cxx @@ -445,9 +445,9 @@ void SCI_METHOD LexerBasic::Lex(unsigned int startPos, int length, int initStyle  				sc.SetState(SCE_B_STRING);  			} else if (IsDigit(sc.ch)) {  				sc.SetState(SCE_B_NUMBER); -			} else if (sc.Match('$')) { +			} else if (sc.Match('$') || sc.Match("&h") || sc.Match("&H") || sc.Match("&o") || sc.Match("&O")) {  				sc.SetState(SCE_B_HEXNUMBER); -			} else if (sc.Match('%')) { +			} else if (sc.Match('%') || sc.Match("&b") || sc.Match("&B")) {  				sc.SetState(SCE_B_BINNUMBER);  			} else if (sc.Match('#')) {  				sc.SetState(SCE_B_CONSTANT); | 
