mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-31 22:56:13 +02:00
codetools: parse jvm class section final var
git-svn-id: trunk@34353 -
This commit is contained in:
parent
023e61f0d5
commit
a0e93a9f05
@ -176,6 +176,7 @@ type
|
|||||||
function KeyWordFuncClassTypeSection: boolean;
|
function KeyWordFuncClassTypeSection: boolean;
|
||||||
function KeyWordFuncClassVarSection: boolean;
|
function KeyWordFuncClassVarSection: boolean;
|
||||||
function KeyWordFuncClassClass: boolean;
|
function KeyWordFuncClassClass: boolean;
|
||||||
|
function KeyWordFuncClassFinal: boolean;
|
||||||
function KeyWordFuncClassMethod: boolean;
|
function KeyWordFuncClassMethod: boolean;
|
||||||
function KeyWordFuncClassProperty: boolean;
|
function KeyWordFuncClassProperty: boolean;
|
||||||
function KeyWordFuncClassIdentifier: boolean;
|
function KeyWordFuncClassIdentifier: boolean;
|
||||||
@ -441,7 +442,11 @@ begin
|
|||||||
'E':
|
'E':
|
||||||
if CompareSrcIdentifiers(p,'END') then exit(false);
|
if CompareSrcIdentifiers(p,'END') then exit(false);
|
||||||
'F':
|
'F':
|
||||||
if CompareSrcIdentifiers(p,'FUNCTION') then exit(KeyWordFuncClassMethod);
|
case UpChars[p[1]] of
|
||||||
|
'U': if CompareSrcIdentifiers(p,'FUNCTION') then exit(KeyWordFuncClassMethod);
|
||||||
|
'I': if CompareSrcIdentifiers(p,'FINAL') and (Scanner.Values.IsDefined('JVM'))
|
||||||
|
then exit(KeyWordFuncClassFinal);
|
||||||
|
end;
|
||||||
'P':
|
'P':
|
||||||
case UpChars[p[1]] of
|
case UpChars[p[1]] of
|
||||||
'R':
|
'R':
|
||||||
@ -1077,6 +1082,31 @@ begin
|
|||||||
RaiseStringExpectedButAtomFound('procedure');
|
RaiseStringExpectedButAtomFound('procedure');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TPascalParserTool.KeyWordFuncClassFinal: boolean;
|
||||||
|
{ parse
|
||||||
|
final var
|
||||||
|
final class var
|
||||||
|
}
|
||||||
|
begin
|
||||||
|
if CurNode.Desc in AllClassSubSections then begin
|
||||||
|
// end last sub section
|
||||||
|
CurNode.EndPos:=CurPos.StartPos;
|
||||||
|
EndChildNode;
|
||||||
|
end;
|
||||||
|
// start new section
|
||||||
|
CreateChildNode;
|
||||||
|
CurNode.Desc:=ctnVarSection;
|
||||||
|
ReadNextAtom;
|
||||||
|
if UpAtomIs('CLASS') then
|
||||||
|
begin
|
||||||
|
CurNode.Desc:=ctnClassClassVar;
|
||||||
|
ReadNextAtom;
|
||||||
|
end;
|
||||||
|
if not UpAtomIs('VAR') then
|
||||||
|
RaiseStringExpectedButAtomFound('var');
|
||||||
|
Result:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
function TPascalParserTool.KeyWordFuncClassMethod: boolean;
|
function TPascalParserTool.KeyWordFuncClassMethod: boolean;
|
||||||
{ parse class method
|
{ parse class method
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user