mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 07:59:28 +02:00
codetools: support 'section' variable/constant modifier
git-svn-id: trunk@32561 -
This commit is contained in:
parent
df7c65a674
commit
046df2da25
@ -3088,7 +3088,7 @@ procedure TPascalParserTool.ReadVariableType;
|
|||||||
interface
|
interface
|
||||||
var a:b;
|
var a:b;
|
||||||
a:b; cvar;
|
a:b; cvar;
|
||||||
a:b; public name 'string constant';
|
a:b; public name 'string constant' section 'string constant';
|
||||||
a:b; public name <id>;
|
a:b; public name <id>;
|
||||||
a:b; external name 'string constant';
|
a:b; external name 'string constant';
|
||||||
a:b; cvar; external;
|
a:b; cvar; external;
|
||||||
@ -3162,6 +3162,14 @@ begin
|
|||||||
and (not AtomIsIdentifier(false)) then
|
and (not AtomIsIdentifier(false)) then
|
||||||
RaiseStringExpectedButAtomFound(ctsStringConstant);
|
RaiseStringExpectedButAtomFound(ctsStringConstant);
|
||||||
ReadConstant(true,false,[]);
|
ReadConstant(true,false,[]);
|
||||||
|
if UpAtomIs('SECTION') then begin
|
||||||
|
// for example FreePascal_TLS_callback : pointer = @Exec_Tls_callback; public name '__FPC_tls_callbacks' section '.CRT$XLFPC'
|
||||||
|
ReadNextAtom;
|
||||||
|
if (not AtomIsStringConstant)
|
||||||
|
and (not AtomIsIdentifier(false)) then
|
||||||
|
RaiseStringExpectedButAtomFound(ctsStringConstant);
|
||||||
|
ReadConstant(true,false,[]);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
if CurPos.Flag<>cafSemicolon then
|
if CurPos.Flag<>cafSemicolon then
|
||||||
RaiseCharExpectedButAtomFound(';');
|
RaiseCharExpectedButAtomFound(';');
|
||||||
@ -3612,6 +3620,12 @@ begin
|
|||||||
if not AtomIsStringConstant then
|
if not AtomIsStringConstant then
|
||||||
RaiseStringExpectedButAtomFound(ctsStringConstant);
|
RaiseStringExpectedButAtomFound(ctsStringConstant);
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
|
if UpAtomIs('SECTION') then begin
|
||||||
|
ReadNextAtom;
|
||||||
|
if not AtomIsStringConstant then
|
||||||
|
RaiseStringExpectedButAtomFound(ctsStringConstant);
|
||||||
|
ReadNextAtom;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
if CurPos.Flag<>cafSemicolon then
|
if CurPos.Flag<>cafSemicolon then
|
||||||
RaiseStringExpectedButAtomFound(';');
|
RaiseStringExpectedButAtomFound(';');
|
||||||
|
Loading…
Reference in New Issue
Block a user