diff options
| author | Kein-Hong Man <unknown> | 2015-12-12 12:59:44 +1100 | 
|---|---|---|
| committer | Kein-Hong Man <unknown> | 2015-12-12 12:59:44 +1100 | 
| commit | 3c7a4ab2a2d32cf7f5c171d4b64a61c772e89235 (patch) | |
| tree | 59a2f9a996f6bb1bc0b7cd6063d4148ca274185e | |
| parent | 8a5340d1afd77fb42f3aede0f7eef215517fb0b5 (diff) | |
| download | scintilla-mirror-3c7a4ab2a2d32cf7f5c171d4b64a61c772e89235.tar.gz | |
Bug [#1791]. Added a missing symbol (the underscore) for subroutine prototypes.
Removed the dynamic array.
| -rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
| -rw-r--r-- | lexers/LexPerl.cxx | 6 | 
2 files changed, 6 insertions, 4 deletions
| diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index f44f66363..c39e39a03 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -512,6 +512,10 @@  	<a href="http://sourceforge.net/p/scintilla/bugs/1790/">Bug #1790</a>.  	</li>  	<li> +	Perl lexer allows '_' for subroutine prototypes. +	<a href="http://sourceforge.net/p/scintilla/bugs/1791/">Bug #1791</a>. +	</li> +	<li>  	Send SCN_UPDATEUI with SC_UPDATE_SELECTION when the application changes multiple  	selection.  	</li> diff --git a/lexers/LexPerl.cxx b/lexers/LexPerl.cxx index df6cc9d3e..39fe10f14 100644 --- a/lexers/LexPerl.cxx +++ b/lexers/LexPerl.cxx @@ -537,7 +537,7 @@ void SCI_METHOD LexerPerl::Lex(Sci_PositionU startPos, Sci_Position length, int  	CharacterSet &setPOD = setModifiers;  	CharacterSet setNonHereDoc(CharacterSet::setDigits, "=$@");  	CharacterSet setHereDocDelim(CharacterSet::setAlphaNum, "_"); -	CharacterSet setSubPrototype(CharacterSet::setNone, "\\[$@%&*+];"); +	CharacterSet setSubPrototype(CharacterSet::setNone, "\\[$@%&*+];_");  	// for format identifiers  	CharacterSet setFormatStart(CharacterSet::setAlpha, "_=");  	CharacterSet &setFormat = setHereDocDelim; @@ -555,13 +555,12 @@ void SCI_METHOD LexerPerl::Lex(Sci_PositionU startPos, Sci_Position length, int  		int Quote;		// the char after '<<'  		bool Quoted;		// true if Quote in ('\'','"','`')  		int DelimiterLength;	// strlen(Delimiter) -		char *Delimiter;	// the Delimiter, 256: sizeof PL_tokenbuf +		char Delimiter[HERE_DELIM_MAX];	// the Delimiter  		HereDocCls() {  			State = 0;  			Quote = 0;  			Quoted = false;  			DelimiterLength = 0; -			Delimiter = new char[HERE_DELIM_MAX];  			Delimiter[0] = '\0';  		}  		void Append(int ch) { @@ -569,7 +568,6 @@ void SCI_METHOD LexerPerl::Lex(Sci_PositionU startPos, Sci_Position length, int  			Delimiter[DelimiterLength] = '\0';  		}  		~HereDocCls() { -			delete []Delimiter;  		}  	};  	HereDocCls HereDoc;		// TODO: FIFO for stacked here-docs | 
