selfhost: add @[Drop] attribute for user-defined structs
- ast.bux: add isDrop field to Decl - parser.bux: parse @[Drop] attribute and attach to struct Decls - hir_lower.bux: auto-drop now looks for TypeName_Drop for any type - Test: _test_drop_user verifies Buffer_Drop is auto-called
This commit is contained in:
@@ -274,6 +274,7 @@ struct Decl {
|
||||
isPublic: bool,
|
||||
isAsync: bool,
|
||||
isChecked: int, // @[Checked] attribute (0/1)
|
||||
isDrop: int, // @[Drop] attribute (0/1)
|
||||
// Names
|
||||
strValue: String, // decl name
|
||||
strValue2: String, // interface name, dll name, module path
|
||||
|
||||
Reference in New Issue
Block a user