mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-01 22:19:39 +01:00
codetools: directives parser: adding nodes for all directives
git-svn-id: trunk@11847 -
This commit is contained in:
parent
576644f062
commit
d837b709c7
@ -83,7 +83,8 @@ const
|
||||
cdnsLongSwitch = 52+cdnsBase;
|
||||
cdnsMode = 53+cdnsBase;
|
||||
cdnsThreading = 54+cdnsBase;
|
||||
|
||||
cdnsOther = 55+cdnsBase;
|
||||
|
||||
const
|
||||
H2Pas_Function_Prefix = 'H2PAS_FUNCTION_';
|
||||
|
||||
@ -130,6 +131,7 @@ type
|
||||
function LongSwitchDirective: boolean;
|
||||
function ModeDirective: boolean;
|
||||
function ThreadingDirective: boolean;
|
||||
function OtherDirective: boolean;
|
||||
procedure InitKeyWordList;
|
||||
|
||||
procedure InitParser;
|
||||
@ -370,6 +372,7 @@ begin
|
||||
cdnsLongSwitch : Result:='LongSwitch';
|
||||
cdnsMode : Result:='Mode';
|
||||
cdnsThreading : Result:='Threading';
|
||||
cdnsOther : Result:='?';
|
||||
else Result:='?';
|
||||
end;
|
||||
end;
|
||||
@ -574,6 +577,14 @@ begin
|
||||
EndChildNode;
|
||||
end;
|
||||
|
||||
function TCompilerDirectivesTree.OtherDirective: boolean;
|
||||
begin
|
||||
Result:=true;
|
||||
CreateChildNode(cdnDefine,cdnsOther);
|
||||
AtomStart:=SrcPos;
|
||||
EndChildNode;
|
||||
end;
|
||||
|
||||
procedure TCompilerDirectivesTree.InitKeyWordList;
|
||||
var
|
||||
c: Char;
|
||||
@ -606,6 +617,7 @@ begin
|
||||
Add('INCLUDEPATH',{$ifdef FPC}@{$endif}IncludePathDirective);
|
||||
Add('MODE',{$ifdef FPC}@{$endif}ModeDirective);
|
||||
Add('THREADING',{$ifdef FPC}@{$endif}ThreadingDirective);
|
||||
DefaultKeyWordFunction:={$ifdef FPC}@{$endif}OtherDirective;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
{%MainUnit memcheck.pas}
|
||||
|
||||
{$IFDEF MC_Interface}
|
||||
|
||||
{$R-}
|
||||
{$S-}
|
||||
|
||||
var
|
||||
ExceptOnError: boolean = true;
|
||||
|
||||
|
||||
@ -6639,7 +6639,7 @@ var
|
||||
|
||||
function GetLineWidthInPixel(LineStart, LineLen: integer): integer;
|
||||
var
|
||||
lbearing, rbearing, width, ascent, descent: LongInt;
|
||||
width: LongInt;
|
||||
begin
|
||||
GetTextExtentIgnoringAmpersands(UseFont, @AText[LineStart], LineLen,
|
||||
nil, nil, @width, nil, nil);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user