summaryrefslogtreecommitdiffhomepage
path: root/include/CompilerKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-01-23 10:21:30 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-01-23 10:22:13 +0100
commitbaa456251dc978b3bdb33c77a5c02c2e53fb2d3e (patch)
treeb717b671841a2757ea3b49b7d3044a3ab659ad58 /include/CompilerKit
parenta092f344f33e18a5323f9631b650c73f02635c74 (diff)
chore: necdrv: AST improvements and frontend milestones and new
keywords. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/CompilerKit')
-rw-r--r--include/CompilerKit/AST.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/CompilerKit/AST.h b/include/CompilerKit/AST.h
index 7529d73..fef5279 100644
--- a/include/CompilerKit/AST.h
+++ b/include/CompilerKit/AST.h
@@ -51,6 +51,8 @@ enum struct KeywordKind {
kKeywordKindSpecifier,
kKeywordKindInvalid,
kKeywordKindReturn,
+ kKeywordKindExtern,
+ kKeywordKindImport,
kKeywordKindCommentInline,
kKeywordKindCommentMultiLineStart,
kKeywordKindCommentMultiLineEnd,
@@ -88,17 +90,20 @@ struct SyntaxLeafList final {
using Reference = SyntaxLeaf&;
using ConstReference = const SyntaxLeaf&;
+ enum {
+ kPlaceNone = 0,
+ kPlaceBefore = 100,
+ kPlaceAfter,
+ };
+
/// \brief User data type.
Int32 fUserType{};
-
/// \brief User data buffer.
SyntaxKeyword fUserData{{}, KeywordKind::kKeywordKindInvalid};
-
/// \brief User data value
STLString fUserValue{};
-
- /// \brief Next user data on list.
- Ptr fNext{nullptr};
+ /// \brief Should this value be placed before or after?
+ Int32 fPlaceType{};
};
using ArrayType = std::vector<SyntaxLeaf>;