mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-11 12:49:59 +01:00
codetools: skip keywords in asm..blocks
git-svn-id: trunk@54508 -
This commit is contained in:
parent
2c17cc7edf
commit
1352581471
@ -158,7 +158,6 @@ var
|
|||||||
WordIsPredefinedPas2jsIdentifier,
|
WordIsPredefinedPas2jsIdentifier,
|
||||||
UnexpectedKeyWordInBeginBlock,
|
UnexpectedKeyWordInBeginBlock,
|
||||||
UnexpectedKeyWordInAsmBlock,
|
UnexpectedKeyWordInAsmBlock,
|
||||||
UnexpectedKeyWordInAsmPas2JSBlock,
|
|
||||||
UnexpectedKeyWordInBrackets
|
UnexpectedKeyWordInBrackets
|
||||||
: TKeyWordFunctionList;
|
: TKeyWordFunctionList;
|
||||||
UpChars: array[char] of char;
|
UpChars: array[char] of char;
|
||||||
@ -1400,29 +1399,6 @@ begin
|
|||||||
|
|
||||||
UnexpectedKeyWordInAsmBlock:=TKeyWordFunctionList.Create('UnexpectedKeyWordInAsmBlock');
|
UnexpectedKeyWordInAsmBlock:=TKeyWordFunctionList.Create('UnexpectedKeyWordInAsmBlock');
|
||||||
KeyWordLists.Add(UnexpectedKeyWordInAsmBlock);
|
KeyWordLists.Add(UnexpectedKeyWordInAsmBlock);
|
||||||
with UnexpectedKeyWordInAsmBlock do begin
|
|
||||||
Add('CLASS',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('CONST',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('CONSTRUCTOR',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('DESTRUCTOR',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('FINALIZATION',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('FUNCTION',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('IMPLEMENTATION',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('INITIALIZATION',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('INTERFACE',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('LIBRARY',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('PROCEDURE',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('PROGRAM',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('RECORD',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('RESOURCESTRING',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('SET',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('THREADVAR',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('UNIT',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
Add('VAR',{$ifdef FPC}@{$endif}AllwaysTrue);
|
|
||||||
end;
|
|
||||||
|
|
||||||
UnexpectedKeyWordInAsmPas2JSBlock:=TKeyWordFunctionList.Create('UnexpectedKeyWordInAsmPas2JSBlock');
|
|
||||||
KeyWordLists.Add(UnexpectedKeyWordInAsmPas2JSBlock);
|
|
||||||
with UnexpectedKeyWordInAsmBlock do begin
|
with UnexpectedKeyWordInAsmBlock do begin
|
||||||
Add('ASSEMBLER',{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('ASSEMBLER',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
Add('BEGIN',{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('BEGIN',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
|
|||||||
@ -2861,10 +2861,7 @@ begin
|
|||||||
if (Src[CurPos.StartPos-1]='@') then begin
|
if (Src[CurPos.StartPos-1]='@') then begin
|
||||||
// allow anything behind @
|
// allow anything behind @
|
||||||
end else if (CurPos.Flag=cafWord) then begin
|
end else if (CurPos.Flag=cafWord) then begin
|
||||||
if Scanner.PascalCompiler=pcPas2js then begin
|
if UnexpectedKeyWordInAsmBlock.DoIdentifier(@Src[CurPos.StartPos]) then
|
||||||
if UnexpectedKeyWordInAsmPas2JSBlock.DoIdentifier(@Src[CurPos.StartPos]) then
|
|
||||||
SaveRaiseUnexpectedKeyWordInBeginEndBlock;
|
|
||||||
end else if UnexpectedKeyWordInAsmBlock.DoIdentifier(@Src[CurPos.StartPos]) then
|
|
||||||
SaveRaiseUnexpectedKeyWordInBeginEndBlock;
|
SaveRaiseUnexpectedKeyWordInBeginEndBlock;
|
||||||
end;
|
end;
|
||||||
end else if CurPos.Flag=cafSemicolon then begin
|
end else if CurPos.Flag=cafSemicolon then begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user