Kernel only attribute annotation (#76) #127
|
@ -14,6 +14,15 @@ pub struct ComposerConfig {
|
||||||
pub kernel_invariant_ann: &'static str,
|
pub kernel_invariant_ann: &'static str,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for ComposerConfig {
|
||||||
|
fn default() -> Self {
|
||||||
|
ComposerConfig {
|
||||||
|
kernel_ann: None,
|
||||||
|
kernel_invariant_ann: "Invariant"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type DefAst = (Arc<RwLock<TopLevelDef>>, Option<ast::Stmt<()>>);
|
type DefAst = (Arc<RwLock<TopLevelDef>>, Option<ast::Stmt<()>>);
|
||||||
pub struct TopLevelComposer {
|
pub struct TopLevelComposer {
|
||||||
// list of top level definitions, same as top level context
|
// list of top level definitions, same as top level context
|
||||||
|
@ -35,10 +44,7 @@ pub struct TopLevelComposer {
|
||||||
|
|
||||||
impl Default for TopLevelComposer {
|
impl Default for TopLevelComposer {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::new(vec![], ComposerConfig {
|
Self::new(vec![], Default::default()).0
|
||||||
kernel_ann: None,
|
|
||||||
kernel_invariant_ann: "Invariant"
|
|
||||||
}).0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ fn main() {
|
||||||
let primitive: PrimitiveStore = TopLevelComposer::make_primitives().0;
|
let primitive: PrimitiveStore = TopLevelComposer::make_primitives().0;
|
||||||
let (mut composer, builtins_def, builtins_ty) = TopLevelComposer::new(
|
let (mut composer, builtins_def, builtins_ty) = TopLevelComposer::new(
|
||||||
vec![],
|
vec![],
|
||||||
ComposerConfig { kernel_ann: None, kernel_invariant_ann: "Invariant" }
|
Default::default()
|
||||||
);
|
);
|
||||||
|
|
||||||
let internal_resolver: Arc<ResolverInternal> = ResolverInternal {
|
let internal_resolver: Arc<ResolverInternal> = ResolverInternal {
|
||||||
|
|
Loading…
Reference in New Issue