diff options
Diffstat (limited to 'src/LexAda.cxx')
| -rw-r--r-- | src/LexAda.cxx | 21 | 
1 files changed, 11 insertions, 10 deletions
diff --git a/src/LexAda.cxx b/src/LexAda.cxx index f6c9e7ee7..654bfbeba 100644 --- a/src/LexAda.cxx +++ b/src/LexAda.cxx @@ -10,6 +10,8 @@  #include <string.h>  #include <stdio.h> +#include <string> +  #include "Platform.h"  #include "Accessor.h" @@ -17,7 +19,6 @@  #include "PropSet.h"  #include "KeyWords.h"  #include "SciLexer.h" -#include "SString.h"  #ifdef SCI_NAMESPACE  using namespace Scintilla; @@ -62,8 +63,8 @@ static inline bool IsDelimiterCharacter(int ch);  static inline bool IsNumberStartCharacter(int ch);  static inline bool IsNumberCharacter(int ch);  static inline bool IsSeparatorOrDelimiterCharacter(int ch); -static bool IsValidIdentifier(const SString& identifier); -static bool IsValidNumber(const SString& number); +static bool IsValidIdentifier(const std::string& identifier); +static bool IsValidNumber(const std::string& number);  static inline bool IsWordStartCharacter(int ch);  static inline bool IsWordCharacter(int ch); @@ -117,7 +118,7 @@ static void ColouriseLabel(StyleContext& sc, WordList& keywords, bool& apostroph  	sc.Forward();  	sc.Forward(); -	SString identifier; +	std::string identifier;  	while (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) {  		identifier += static_cast<char>(tolower(sc.ch)); @@ -144,7 +145,7 @@ static void ColouriseLabel(StyleContext& sc, WordList& keywords, bool& apostroph  static void ColouriseNumber(StyleContext& sc, bool& apostropheStartsAttribute) {  	apostropheStartsAttribute = true; -	SString number; +	std::string number;  	sc.SetState(SCE_ADA_NUMBER);  	// Get all characters up to a delimiter or a separator, including points, but excluding @@ -192,7 +193,7 @@ static void ColouriseWord(StyleContext& sc, WordList& keywords, bool& apostrophe  	apostropheStartsAttribute = true;  	sc.SetState(SCE_ADA_IDENTIFIER); -	SString word; +	std::string word;  	while (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) {  		word += static_cast<char>(tolower(sc.ch)); @@ -321,7 +322,7 @@ static inline bool IsSeparatorOrDelimiterCharacter(int ch) {  	return IsASpace(ch) || IsDelimiterCharacter(ch);  } -static bool IsValidIdentifier(const SString& identifier) { +static bool IsValidIdentifier(const std::string& identifier) {  	// First character can't be '_', so initialize the flag to true  	bool lastWasUnderscore = true; @@ -355,8 +356,8 @@ static bool IsValidIdentifier(const SString& identifier) {  	return true;  } -static bool IsValidNumber(const SString& number) { -	int hashPos = number.search("#"); +static bool IsValidNumber(const std::string& number) { +	size_t hashPos = number.find("#");  	bool seenDot = false;  	size_t i = 0; @@ -366,7 +367,7 @@ static bool IsValidNumber(const SString& number) {  		return false; // Just in case  	// Decimal number -	if (hashPos == -1) { +	if (hashPos == std::string::npos) {  		bool canBeSpecial = false;  		for (; i < length; i++) {  | 
