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