mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-01 07:29:30 +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,
|
||||
UnexpectedKeyWordInBeginBlock,
|
||||
UnexpectedKeyWordInAsmBlock,
|
||||
UnexpectedKeyWordInAsmPas2JSBlock,
|
||||
UnexpectedKeyWordInBrackets
|
||||
: TKeyWordFunctionList;
|
||||
UpChars: array[char] of char;
|
||||
@ -1400,29 +1399,6 @@ begin
|
||||
|
||||
UnexpectedKeyWordInAsmBlock:=TKeyWordFunctionList.Create('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
|
||||
Add('ASSEMBLER',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('BEGIN',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
|
||||
@ -2861,10 +2861,7 @@ begin
|
||||
if (Src[CurPos.StartPos-1]='@') then begin
|
||||
// allow anything behind @
|
||||
end else if (CurPos.Flag=cafWord) then begin
|
||||
if Scanner.PascalCompiler=pcPas2js then begin
|
||||
if UnexpectedKeyWordInAsmPas2JSBlock.DoIdentifier(@Src[CurPos.StartPos]) then
|
||||
SaveRaiseUnexpectedKeyWordInBeginEndBlock;
|
||||
end else if UnexpectedKeyWordInAsmBlock.DoIdentifier(@Src[CurPos.StartPos]) then
|
||||
if UnexpectedKeyWordInAsmBlock.DoIdentifier(@Src[CurPos.StartPos]) then
|
||||
SaveRaiseUnexpectedKeyWordInBeginEndBlock;
|
||||
end;
|
||||
end else if CurPos.Flag=cafSemicolon then begin
|
||||
|
||||
Loading…
Reference in New Issue
Block a user