mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 22:58:50 +02:00
codetools: added boolean8, boolean16, boolean32, boolean64
This commit is contained in:
parent
7a38231905
commit
947a183c9c
@ -6471,7 +6471,11 @@ begin
|
||||
xtByteBool,
|
||||
xtWordBool,
|
||||
xtLongBool,
|
||||
xtQWordBool: begin AddAssignment('False'); AddAssignment('True'); end;
|
||||
xtQWordBool,
|
||||
xtBoolean8,
|
||||
xtBoolean16,
|
||||
xtBoolean32,
|
||||
xtBoolean64: begin AddAssignment('False'); AddAssignment('True'); end;
|
||||
xtString,
|
||||
xtAnsiString,
|
||||
xtShortString,
|
||||
|
@ -246,6 +246,10 @@ type
|
||||
xtWordBool, // wordbool
|
||||
xtLongBool, // longbool
|
||||
xtQWordBool, // qwordbool
|
||||
xtBoolean8, // boolean8
|
||||
xtBoolean16, // boolean16
|
||||
xtBoolean32, // boolean32
|
||||
xtBoolean64, // boolean64
|
||||
xtString, // string
|
||||
xtAnsiString, // ansistring
|
||||
xtShortString, // shortstring
|
||||
@ -298,6 +302,10 @@ var
|
||||
'WordBool',
|
||||
'LongBool',
|
||||
'QWordBool',
|
||||
'Boolean8',
|
||||
'Boolean16',
|
||||
'Boolean32',
|
||||
'Boolean64',
|
||||
'String',
|
||||
'AnsiString',
|
||||
'ShortString',
|
||||
@ -337,7 +345,9 @@ const
|
||||
xtAllIntegerTypes = [xtInt64, xtQWord, xtConstOrdInteger, xtLongint,
|
||||
xtLongWord, xtWord, xtCardinal, xtSmallInt, xtShortInt,
|
||||
xtByte,xtNativeInt,xtNativeUInt,xtSizeInt];
|
||||
xtAllBooleanTypes = [xtBoolean, xtByteBool, xtWordBool, xtLongBool,xtQWordBool];
|
||||
xtAllBooleanTypes = [xtBoolean,
|
||||
xtByteBool, xtWordBool, xtLongBool,xtQWordBool,
|
||||
xtBoolean8,xtBoolean16,xtBoolean32,xtBoolean64];
|
||||
xtAllRealTypes = [xtReal, xtConstReal, xtSingle, xtDouble,
|
||||
xtExtended, xtCExtended, xtCurrency, xtComp];
|
||||
xtAllStringTypes = [xtConstString, xtShortString, xtString, xtAnsiString];
|
||||
@ -1323,6 +1333,14 @@ begin
|
||||
Result:=xtLongBool
|
||||
else if CompareIdentifiers(Identifier,'QWORDBOOL')=0 then
|
||||
Result:=xtQWordBool
|
||||
else if CompareIdentifiers(Identifier,'BOOLEAN8')=0 then
|
||||
Result:=xtBoolean8
|
||||
else if CompareIdentifiers(Identifier,'BOOLEAN16')=0 then
|
||||
Result:=xtBoolean16
|
||||
else if CompareIdentifiers(Identifier,'BOOLEAN32')=0 then
|
||||
Result:=xtBoolean32
|
||||
else if CompareIdentifiers(Identifier,'BOOLEAN64')=0 then
|
||||
Result:=xtBoolean64
|
||||
else if CompareIdentifiers(Identifier,'CHAR')=0 then
|
||||
Result:=xtChar
|
||||
else if CompareIdentifiers(Identifier,'WIDECHAR')=0 then
|
||||
@ -12803,10 +12821,8 @@ function TFindDeclarationTool.FindForInTypeAsString(TermPos: TAtomPosition;
|
||||
xtByte,
|
||||
xtWord,
|
||||
xtBoolean,
|
||||
xtByteBool,
|
||||
xtWordBool,
|
||||
xtLongBool,
|
||||
xtQWordBool,
|
||||
xtByteBool,xtWordBool,xtLongBool,xtQWordBool,
|
||||
xtBoolean8,xtBoolean16,xtBoolean32,xtBoolean64,
|
||||
xtNativeInt,
|
||||
xtNativeUInt:
|
||||
Result:=ExpressionTypeDescNames[SubExprType.Desc];
|
||||
@ -13605,6 +13621,7 @@ begin
|
||||
xtWordBool,
|
||||
xtLongBool,
|
||||
xtQWordBool,
|
||||
xtBoolean8,xtBoolean16,xtBoolean32,xtBoolean64,
|
||||
xtString,
|
||||
xtAnsiString,
|
||||
xtShortString,
|
||||
@ -13641,7 +13658,8 @@ begin
|
||||
xtByteBool,
|
||||
xtWordBool,
|
||||
xtLongBool,
|
||||
xtQWordBool:
|
||||
xtQWordBool,
|
||||
xtBoolean8,xtBoolean16,xtBoolean32,xtBoolean64:
|
||||
Result:=ExpressionTypeDescNames[xtBoolean];
|
||||
|
||||
xtString,
|
||||
|
@ -3763,7 +3763,9 @@ begin
|
||||
|
||||
case ExprType.Desc of
|
||||
|
||||
xtBoolean,xtByteBool,xtWordBool,xtLongBool,xtQWordBool:
|
||||
xtBoolean,
|
||||
xtByteBool,xtWordBool,xtLongBool,xtQWordBool,
|
||||
xtBoolean8,xtBoolean16,xtBoolean32,xtBoolean64:
|
||||
begin
|
||||
List.Add('True');
|
||||
List.Add('False');
|
||||
|
@ -1753,6 +1753,10 @@ begin
|
||||
// types
|
||||
Add('ANSISTRING' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('BOOLEAN' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('BOOLEAN8' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('BOOLEAN16' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('BOOLEAN32' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('BOOLEAN64' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('BYTE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('BYTEBOOL' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('CHAR' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
|
@ -22,6 +22,8 @@ procedure DoIt{#unicodestring}(p: unicodestring); external;
|
||||
procedure DoIt{#widestring}(p: widestring); external;
|
||||
procedure DoIt{#rawbytestring}(p: rawbytestring); external;
|
||||
procedure DoIt{#pointer}(p: pointer); external;
|
||||
procedure DoIt{#boolean8}(b: boolean8); external;
|
||||
procedure DoIt{#bytebool}(b: bytebool); external;
|
||||
|
||||
implementation
|
||||
|
||||
@ -44,6 +46,8 @@ var
|
||||
us: unicodestring;
|
||||
rs: rawbytestring;
|
||||
p: pointer;
|
||||
b8: boolean8;
|
||||
bb: bytebool;
|
||||
initialization
|
||||
DoIt{@boolean}(bo);
|
||||
DoIt{@byte}(by);
|
||||
@ -63,5 +67,7 @@ initialization
|
||||
DoIt{@unicodestring}(us);
|
||||
DoIt{@rawbytestring}(rs);
|
||||
DoIt{@pointer}(p);
|
||||
DoIt{@boolean8}(b8);
|
||||
DoIt{@bytebool}(bb);
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user