diff options
| author | nyamatongwe <unknown> | 2004-07-23 23:15:51 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2004-07-23 23:15:51 +0000 | 
| commit | 65b5ea19c83b21369bfdf2d9b177d49c6c2b1e96 (patch) | |
| tree | b93507c2fd6c016ba3cb53313de3c8813a9a64e3 /src/LexHTML.cxx | |
| parent | 470be602fb2519c90bdf104f6ee0b143e6b31594 (diff) | |
| download | scintilla-mirror-65b5ea19c83b21369bfdf2d9b177d49c6c2b1e96.tar.gz | |
Patch from Jakub Vrana to allow 'e' inside numbers in PHP.
Diffstat (limited to 'src/LexHTML.cxx')
| -rw-r--r-- | src/LexHTML.cxx | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx index d2cd30f60..c7ba85b8d 100644 --- a/src/LexHTML.cxx +++ b/src/LexHTML.cxx @@ -314,7 +314,7 @@ static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &key  // Called when in a PHP word  static void classifyWordHTPHP(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {  	char chAttr = SCE_HPHP_DEFAULT; -	bool wordIsNumber = IsADigit(styler[start]); +	bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.' && start+1 <= end && IsADigit(styler[start+1]));  	if (wordIsNumber)  		chAttr = SCE_HPHP_NUMBER;  	else { @@ -1495,7 +1495,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty  			}  			break;  		case SCE_HPHP_NUMBER: -			if (!IsADigit(ch)) { +			if (!IsADigit(ch) && ch != '.' && ch != 'e' && ch != 'E' && (ch != '-' || (chPrev != 'e' && chPrev != 'E'))) {  				styler.ColourTo(i - 1, SCE_HPHP_NUMBER);  				if (isoperator(ch))  					state = SCE_HPHP_OPERATOR; @@ -1567,7 +1567,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty  		case SCE_HPHP_OPERATOR:  		case SCE_HPHP_DEFAULT:  			styler.ColourTo(i - 1, StateToPrint); -			if (IsADigit(ch)) { +			if (IsADigit(ch) || (ch == '.' && IsADigit(chNext))) {  				state = SCE_HPHP_NUMBER;  			} else if (iswordstart(ch)) {  				state = SCE_HPHP_WORD; | 
