mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 06:59:21 +02:00
codetools: fixed some tests
This commit is contained in:
parent
6b9fd935b2
commit
66b36cd172
@ -1503,7 +1503,7 @@ var
|
|||||||
'.':
|
'.':
|
||||||
if (not FoundFloat)
|
if (not FoundFloat)
|
||||||
and (CurPos.StartPos>2)
|
and (CurPos.StartPos>2)
|
||||||
and (LastChar in ['0'..'9'])
|
and (LastChar in ['0'..'9','e','E'])
|
||||||
and (Src[CurPos.StartPos-2] in ['0'..'9']) then
|
and (Src[CurPos.StartPos-2] in ['0'..'9']) then
|
||||||
begin
|
begin
|
||||||
// float
|
// float
|
||||||
|
@ -198,7 +198,7 @@ var i, l, l2: integer;
|
|||||||
pSrc, pDest: PWord;
|
pSrc, pDest: PWord;
|
||||||
begin
|
begin
|
||||||
l:=length(s);
|
l:=length(s);
|
||||||
SetLength(Result,l);
|
SetLength(Result{%H-},l);
|
||||||
if l>0 then begin
|
if l>0 then begin
|
||||||
pDest:=PWord(@Result[1]);
|
pDest:=PWord(@Result[1]);
|
||||||
pSrc:=PWord(@s[1]);
|
pSrc:=PWord(@s[1]);
|
||||||
@ -853,6 +853,7 @@ begin
|
|||||||
IsIdentChar[c]:=c in ['a'..'z','A'..'Z','_','0'..'9'];
|
IsIdentChar[c]:=c in ['a'..'z','A'..'Z','_','0'..'9'];
|
||||||
IsDottedIdentChar[c]:=c in ['.','a'..'z','A'..'Z','_','0'..'9'];
|
IsDottedIdentChar[c]:=c in ['.','a'..'z','A'..'Z','_','0'..'9'];
|
||||||
IsNumberChar[c]:=c in ['0'..'9'];
|
IsNumberChar[c]:=c in ['0'..'9'];
|
||||||
|
IsNumberOrSepChar[c]:=c in ['0'..'9','_'];
|
||||||
IsCommentStartChar[c]:=c in ['/','{','('];
|
IsCommentStartChar[c]:=c in ['/','{','('];
|
||||||
IsCommentEndChar[c]:=c in ['}',')',#13,#10];
|
IsCommentEndChar[c]:=c in ['}',')',#13,#10];
|
||||||
IsHexNumberChar[c]:=c in ['0'..'9','a'..'f','A'..'F'];
|
IsHexNumberChar[c]:=c in ['0'..'9','a'..'f','A'..'F'];
|
||||||
|
@ -2143,7 +2143,7 @@ begin
|
|||||||
if not WordIsTermOperator.DoItCaseInsensitive(Src,CurPos.StartPos,
|
if not WordIsTermOperator.DoItCaseInsensitive(Src,CurPos.StartPos,
|
||||||
CurPos.EndPos-CurPos.StartPos)
|
CurPos.EndPos-CurPos.StartPos)
|
||||||
then begin
|
then begin
|
||||||
// not a operator
|
// not an operator
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
// operator => read further
|
// operator => read further
|
||||||
|
@ -1076,7 +1076,8 @@ procedure TTestFindDeclaration.TestFindDeclaration_AnonymProc;
|
|||||||
begin
|
begin
|
||||||
StartProgram;
|
StartProgram;
|
||||||
Add([
|
Add([
|
||||||
'{$mode objfpc}{$modeswitch closures}',
|
'{$mode objfpc}',
|
||||||
|
'{$modeswitch anonymousfunctions}',
|
||||||
'type',
|
'type',
|
||||||
' int = word;',
|
' int = word;',
|
||||||
' TFunc = function(i: int): int;',
|
' TFunc = function(i: int): int;',
|
||||||
@ -1106,7 +1107,8 @@ procedure TTestFindDeclaration.TestFindDeclaration_AnonymProc_ExprDot;
|
|||||||
begin
|
begin
|
||||||
StartProgram;
|
StartProgram;
|
||||||
Add([
|
Add([
|
||||||
'{$mode objfpc}{$modeswitch closures}',
|
'{$mode objfpc}',
|
||||||
|
'{$modeswitch anonymousfunctions}',
|
||||||
'type',
|
'type',
|
||||||
' int = word;',
|
' int = word;',
|
||||||
' TFunc = function(i: int): int;',
|
' TFunc = function(i: int): int;',
|
||||||
|
@ -526,7 +526,7 @@ procedure TTestPascalParser.TestParseProcAnoAssign;
|
|||||||
begin
|
begin
|
||||||
Add([
|
Add([
|
||||||
'program test1;',
|
'program test1;',
|
||||||
'{$modeswitch closures}',
|
'{$modeswitch anonymousfunctions}',
|
||||||
'procedure DoIt;',
|
'procedure DoIt;',
|
||||||
'begin',
|
'begin',
|
||||||
' p:=procedure begin end;',
|
' p:=procedure begin end;',
|
||||||
@ -550,7 +550,7 @@ begin
|
|||||||
Add([
|
Add([
|
||||||
'program test1;',
|
'program test1;',
|
||||||
'{$mode objfpc}',
|
'{$mode objfpc}',
|
||||||
'{$modeswitch closures}',
|
'{$modeswitch anonymousfunctions}',
|
||||||
'procedure DoIt;',
|
'procedure DoIt;',
|
||||||
'begin',
|
'begin',
|
||||||
' DoIt(procedure begin end);',
|
' DoIt(procedure begin end);',
|
||||||
@ -574,7 +574,7 @@ begin
|
|||||||
Add([
|
Add([
|
||||||
'program test1;',
|
'program test1;',
|
||||||
'{$mode objfpc}',
|
'{$mode objfpc}',
|
||||||
'{$modeswitch closures}',
|
'{$modeswitch anonymousfunctions}',
|
||||||
'procedure DoIt;',
|
'procedure DoIt;',
|
||||||
'begin',
|
'begin',
|
||||||
' DoIt(',
|
' DoIt(',
|
||||||
|
Loading…
Reference in New Issue
Block a user