mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 18:40:33 +02:00
codetools: fixed parsing constant with round brackets
git-svn-id: trunk@27336 -
This commit is contained in:
parent
26e3d51f1a
commit
bfe27912a8
@ -1854,12 +1854,12 @@ begin
|
||||
if (BracketType=cafRoundBracketOpen)
|
||||
and (CurPos.Flag<>cafRoundBracketClose) then
|
||||
if ExceptionOnError then
|
||||
RaiseCharExpectedButAtomFound('(')
|
||||
RaiseCharExpectedButAtomFound(')')
|
||||
else exit;
|
||||
if (BracketType=cafEdgedBracketOpen)
|
||||
and (CurPos.Flag<>cafEdgedBracketClose) then
|
||||
if ExceptionOnError then
|
||||
RaiseCharExpectedButAtomFound('[')
|
||||
RaiseCharExpectedButAtomFound(']')
|
||||
else exit;
|
||||
if not Extract then ReadNextAtom else ExtractNextAtom(true,Attr);
|
||||
end;
|
||||
@ -1871,9 +1871,10 @@ begin
|
||||
// open bracket + ? + close bracket
|
||||
if not Extract then ReadNextAtom else ExtractNextAtom(true,Attr);
|
||||
if not ReadConstant(ExceptionOnError,Extract,Attr) then exit;
|
||||
if ExceptionOnError then
|
||||
RaiseCharExpectedButAtomFound(')')
|
||||
else exit;
|
||||
if (CurPos.Flag<>cafRoundBracketClose) then
|
||||
if ExceptionOnError then
|
||||
RaiseCharExpectedButAtomFound(')')
|
||||
else exit;
|
||||
if not Extract then ReadNextAtom else ExtractNextAtom(true,Attr);
|
||||
end else if CurPos.Flag=cafEdgedBracketOpen then begin
|
||||
// open bracket + ? + close bracket
|
||||
|
Loading…
Reference in New Issue
Block a user