diff options
| author | nyamatongwe <devnull@localhost> | 2001-02-27 01:12:47 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2001-02-27 01:12:47 +0000 | 
| commit | 092d0572b39dea08d13c8a5c0f17fdbec2d99cd0 (patch) | |
| tree | 22b082b24bb31300a43cef5b26c824a7fcda3f32 /src | |
| parent | e25dda1fdca3e282f7aaf4bf5cd5068031aad57d (diff) | |
| download | scintilla-mirror-092d0572b39dea08d13c8a5c0f17fdbec2d99cd0.tar.gz | |
Patch from Philippe to regularise comments.
Diffstat (limited to 'src')
| -rw-r--r-- | src/DocumentAccessor.cxx | 26 | ||||
| -rw-r--r-- | src/KeyWords.cxx | 12 | ||||
| -rw-r--r-- | src/LexAVE.cxx | 48 | ||||
| -rw-r--r-- | src/LexCPP.cxx | 18 | ||||
| -rw-r--r-- | src/LexConf.cxx | 86 | ||||
| -rw-r--r-- | src/LexHTML.cxx | 4 | ||||
| -rw-r--r-- | src/LexLua.cxx | 8 | ||||
| -rw-r--r-- | src/LexOthers.cxx | 2 | ||||
| -rw-r--r-- | src/LexPascal.cxx | 37 | ||||
| -rw-r--r-- | src/LexPerl.cxx | 2 | ||||
| -rw-r--r-- | src/LexPython.cxx | 32 | ||||
| -rw-r--r-- | src/LexSQL.cxx | 14 | ||||
| -rw-r--r-- | src/LexVB.cxx | 14 | 
13 files changed, 154 insertions, 149 deletions
| diff --git a/src/DocumentAccessor.cxx b/src/DocumentAccessor.cxx index 9cce5d5b4..4cb90c3e4 100644 --- a/src/DocumentAccessor.cxx +++ b/src/DocumentAccessor.cxx @@ -1,4 +1,4 @@ -// SciTE - Scintilla based Text Editor +// Scintilla source code edit control  /** @file DocumentAccessor.cxx   ** Rapid easy access to contents of a Scintilla.   **/ @@ -7,7 +7,7 @@  #include <stdlib.h>  #include <string.h> -#include <ctype.h>  +#include <ctype.h>  #include <stdio.h>  #include "Platform.h" @@ -23,12 +23,12 @@  DocumentAccessor::~DocumentAccessor() {  } -#if PLAT_WIN  +#if PLAT_WIN  bool DocumentAccessor::InternalIsLeadByte(char ch) {  	if (SC_CP_UTF8 == codePage)  		// For lexing, all characters >= 0x80 are treated the  		// same so none is considered a lead byte. -		return false;	 +		return false;  	else  		return IsDBCSLeadByteEx(codePage, ch);  } @@ -38,7 +38,7 @@ bool DocumentAccessor::InternalIsLeadByte(char ch) {  bool DocumentAccessor::InternalIsLeadByte(char) {  	return false;  } -#endif  +#endif  void DocumentAccessor::Fill(int position) {  	if (lenDoc == -1) @@ -72,10 +72,10 @@ int DocumentAccessor::LevelAt(int line) {  	return pdoc->GetLevel(line);  } -int DocumentAccessor::Length() {  -	if (lenDoc == -1)  +int DocumentAccessor::Length() { +	if (lenDoc == -1)  		lenDoc = pdoc->Length(); -	return lenDoc;  +	return lenDoc;  }  int DocumentAccessor::GetLineState(int line) { @@ -134,12 +134,12 @@ void DocumentAccessor::Flush() {  int DocumentAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) {  	int end = Length();  	int spaceFlags = 0; -	 -	// Determines the indentation level of the current line and also checks for consistent  + +	// Determines the indentation level of the current line and also checks for consistent  	// indentation compared to the previous line. -	// Indentation is judged consistent when the indentation whitespace of each line lines  +	// Indentation is judged consistent when the indentation whitespace of each line lines  	// the same or the indentation of one line is a prefix of the other. -	 +  	int pos = LineStart(line);  	char ch = (*this)[pos];  	int indent = 0; @@ -166,7 +166,7 @@ int DocumentAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnI  		}  		ch = (*this)[++pos];  	} -	 +  	*flags = spaceFlags;  	indent += SC_FOLDLEVELBASE;  	// if completely empty line or the start of a comment... diff --git a/src/KeyWords.cxx b/src/KeyWords.cxx index 17c0277de..a275c1963 100644 --- a/src/KeyWords.cxx +++ b/src/KeyWords.cxx @@ -1,15 +1,15 @@ -// SciTE - Scintilla based Text Editor +// Scintilla source code edit control  /** @file KeyWords.cxx   ** Colourise for particular languages.   **/  // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>  // The License.txt file describes the conditions under which this software may be distributed. -#include <stdlib.h>  -#include <string.h>  -#include <ctype.h>  -#include <stdio.h>  -#include <stdarg.h>  +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <stdio.h> +#include <stdarg.h>  #include "Platform.h" diff --git a/src/LexAVE.cxx b/src/LexAVE.cxx index 8ef79c6a3..280ca6470 100644 --- a/src/LexAVE.cxx +++ b/src/LexAVE.cxx @@ -2,14 +2,14 @@  /** @file LexAVE.cxx   ** Lexer for Avenue.   **/ -// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org> +// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>  // The License.txt file describes the conditions under which this software may be distributed. -#include <stdlib.h>  -#include <string.h>  -#include <ctype.h>  -#include <stdio.h>  -#include <stdarg.h>  +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <stdio.h> +#include <stdarg.h>  #include "Platform.h" @@ -19,13 +19,13 @@  #include "Scintilla.h"  #include "SciLexer.h" -static void ColouriseAveDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],  +static void ColouriseAveDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],  	Accessor &styler) { -	 +  	WordList &keywords = *keywordlists[0]; -	 +  	styler.StartAt(startPos); -	 +  	bool fold = styler.GetPropertyInt("fold");  	int lineCurrent = styler.GetLine(startPos);  	int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; @@ -82,7 +82,7 @@ static void ColouriseAveDoc(unsigned int startPos, int length, int initStyle, Wo  				state = SCE_AVE_STRING;  			} else if (ch == '#') {  				styler.ColourTo(i-1, state); -				state = SCE_AVE_ENUM;  +				state = SCE_AVE_ENUM;  			} else if (isoperator(ch) ) {  				styler.ColourTo(i-1, state);  				styler.ColourTo(i, SCE_AVE_OPERATOR); @@ -115,7 +115,7 @@ static void ColouriseAveDoc(unsigned int startPos, int length, int initStyle, Wo  				styler.ColourTo(i-1, SCE_AVE_STRINGEOL);  				state = SCE_AVE_STRINGEOL;  			} -		}  +		}  		if ((state == SCE_AVE_IDENTIFIER)) {  			if (!iswordchar(ch) || ch == '.' ) {  				char s[100]; @@ -131,39 +131,39 @@ static void ColouriseAveDoc(unsigned int startPos, int length, int initStyle, Wo  				if (isdigit(s[0]))  					chAttr = SCE_AVE_NUMBER;  				else { -					if ((strcmp(s, "for") == 0) || (strcmp(s, "if") == 0) || (strcmp(s, "while") == 0))	 +					if ((strcmp(s, "for") == 0) || (strcmp(s, "if") == 0) || (strcmp(s, "while") == 0))  					{  						levelCurrent +=1;  						chAttr = SCE_AVE_STATEMENT;  					} -					if (strcmp(s, "end") == 0)	 +					if (strcmp(s, "end") == 0)  					{  						levelCurrent -=1;  						chAttr = SCE_AVE_STATEMENT;  					} -						 +  					if ( (strcmp(s, "then") == 0) ||  (strcmp(s, "else") == 0)       || (strcmp(s, "break") == 0) || -						(strcmp(s, "each") == 0) ||  +						(strcmp(s, "each") == 0) ||  						(strcmp(s, "exit") == 0) ||  (strcmp(s, "continue") == 0) || (strcmp(s, "return") == 0) || -						(strcmp(s, "by") == 0)   ||  (strcmp(s, "in") == 0)          || (strcmp(s, "elseif") == 0))	 +						(strcmp(s, "by") == 0)   ||  (strcmp(s, "in") == 0)          || (strcmp(s, "elseif") == 0))  					{  						chAttr = SCE_AVE_STATEMENT;  					} -					if ((strcmp(s, "av") == 0) || (strcmp(s, "self") == 0))	 +					if ((strcmp(s, "av") == 0) || (strcmp(s, "self") == 0))  					{  						chAttr = SCE_AVE_KEYWORD;  					} -							 -					if (keywords.InList(s))  + +					if (keywords.InList(s))  					{ -						chAttr = SCE_AVE_WORD;						 +						chAttr = SCE_AVE_WORD;  					}  				}  				styler.ColourTo(end, chAttr);  				state = SCE_AVE_DEFAULT; -				 +  				if (ch == '\'') {  					state = SCE_AVE_COMMENT;  				} else if (ch == '\"') { @@ -172,7 +172,7 @@ static void ColouriseAveDoc(unsigned int startPos, int length, int initStyle, Wo  					styler.ColourTo(i, SCE_AVE_OPERATOR);  				}  			} -		}  +		}  	}  	styler.ColourTo(lengthDoc - 1, state); @@ -181,7 +181,7 @@ static void ColouriseAveDoc(unsigned int startPos, int length, int initStyle, Wo  	if (fold) {  		int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;  		styler.SetLevel(lineCurrent, levelPrev | flagsNext); -		 +  	}  } diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx index aaa16d4e6..f150e71fa 100644 --- a/src/LexCPP.cxx +++ b/src/LexCPP.cxx @@ -1,4 +1,4 @@ -// SciTE - Scintilla based Text Editor +// Scintilla source code edit control  /** @file LexCPP.cxx   ** Lexer for C++, C, Java, and Javascript.   **/ @@ -32,7 +32,7 @@ static bool classifyWordCpp(unsigned int start, unsigned int end, WordList &keyw  	else {  		if (keywords.InList(s)) {  			chAttr = SCE_C_WORD; -			wordIsUUID = strcmp(s, "uuid") == 0;  +			wordIsUUID = strcmp(s, "uuid") == 0;  		}  	}  	styler.ColourTo(end, chAttr); @@ -43,13 +43,13 @@ static bool isOKBeforeRE(char ch) {  	return (ch == '(') || (ch == '=') || (ch == ',');  } -static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],  +static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],  	Accessor &styler) { -	 +  	WordList &keywords = *keywordlists[0]; -	 +  	styler.StartAt(startPos); -	 +  	bool fold = styler.GetPropertyInt("fold");  	bool foldComment = styler.GetPropertyInt("fold.comment");  	bool stylingWithinPreprocessor = styler.GetPropertyInt("styling.within.preprocessor"); @@ -198,7 +198,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo  			} else if (state == SCE_C_COMMENT) {  				if (ch == '/' && chPrev == '*') {  					if (((i > styler.GetStartSegment() + 2) || ( -						(initStyle == SCE_C_COMMENT) &&  +						(initStyle == SCE_C_COMMENT) &&  						(styler.GetStartSegment() == static_cast<unsigned int>(startPos))))) {  						styler.ColourTo(i, state);  						state = SCE_C_DEFAULT; @@ -209,7 +209,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo  			} else if (state == SCE_C_COMMENTDOC) {  				if (ch == '/' && chPrev == '*') {  					if (((i > styler.GetStartSegment() + 2) || ( -						(initStyle == SCE_C_COMMENTDOC) &&  +						(initStyle == SCE_C_COMMENTDOC) &&  						(styler.GetStartSegment() == static_cast<unsigned int>(startPos))))) {  						styler.ColourTo(i, state);  						state = SCE_C_DEFAULT; @@ -293,7 +293,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo  		int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;  		//styler.SetLevel(lineCurrent, levelCurrent | flagsNext);  		styler.SetLevel(lineCurrent, levelPrev | flagsNext); -		 +  	}  } diff --git a/src/LexConf.cxx b/src/LexConf.cxx index f3578428e..6ffcd1d71 100644 --- a/src/LexConf.cxx +++ b/src/LexConf.cxx @@ -1,21 +1,19 @@ -// SciTE - Scintilla based Text Editor +// Scintilla source code edit control +/** @file LexConf.cxx + ** Lexer for Apache Configuration Files. + ** + ** First working version contributed by Ahmad Zawawi <zeus_go64@hotmail.com> on October 28, 2000. + ** i created this lexer because i needed something pretty when dealing + ** when Apache Configuration files... + **/  // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org> -// -// NAME -// 	LexConf.cxx - lexer for Apache Configuration Files -// AUTHOR -// 	first working version contributed by Ahmad Zawawi <zeus_go64@hotmail.com> on October 28, 2000 -// DESCRIPTION -// 	i created this lexer because i needed something pretty when dealing -// when Apache Configuration files... -// - - -#include <stdlib.h>  -#include <string.h>  -#include <ctype.h>  -#include <stdio.h>  -#include <stdarg.h>  +// The License.txt file describes the conditions under which this software may be distributed. + +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <stdio.h> +#include <stdarg.h>  #include "Platform.h" @@ -25,27 +23,27 @@  #include "Scintilla.h"  #include "SciLexer.h" -static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler)  +static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler)  {  	int state = SCE_CONF_DEFAULT;  	char chNext = styler[startPos];  	int lengthDoc = startPos + length;  	// create a buffer large enough to take the largest chunk... -	char *buffer = new char[length];  +	char *buffer = new char[length];  	int bufferCount = 0;  	// this assumes that we have 2 keyword list in conf.properties  	WordList &directives = *keywordLists[0];  	WordList ¶ms = *keywordLists[1]; -	 +  	// go through all provided text segment  	// using the hand-written state machine shown below -	styler.StartAt(startPos);	 -	styler.StartSegment(startPos);	 +	styler.StartAt(startPos); +	styler.StartSegment(startPos);  	for (int i = startPos; i < lengthDoc; i++) {  		char ch = chNext;  		chNext = styler.SafeGetCharAt(i + 1); -				 +  		if (styler.IsLeadByte(ch)) {  			chNext = styler.SafeGetCharAt(i + 2);  			i++; @@ -64,7 +62,7 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k  				} else if( ch == '.' /*|| ch == '/'*/) {  					// signals the start of a file...  					state = SCE_CONF_EXTENSION; -					styler.ColourTo(i,SCE_CONF_EXTENSION);					 +					styler.ColourTo(i,SCE_CONF_EXTENSION);  				} else if( ch == '"') {  					state = SCE_CONF_STRING;  					styler.ColourTo(i,SCE_CONF_STRING); @@ -74,14 +72,14 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k  					// simple case...  					styler.ColourTo(i,SCE_CONF_OPERATOR);  				} else if( isalpha(ch) ) { -					// signals the start of an identifier  +					// signals the start of an identifier  					bufferCount = 0;  					buffer[bufferCount++] = static_cast<char>(tolower(ch));  					state = SCE_CONF_IDENTIFIER;  				} else if( isdigit(ch) ) {  					// signals the start of a number  					bufferCount = 0; -					buffer[bufferCount++] = ch;					 +					buffer[bufferCount++] = ch;  					//styler.ColourTo(i,SCE_CONF_NUMBER);  					state = SCE_CONF_NUMBER;  				} else { @@ -89,7 +87,7 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k  					styler.ColourTo(i,SCE_CONF_DEFAULT);  				}  				break; -			 +  			case SCE_CONF_COMMENT:  				// if we find a newline here,  				// we simply go to default state @@ -105,9 +103,9 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k  				// if we find a non-alphanumeric char,  				// we simply go to default state  				// else we're still dealing with an extension... -				if( isalnum(ch) || (ch == '_') ||  -					(ch == '-') || (ch == '$') ||  -					(ch == '/') || (ch == '.') || (ch == '*') )  +				if( isalnum(ch) || (ch == '_') || +					(ch == '-') || (ch == '$') || +					(ch == '/') || (ch == '.') || (ch == '*') )  				{  					styler.ColourTo(i,SCE_CONF_EXTENSION);  				} else { @@ -115,16 +113,16 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k  					chNext = styler[i--];  				}  				break; -			 +  			case SCE_CONF_STRING:  				// if we find the end of a string char, we simply go to default state  				// else we're still dealing with an string...  				if( (ch == '"' && styler.SafeGetCharAt(i-1)!='\\') || (ch == '\n') || (ch == '\r') ) {  					state = SCE_CONF_DEFAULT; -				}  -				styler.ColourTo(i,SCE_CONF_STRING);				 +				} +				styler.ColourTo(i,SCE_CONF_STRING);  				break; -				 +  			case SCE_CONF_IDENTIFIER:  				// stay  in CONF_IDENTIFIER state until we find a non-alphanumeric  				if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') || (ch == '$') || (ch == '.') || (ch == '*')) { @@ -132,8 +130,8 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k  				} else {  					state = SCE_CONF_DEFAULT;  					buffer[bufferCount] = '\0'; -					 -					// check if the buffer contains a keyword, and highlight it if it is a keyword...					 + +					// check if the buffer contains a keyword, and highlight it if it is a keyword...  					if(directives.InList(buffer)) {  						styler.ColourTo(i-1,SCE_CONF_DIRECTIVE );  					} else if(params.InList(buffer)) { @@ -143,21 +141,21 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k  					} else {  						styler.ColourTo(i-1,SCE_CONF_DEFAULT);  					} -					 +  					// push back the faulty character  					chNext = styler[i--]; -					 +  				}  				break; -			 +  			case SCE_CONF_NUMBER:  				// stay  in CONF_NUMBER state until we find a non-numeric  				if( isdigit(ch) || ch == '.') {  					buffer[bufferCount++] = ch;  				} else {  					state = SCE_CONF_DEFAULT; -					buffer[bufferCount] = '\0';					 -					 +					buffer[bufferCount] = '\0'; +  					// Colourize here...  					if( strchr(buffer,'.') ) {  						// it is an IP address... @@ -166,13 +164,13 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k  						// normal number  						styler.ColourTo(i-1,SCE_CONF_NUMBER);  					} -					 +  					// push back a character  					chNext = styler[i--];  				}  				break; -				 -		}                + +		}  	}  } diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx index 800e46fee..8925c51b6 100644 --- a/src/LexHTML.cxx +++ b/src/LexHTML.cxx @@ -1,4 +1,4 @@ -// SciTE - Scintilla based Text Editor +// Scintilla source code edit control  /** @file LexHTML.cxx   ** Lexer for HTML.   **/ @@ -449,7 +449,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty  			case SCE_H_SINGLESTRING:  			case SCE_HJ_COMMENT:  			case SCE_HJ_COMMENTDOC: -			// SCE_HJ_COMMENTLINE removed as this is a common thing done to hide  +			// SCE_HJ_COMMENTLINE removed as this is a common thing done to hide  			// the end of script marker from some JS interpreters.  			//case SCE_HJ_COMMENTLINE:  			case SCE_HJ_DOUBLESTRING: diff --git a/src/LexLua.cxx b/src/LexLua.cxx index 8eda566aa..86c690dcb 100644 --- a/src/LexLua.cxx +++ b/src/LexLua.cxx @@ -1,5 +1,9 @@ -// LexLua.cxx - lexer for Lua language -// Written by Paul Winwood +// Scintilla source code edit control +/** @file LexLua.cxx + ** Lexer for Lua language. + ** + ** Written by Paul Winwood. + **/  #include <stdlib.h>  #include <string.h> diff --git a/src/LexOthers.cxx b/src/LexOthers.cxx index 83657e019..f3acd2f9d 100644 --- a/src/LexOthers.cxx +++ b/src/LexOthers.cxx @@ -1,4 +1,4 @@ -// SciTE - Scintilla based Text Editor +// Scintilla source code edit control  /** @file LexOthers.cxx   ** Lexers for batch files, diff results, properties files, make files and error lists.   ** Also lexer for LaTeX documents. diff --git a/src/LexPascal.cxx b/src/LexPascal.cxx index 458640767..b8c814116 100644 --- a/src/LexPascal.cxx +++ b/src/LexPascal.cxx @@ -1,11 +1,14 @@ -// SciTE - Scintilla based Text Editor -// LexPascal.cxx - lexer for Pascal +// Scintilla source code edit control +/** @file LexPascal.cxx + ** Lexer for Pascal. + ** Written by Laurent le Tynevez + **/ -#include <stdlib.h>  -#include <string.h>  -#include <ctype.h>  -#include <stdio.h>  -#include <stdarg.h>  +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <stdio.h> +#include <stdarg.h>  #include "Platform.h" @@ -40,12 +43,12 @@ static int classifyWordPascal(unsigned int start, unsigned int end, WordList &ke  	return lev;  } -static void ColourisePascalDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],  +static void ColourisePascalDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],  	Accessor &styler) {  	WordList &keywords = *keywordlists[0]; -	 +  	styler.StartAt(startPos); -	 +  	bool fold = styler.GetPropertyInt("fold");  	int lineCurrent = styler.GetLine(startPos);  	int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; @@ -100,8 +103,8 @@ static void ColourisePascalDoc(unsigned int startPos, int length, int initStyle,  			} else if (ch == '{' && chNext != '$' && chNext != '&') {  				styler.ColourTo(i-1, state);  				state = SCE_C_COMMENT; -			} else if (ch == '(' && chNext == '*'  -						&& styler.SafeGetCharAt(i + 2) != '$'  +			} else if (ch == '(' && chNext == '*' +						&& styler.SafeGetCharAt(i + 2) != '$'  						&& styler.SafeGetCharAt(i + 2) != '&') {  				styler.ColourTo(i-1, state);  				state = SCE_C_COMMENTDOC; @@ -120,7 +123,7 @@ static void ColourisePascalDoc(unsigned int startPos, int length, int initStyle,  			} else if (isoperator(ch)) {  				styler.ColourTo(i-1, state);  				styler.ColourTo(i, SCE_C_OPERATOR); -			 +  			}  		} else if (state == SCE_C_IDENTIFIER) {  			if (!iswordchar(ch)) { @@ -129,8 +132,8 @@ static void ColourisePascalDoc(unsigned int startPos, int length, int initStyle,  				chNext = styler.SafeGetCharAt(i + 1);  				if (ch == '{' && chNext != '$' && chNext != '&') {  					state = SCE_C_COMMENT; -				} else if (ch == '(' && chNext == '*'  -						&& styler.SafeGetCharAt(i + 2) != '$'  +				} else if (ch == '(' && chNext == '*' +						&& styler.SafeGetCharAt(i + 2) != '$'  						&& styler.SafeGetCharAt(i + 2) != '&') {  					styler.ColourTo(i-1, state);  					state = SCE_C_COMMENTDOC; @@ -164,7 +167,7 @@ static void ColourisePascalDoc(unsigned int startPos, int length, int initStyle,  			} else if (state == SCE_C_COMMENTDOC) {  				if (ch == ')' && chPrev == '*') {  					if (((i > styler.GetStartSegment() + 2) || ( -						(initStyle == SCE_C_COMMENTDOC) &&  +						(initStyle == SCE_C_COMMENTDOC) &&  						(styler.GetStartSegment() == static_cast<unsigned int>(startPos))))) {  							styler.ColourTo(i, state);  							state = SCE_C_DEFAULT; @@ -214,7 +217,7 @@ static void ColourisePascalDoc(unsigned int startPos, int length, int initStyle,  		int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;  		//styler.SetLevel(lineCurrent, levelCurrent | flagsNext);  		styler.SetLevel(lineCurrent, levelPrev | flagsNext); -		 +  	}  } diff --git a/src/LexPerl.cxx b/src/LexPerl.cxx index 2dc539c0f..08c8d4e86 100644 --- a/src/LexPerl.cxx +++ b/src/LexPerl.cxx @@ -1,4 +1,4 @@ -// SciTE - Scintilla based Text Editor +// Scintilla source code edit control  /** @file LexPerl.cxx   ** Lexer for subset of Perl.   **/ diff --git a/src/LexPython.cxx b/src/LexPython.cxx index f14dbfe07..e10991b41 100644 --- a/src/LexPython.cxx +++ b/src/LexPython.cxx @@ -1,15 +1,15 @@ -// SciTE - Scintilla based Text Editor +// Scintilla source code edit control  /** @file LexPython.cxx   ** Lexer for Python.   **/  // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>  // The License.txt file describes the conditions under which this software may be distributed. -#include <stdlib.h>  -#include <string.h>  -#include <ctype.h>  -#include <stdio.h>  -#include <stdarg.h>  +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <stdio.h> +#include <stdarg.h>  #include "Platform.h" @@ -139,7 +139,7 @@ static int GetPyStringState(Accessor &styler, int i, int *nextIndex) {  	}  } -static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,  +static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,  						   WordList *keywordlists[], Accessor &styler) {  	int lengthDoc = startPos + length; @@ -152,16 +152,16 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,  			startPos = styler.LineStart(lineCurrent);  			if (startPos == 0)  				initStyle = SCE_P_DEFAULT; -			else  +			else  				initStyle = styler.StyleAt(startPos-1);  		}  	} -	 +  	// Python uses a different mask because bad indentation is marked by oring with 32  	styler.StartAt(startPos, 127); -	 +  	WordList &keywords = *keywordlists[0]; -	 +  	bool fold = styler.GetPropertyInt("fold");  	int whingeLevel = styler.GetPropertyInt("tab.timmy.whinge.level");  	char prevWord[200]; @@ -173,7 +173,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,  	int state = initStyle & 31;  	int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsPyComment); -	if ((state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE))  +	if ((state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE))  		indentCurrent |= SC_FOLDLEVELWHITEFLAG;  	int nextIndex = 0; @@ -183,7 +183,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,  	styler.StartSegment(startPos);  	bool atStartLine = true;  	for (int i = startPos; i < lengthDoc; i++) { -	 +  		if (atStartLine) {  			char chBad = static_cast<char>(64);  			char chGood = static_cast<char>(0); @@ -200,11 +200,11 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,  			styler.SetFlags(chFlags, static_cast<char>(state));  			atStartLine = false;  		} -		 +  		char ch = chNext;  		chNext = styler.SafeGetCharAt(i + 1);  		char chNext2 = styler.SafeGetCharAt(i + 2); -		 +  		if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == lengthDoc)) {  			if ((state == SCE_P_DEFAULT) || (state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE)) {  				// Perform colourisation of white space and triple quoted strings at end of each line to allow @@ -214,7 +214,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,  			int lev = indentCurrent;  			int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsPyComment); -			if ((state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE))  +			if ((state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE))  				indentNext |= SC_FOLDLEVELWHITEFLAG;  			if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {  				// Only non whitespace lines can be headers diff --git a/src/LexSQL.cxx b/src/LexSQL.cxx index eab7d2f71..9db8b9ddd 100644 --- a/src/LexSQL.cxx +++ b/src/LexSQL.cxx @@ -1,15 +1,15 @@ -// SciTE - Scintilla based Text Editor +// Scintilla source code edit control  /** @file LexSQL.cxx   ** Lexer for SQL.   **/  // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>  // The License.txt file describes the conditions under which this software may be distributed. -#include <stdlib.h>  -#include <string.h>  -#include <ctype.h>  -#include <stdio.h>  -#include <stdarg.h>  +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <stdio.h> +#include <stdarg.h>  #include "Platform.h" @@ -40,7 +40,7 @@ static void ColouriseSQLDoc(unsigned int startPos, int length,                              int initStyle, WordList *keywordlists[], Accessor &styler) {  	WordList &keywords = *keywordlists[0]; -	 +  	styler.StartAt(startPos);  	bool fold = styler.GetPropertyInt("fold"); diff --git a/src/LexVB.cxx b/src/LexVB.cxx index 3b8c434d6..8032a75ec 100644 --- a/src/LexVB.cxx +++ b/src/LexVB.cxx @@ -1,15 +1,15 @@ -// SciTE - Scintilla based Text Editor +// Scintilla source code edit control  /** @file LexVB.cxx   ** Lexer for Visual Basic and VBScript.   **/  // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>  // The License.txt file describes the conditions under which this software may be distributed. -#include <stdlib.h>  -#include <string.h>  -#include <ctype.h>  -#include <stdio.h>  -#include <stdarg.h>  +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <stdio.h> +#include <stdarg.h>  #include "Platform.h" @@ -49,7 +49,7 @@ static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle,                             WordList *keywordlists[], Accessor &styler) {  	WordList &keywords = *keywordlists[0]; -	 +  	styler.StartAt(startPos);  	int visibleChars = 0; | 
