mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 10:38:15 +02:00
Codetools: Support method names escaped with '&' in class completion. Issue #28227, patch from Ondrej Pokorny.
git-svn-id: trunk@49308 -
This commit is contained in:
parent
9dc2acfa82
commit
04f6320077
@ -833,7 +833,7 @@ begin
|
||||
if CurPos.StartPos>SrcLen then exit(false);
|
||||
p:=@Src[CurPos.StartPos];
|
||||
if p^ in ['0'..'9','%','$'] then exit(true);
|
||||
if (p^='&') and (p[1] in ['0'..'7']) then exit(true);
|
||||
if (p^='&') and IsOctNumberChar[p[1]] then exit(true);
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
@ -1229,10 +1229,10 @@ begin
|
||||
'&': // octal number or keyword as identifier
|
||||
begin
|
||||
inc(p);
|
||||
if p^ in ['0'..'7'] then begin
|
||||
while p^ in ['0'..'7'] do
|
||||
if IsOctNumberChar[p^] then begin
|
||||
while IsOctNumberChar[p^] do
|
||||
inc(p);
|
||||
end else if IsIdentChar[p^] then begin
|
||||
end else if IsIdentStartChar[p^] then begin
|
||||
CurPos.Flag:=cafWord;
|
||||
while IsIdentChar[p^] do
|
||||
inc(p);
|
||||
|
@ -5170,7 +5170,7 @@ begin
|
||||
// -> check if a space must be inserted
|
||||
if AddAtom
|
||||
and ( ((phpCommentsToSpace in Attr) and (CurPos.StartPos>LastAtomEndPos))
|
||||
or ((CurPos.StartPos<=SrcLen) and (IsIdentChar[Src[CurPos.StartPos]])
|
||||
or ((CurPos.StartPos<=SrcLen) and (IsIdentChar[Src[CurPos.StartPos]] or (Src[CurPos.StartPos] = '&'))
|
||||
and ExtractStreamEndIsIdentChar)
|
||||
)
|
||||
then begin
|
||||
|
@ -1381,6 +1381,28 @@ begin
|
||||
then
|
||||
CurAtomType:=atKeyword;
|
||||
end;
|
||||
'&': //identifier prefixed with '&' or octal number
|
||||
begin
|
||||
inc(CurPos);
|
||||
if CurPos<=SrcLen then
|
||||
case Src[CurPos] of
|
||||
'a'..'z','A'..'Z','_'://identifier prefixed with '&'
|
||||
begin
|
||||
CurAtomType:=atIdentifier;
|
||||
repeat
|
||||
inc(CurPos);
|
||||
until (CurPos>SrcLen) or (not IsIdentChar[Src[CurPos]]);
|
||||
end;
|
||||
'0'..'7'://octal number
|
||||
begin
|
||||
CurAtomType:=atNumber;
|
||||
repeat
|
||||
inc(CurPos);
|
||||
until (CurPos>SrcLen) or (not IsOctNumberChar[Src[CurPos]]);
|
||||
end;
|
||||
end else
|
||||
CurAtomType:=atNone;
|
||||
end;
|
||||
#128..#255: // UTF8
|
||||
begin
|
||||
CurAtomType:=atIdentifier;
|
||||
|
Loading…
Reference in New Issue
Block a user