Update SynEdit component to 0470dcbf16 from Sep 9, 2015

This commit is contained in:
Ansgar Becker
2015-12-08 17:46:19 +00:00
parent 80990b84d0
commit b229ecc762
24 changed files with 1797 additions and 260 deletions

View File

@ -1,4 +1,4 @@
{-------------------------------------------------------------------------------
{-------------------------------------------------------------------------------
The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
@ -13,7 +13,7 @@ The Original Code is based on the odPySyn.pas file from the
mwEdit component suite by Martin Waldenburg and other developers, the Initial
Author of this file is Olivier Deckmyn.
Portions created by M.Utku Karatas and Dennis Chuah.
Unicode translation by Ma<EFBFBD>l H<EFBFBD>rz.
Unicode translation by Maël Hörz.
All Rights Reserved.
Contributors to the SynEdit and mwEdit projects are listed in the
@ -186,10 +186,11 @@ const
// No need to localise keywords!
// List of keywords
KEYWORDCOUNT = 29;
KEYWORDCOUNT = 32;
KEYWORDS: array [1..KEYWORDCOUNT] of UnicodeString =
(
'and',
'as',
'assert',
'break',
'class',
@ -209,6 +210,7 @@ const
'in',
'is',
'lambda',
'nonlocal',
'not',
'or',
'pass',
@ -217,6 +219,7 @@ const
'return',
'try',
'while',
'with',
'yield'
);
@ -342,6 +345,10 @@ begin
(MayBe[fStringLen - 3] <> '_') then
Result := tkSystemDefined
// Check for names of class and functions - not optimal
else if ( (WideCompareStr(Trim(Copy(fLine, 0, Length(fLine) - Length(fToIdent))), 'def')=0) or (WideCompareStr(Trim(Copy(fLine, 0, Length(fLine) - Length(fToIdent))), 'class')=0) ) then
Result := tkSystemDefined
// Else, hey, it is an ordinary run-of-the-mill identifier!
else
Result := tkIdentifier;
@ -357,6 +364,8 @@ begin
FKeywords.Sorted := True;
FKeywords.Duplicates := dupError;
FKeywords.Assign (GetKeywordIdentifiers);
if not FKeywords.Sorted then
FKeywords.Sort;
fRange := rsUnknown;
fCommentAttri := TSynHighlighterAttributes.Create(SYNS_AttrComment, SYNS_FriendlyAttrComment);