Phase 8.2 foundation: @[Checked] attr, &T refs, own keyword — gradual ownership syntax

This commit is contained in:
2026-05-31 13:39:20 +03:00
parent f71c034d9e
commit 3949a2f91e
11 changed files with 67 additions and 7 deletions
+4 -1
View File
@@ -27,6 +27,8 @@ type
tekPath
tekSlice
tekPointer
tekRef ## &T — shared reference (gradual ownership)
tekMutRef ## &mut T — mutable reference
tekTuple
tekSelf
@@ -41,7 +43,7 @@ type
of tekSlice:
sliceElement*: TypeExpr
sliceSize*: Expr ## nil for unsized slices T[]
of tekPointer:
of tekPointer, tekRef, tekMutRef:
pointerPointee*: TypeExpr
of tekTuple:
tupleElements*: seq[TypeExpr]
@@ -313,6 +315,7 @@ type
Decl* = ref object
loc*: SourceLocation
isPublic*: bool
declAttrs*: seq[string] ## attributes: @[Checked], @[Inline], etc.
case kind*: DeclKind
of dkFunc:
declFuncAsm*: bool