codetools: skip keywords in asm..blocks

git-svn-id: trunk@54508 -
This commit is contained in:
mattias 2017-04-02 23:34:00 +00:00
parent 2c17cc7edf
commit 1352581471
2 changed files with 1 additions and 28 deletions

View File

@ -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);

View File

@ -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