Classes
Declared as
#![allow(unused)] fn main() { #[term(class $name $binder)] pub struct ClassDecl { pub name: ValueId, pub binder: Binder<ClassDeclBoundData>, } #[term($:where $,predicates { $*fields $*methods })] pub struct ClassDeclBoundData { pub predicates: Vec<Predicate>, pub fields: Vec<FieldDecl>, pub methods: Vec<MethodDecl>, } }
Class members
Fields
A field Field
...
#![allow(unused)] fn main() { #[term($?atomic $name : $ty ;)] pub struct FieldDecl { pub atomic: Atomic, pub name: FieldId, pub ty: Ty, } }
...has three properties:
- atomicity -- atomic or not
- name
- type