summaryrefslogtreecommitdiffhomepage
path: root/include/CompilerKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-27 08:56:24 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-27 08:56:24 +0100
commita936410849e4df5598d9edb11132153a4f7e64f6 (patch)
tree5654054528b3d00d97ad1933b8220dab749658e0 /include/CompilerKit
parentd532b43153cb68d6e92c5dac58cbd3c8ab4f60af (diff)
cl! giant source code refactor.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/CompilerKit')
-rw-r--r--include/CompilerKit/AE.h12
-rw-r--r--include/CompilerKit/AST.h13
-rw-r--r--include/CompilerKit/CodeGenerator.h10
-rw-r--r--include/CompilerKit/Detail/32x0.h10
-rw-r--r--include/CompilerKit/Detail/64x0.h10
-rw-r--r--include/CompilerKit/Detail/AMD64.h10
-rw-r--r--include/CompilerKit/Detail/Aarch64.h10
-rw-r--r--include/CompilerKit/Detail/Config.h9
-rw-r--r--include/CompilerKit/Detail/Power64.h1
-rw-r--r--include/CompilerKit/Detail/PreConfig.h9
-rw-r--r--include/CompilerKit/ErrorID.h13
-rw-r--r--include/CompilerKit/ErrorOr.h17
-rw-r--r--include/CompilerKit/Macros.h10
-rw-r--r--include/CompilerKit/PEF.h10
-rw-r--r--include/CompilerKit/Ref.h14
-rw-r--r--include/CompilerKit/UUID.h1
-rw-r--r--include/CompilerKit/Utilities/Assembler.h9
-rw-r--r--include/CompilerKit/Utilities/Compiler.h10
-rw-r--r--include/CompilerKit/Utilities/DLL.h10
-rw-r--r--include/CompilerKit/XCOFF.h17
20 files changed, 76 insertions, 129 deletions
diff --git a/include/CompilerKit/AE.h b/include/CompilerKit/AE.h
index a8fe0a7..3f34fb8 100644
--- a/include/CompilerKit/AE.h
+++ b/include/CompilerKit/AE.h
@@ -1,11 +1,7 @@
-/*
- * ========================================================
- *
- * CompilerKit
- * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license.
- *
- * ========================================================
- */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef _NECTAR_AE_H_
#define _NECTAR_AE_H_
diff --git a/include/CompilerKit/AST.h b/include/CompilerKit/AST.h
index 8f6b8fb..e161bb7 100644
--- a/include/CompilerKit/AST.h
+++ b/include/CompilerKit/AST.h
@@ -1,8 +1,7 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license
-
-======================================== */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef NECTAR_COMPILERKIT_AST_H
#define NECTAR_COMPILERKIT_AST_H
@@ -86,8 +85,8 @@ struct SyntaxLeafList final {
struct SyntaxLeaf;
struct SyntaxLeaf {
- using Ptr = SyntaxLeaf*;
- using Reference = SyntaxLeaf&;
+ using Ptr = SyntaxLeaf*;
+ using Reference = SyntaxLeaf&;
using ConstReference = const SyntaxLeaf&;
/// \brief User data type.
diff --git a/include/CompilerKit/CodeGenerator.h b/include/CompilerKit/CodeGenerator.h
index 02202c3..f82441c 100644
--- a/include/CompilerKit/CodeGenerator.h
+++ b/include/CompilerKit/CodeGenerator.h
@@ -1,8 +1,7 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license
-
-======================================== */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef NECTAR_COMPILERKIT_CODEGENERATOR_H
#define NECTAR_COMPILERKIT_CODEGENERATOR_H
@@ -237,4 +236,3 @@ class EncoderPowerPC final : public IAssemblyEncoder {
} // namespace CompilerKit
#endif // NECTAR_COMPILERKIT_CODEGENERATOR_H
-
diff --git a/include/CompilerKit/Detail/32x0.h b/include/CompilerKit/Detail/32x0.h
index eb68a5b..2ac0b78 100644
--- a/include/CompilerKit/Detail/32x0.h
+++ b/include/CompilerKit/Detail/32x0.h
@@ -1,8 +1,7 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license
-
-======================================== */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef NECTAR_COMPILERKIT_DETAIL_32X0_H
#define NECTAR_COMPILERKIT_DETAIL_32X0_H
@@ -95,4 +94,3 @@ inline std::vector<CpuCode32x0> kOpcodes32x0 = {
////////////////////////////////
#endif // NECTAR_COMPILERKIT_DETAIL_32X0_H
-
diff --git a/include/CompilerKit/Detail/64x0.h b/include/CompilerKit/Detail/64x0.h
index 374ac76..6619983 100644
--- a/include/CompilerKit/Detail/64x0.h
+++ b/include/CompilerKit/Detail/64x0.h
@@ -1,8 +1,7 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license
-
-======================================== */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef NECTAR_COMPILERKIT_DETAIL_64X0_H
#define NECTAR_COMPILERKIT_DETAIL_64X0_H
@@ -101,4 +100,3 @@ inline std::vector<CpuOpcode64x0> kOpcodes64x0 = {
////////////////////////////////
#endif // NECTAR_COMPILERKIT_DETAIL_64X0_H
-
diff --git a/include/CompilerKit/Detail/AMD64.h b/include/CompilerKit/Detail/AMD64.h
index fcf7867..8f16968 100644
--- a/include/CompilerKit/Detail/AMD64.h
+++ b/include/CompilerKit/Detail/AMD64.h
@@ -1,8 +1,7 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license
-
-======================================== */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef NECTAR_COMPILERKIT_DETAIL_AMD64_H
#define NECTAR_COMPILERKIT_DETAIL_AMD64_H
@@ -51,4 +50,3 @@ inline std::vector<CpuOpcodeAMD64> kOpcodesAMD64 = {
#define kAsmRegisterLimit 16
#endif // NECTAR_COMPILERKIT_DETAIL_AMD64_H
-
diff --git a/include/CompilerKit/Detail/Aarch64.h b/include/CompilerKit/Detail/Aarch64.h
index e12262b..3b76b64 100644
--- a/include/CompilerKit/Detail/Aarch64.h
+++ b/include/CompilerKit/Detail/Aarch64.h
@@ -1,8 +1,7 @@
-/* ========================================
-
-Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license
-
-======================================== */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef NECTAR_COMPILERKIT_DETAIL_AARCH64_H
#define NECTAR_COMPILERKIT_DETAIL_AARCH64_H
@@ -42,4 +41,3 @@ typedef struct {
#define kOpcodeARM64Count (1000)
#endif // NECTAR_COMPILERKIT_DETAIL_AARCH64_H
-
diff --git a/include/CompilerKit/Detail/Config.h b/include/CompilerKit/Detail/Config.h
index 77ea0d8..40a453d 100644
--- a/include/CompilerKit/Detail/Config.h
+++ b/include/CompilerKit/Detail/Config.h
@@ -1,8 +1,7 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license
-
-======================================== */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef __COMPILERKIT_CONFIG_H__
#define __COMPILERKIT_CONFIG_H__
diff --git a/include/CompilerKit/Detail/Power64.h b/include/CompilerKit/Detail/Power64.h
index 48d09dc..8220264 100644
--- a/include/CompilerKit/Detail/Power64.h
+++ b/include/CompilerKit/Detail/Power64.h
@@ -1558,4 +1558,3 @@ inline CpuOpcodePPC kOpcodesPowerPC[] = {
#define kAsmRetRegister 19
#endif // NECTAR_COMPILERKIT_DETAIL_POWER64_H
-
diff --git a/include/CompilerKit/Detail/PreConfig.h b/include/CompilerKit/Detail/PreConfig.h
index 1457ffd..827c641 100644
--- a/include/CompilerKit/Detail/PreConfig.h
+++ b/include/CompilerKit/Detail/PreConfig.h
@@ -1,8 +1,7 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license
-
-======================================== */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef __COMPILERKIT_PRECONFIG_H__
#define __COMPILERKIT_PRECONFIG_H__
diff --git a/include/CompilerKit/ErrorID.h b/include/CompilerKit/ErrorID.h
index 0a2e666..3361c32 100644
--- a/include/CompilerKit/ErrorID.h
+++ b/include/CompilerKit/ErrorID.h
@@ -1,11 +1,7 @@
-/*
- * ========================================================
- *
- * CompilerKit
- * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license.
- *
- * ========================================================
- */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef NECTAR_COMPILERKIT_ERRORID_H
#define NECTAR_COMPILERKIT_ERRORID_H
@@ -30,4 +26,3 @@
#define NECTAR_INVALID_ARCH -38
#endif // NECTAR_COMPILERKIT_ERRORID_H
-
diff --git a/include/CompilerKit/ErrorOr.h b/include/CompilerKit/ErrorOr.h
index 7891c4e..d71d93e 100644
--- a/include/CompilerKit/ErrorOr.h
+++ b/include/CompilerKit/ErrorOr.h
@@ -1,11 +1,7 @@
-/*
- * ========================================================
- *
- * CompilerKit
- * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license.
- *
- * ========================================================
- */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef NECTAR_COMPILERKIT_ERROROR_H
#define NECTAR_COMPILERKIT_ERROROR_H
@@ -30,9 +26,9 @@ class ErrorOr final {
~ErrorOr() = default;
public:
- using RefType = StrongRef<T>;
+ using RefType = StrongRef<T>;
using Reference = T&;
- using Ptr = T*;
+ using Ptr = T*;
explicit ErrorOr(ErrorT err) : mId(err) {}
explicit ErrorOr(std::nullptr_t null) {}
@@ -59,4 +55,3 @@ using ErrorOrString = ErrorOr<STLString>;
} // namespace CompilerKit
#endif // NECTAR_COMPILERKIT_ERROROR_H
-
diff --git a/include/CompilerKit/Macros.h b/include/CompilerKit/Macros.h
index d60d90a..9030dc4 100644
--- a/include/CompilerKit/Macros.h
+++ b/include/CompilerKit/Macros.h
@@ -1,8 +1,7 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license
-
-======================================== */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
/// @brief provide support for Macros.h header.
@@ -26,4 +25,3 @@
KLASS(KLASS&&) = default;
#endif /* ifndef _NECTAR_MACROS_H_ */
-
diff --git a/include/CompilerKit/PEF.h b/include/CompilerKit/PEF.h
index 9655dd9..6d4d21f 100644
--- a/include/CompilerKit/PEF.h
+++ b/include/CompilerKit/PEF.h
@@ -1,8 +1,7 @@
-/* =========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license
-
-======================================== */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef NECTAR_COMPILERKIT_PEF_H
#define NECTAR_COMPILERKIT_PEF_H
@@ -139,4 +138,3 @@ inline std::ifstream& operator>>(std::ifstream& fp, CompilerKit::PEFCommandHeade
}
#endif // NECTAR_COMPILERKIT_PEF_H
-
diff --git a/include/CompilerKit/Ref.h b/include/CompilerKit/Ref.h
index 5717a3a..8690ad1 100644
--- a/include/CompilerKit/Ref.h
+++ b/include/CompilerKit/Ref.h
@@ -1,12 +1,7 @@
-
-/*
- * ========================================================
- *
- * CompilerKit
- * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license.
- *
- * ========================================================
- */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef NECTAR_COMPILERKIT_REF_H
#define NECTAR_COMPILERKIT_REF_H
@@ -99,4 +94,3 @@ using WeakAny = WeakRef<VoidPtr>;
} // namespace CompilerKit
#endif // NECTAR_COMPILERKIT_REF_H
-
diff --git a/include/CompilerKit/UUID.h b/include/CompilerKit/UUID.h
index 409223a..2993b8b 100644
--- a/include/CompilerKit/UUID.h
+++ b/include/CompilerKit/UUID.h
@@ -824,4 +824,3 @@ struct hash<uuids::uuid> {
} // namespace std
#endif /* STDUUID_H */
-
diff --git a/include/CompilerKit/Utilities/Assembler.h b/include/CompilerKit/Utilities/Assembler.h
index e43d451..249d69d 100644
--- a/include/CompilerKit/Utilities/Assembler.h
+++ b/include/CompilerKit/Utilities/Assembler.h
@@ -1,8 +1,7 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license
-
-======================================== */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef NECTAR_COMPILERKIT_UTILITIES_ASSEMBLER_H
#define NECTAR_COMPILERKIT_UTILITIES_ASSEMBLER_H
diff --git a/include/CompilerKit/Utilities/Compiler.h b/include/CompilerKit/Utilities/Compiler.h
index 8d00de0..84d6624 100644
--- a/include/CompilerKit/Utilities/Compiler.h
+++ b/include/CompilerKit/Utilities/Compiler.h
@@ -1,8 +1,7 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license
-
-======================================== */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef NECTAR_COMPILERKIT_UTILITIES_COMPILER_H
#define NECTAR_COMPILERKIT_UTILITIES_COMPILER_H
@@ -122,4 +121,3 @@ inline void drvi_crash_handler(std::int32_t id) {
} // namespace CompilerKit::Detail
#endif // NECTAR_COMPILERKIT_UTILITIES_COMPILER_H
-
diff --git a/include/CompilerKit/Utilities/DLL.h b/include/CompilerKit/Utilities/DLL.h
index 1f84bb8..92e6a63 100644
--- a/include/CompilerKit/Utilities/DLL.h
+++ b/include/CompilerKit/Utilities/DLL.h
@@ -1,8 +1,7 @@
-/* ========================================
-
- Copyright (C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license
-
-======================================== */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef NECTAR_COMPILERKIT_UTILITIES_DLL_H
#define NECTAR_COMPILERKIT_UTILITIES_DLL_H
@@ -70,4 +69,3 @@ class DLLLoader final {
} // namespace CompilerKit
#endif // NECTAR_COMPILERKIT_UTILITIES_DLL_H
-
diff --git a/include/CompilerKit/XCOFF.h b/include/CompilerKit/XCOFF.h
index 8a32518..45a116a 100644
--- a/include/CompilerKit/XCOFF.h
+++ b/include/CompilerKit/XCOFF.h
@@ -1,15 +1,7 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license
-
- File: XCOFF.h
- Purpose: XCOFF for Nectar.
-
- Revision History:
-
- 04/07/24: Added file (Amlal El Mahrouss)
-
-======================================== */
+// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
#ifndef _NECTAR_XCOFF_H_
#define _NECTAR_XCOFF_H_
@@ -41,4 +33,3 @@ typedef struct XCoffFileHeader* XCoffFileHeaderPtr;
} // namespace CompilerKit
#endif // ifndef _NECTAR_XCOFF_H_
-