diff --git a/components/codetools/codecompletiontool.pas b/components/codetools/codecompletiontool.pas index 0c355b1bd7..603678fc9b 100644 --- a/components/codetools/codecompletiontool.pas +++ b/components/codetools/codecompletiontool.pas @@ -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, diff --git a/components/codetools/finddeclarationtool.pas b/components/codetools/finddeclarationtool.pas index 6757b95f1f..48ed52578f 100644 --- a/components/codetools/finddeclarationtool.pas +++ b/components/codetools/finddeclarationtool.pas @@ -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, diff --git a/components/codetools/identcompletiontool.pas b/components/codetools/identcompletiontool.pas index e9a05902f0..faec84514b 100644 --- a/components/codetools/identcompletiontool.pas +++ b/components/codetools/identcompletiontool.pas @@ -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'); diff --git a/components/codetools/keywordfunclists.pas b/components/codetools/keywordfunclists.pas index a3f06f1d0b..4e87597b62 100644 --- a/components/codetools/keywordfunclists.pas +++ b/components/codetools/keywordfunclists.pas @@ -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); diff --git a/components/codetools/tests/moduletests/fdt_proc_basetypes.pas b/components/codetools/tests/moduletests/fdt_proc_basetypes.pas index d5dc1600e6..5aa2e19ea8 100644 --- a/components/codetools/tests/moduletests/fdt_proc_basetypes.pas +++ b/components/codetools/tests/moduletests/fdt_proc_basetypes.pas @@ -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.