feat(selfhost): @[Checked] borrow checker — basic write-through-ptr detection
- Add isChecked field to Decl struct (ast.bux) - Parse @[Checked] attribute in parserParseDecl (parser.bux) - Add checkedFunc flag and movedVars to Sema struct (sema.bux) - Enable borrow checking per-function in Sema_Analyze - Reject assignment through raw pointer (*T) in @[Checked] functions - Skip newlines between @[Checked] attribute and the declaration keyword to avoid parser seeing the attribute and function as separate decls
This commit is contained in:
@@ -250,6 +250,7 @@ struct Decl {
|
||||
column: uint32,
|
||||
isPublic: bool,
|
||||
isAsync: bool,
|
||||
isChecked: int, // @[Checked] attribute (0/1)
|
||||
// Names
|
||||
strValue: String, // decl name
|
||||
strValue2: String, // interface name, dll name, module path
|
||||
|
||||
Reference in New Issue
Block a user