release: Storybook v0.2.0 - Major syntax and features update
BREAKING CHANGES: - Relationship syntax now requires blocks for all participants - Removed self/other perspective blocks from relationships - Replaced 'guard' keyword with 'if' for behavior tree decorators Language Features: - Add tree-sitter grammar with improved if/condition disambiguation - Add comprehensive tutorial and reference documentation - Add SBIR v0.2.0 binary format specification - Add resource linking system for behaviors and schedules - Add year-long schedule patterns (day, season, recurrence) - Add behavior tree enhancements (named nodes, decorators) Documentation: - Complete tutorial series (9 chapters) with baker family examples - Complete reference documentation for all language features - SBIR v0.2.0 specification with binary format details - Added locations and institutions documentation Examples: - Convert all examples to baker family scenario - Add comprehensive working examples Tooling: - Zed extension with LSP integration - Tree-sitter grammar for syntax highlighting - Build scripts and development tools Version Updates: - Main package: 0.1.0 → 0.2.0 - Tree-sitter grammar: 0.1.0 → 0.2.0 - Zed extension: 0.1.0 → 0.2.0 - Storybook editor: 0.1.0 → 0.2.0
This commit is contained in:
@@ -73,26 +73,21 @@ fn valid_participant(name: String) -> impl Strategy<Value = Participant> {
|
||||
prop::option::of(valid_ident()).prop_map(move |role| Participant {
|
||||
name: vec![name.clone()],
|
||||
role,
|
||||
self_block: None,
|
||||
other_block: None,
|
||||
fields: vec![],
|
||||
span: Span::new(0, 10),
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn valid_participant_with_blocks(name: String) -> impl Strategy<Value = Participant> {
|
||||
(
|
||||
prop::option::of(valid_ident()),
|
||||
prop::option::of(valid_field_list()),
|
||||
prop::option::of(valid_field_list()),
|
||||
)
|
||||
.prop_map(move |(role, self_block, other_block)| Participant {
|
||||
(prop::option::of(valid_ident()), valid_field_list()).prop_map(move |(role, fields)| {
|
||||
Participant {
|
||||
name: vec![name.clone()],
|
||||
role,
|
||||
self_block,
|
||||
other_block,
|
||||
fields,
|
||||
span: Span::new(0, 10),
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fn valid_relationship() -> impl Strategy<Value = Relationship> {
|
||||
@@ -142,15 +137,13 @@ fn valid_bidirectional_relationship() -> impl Strategy<Value = (Relationship, Re
|
||||
let p1 = Participant {
|
||||
name: vec![p1_name.clone()],
|
||||
role: None,
|
||||
self_block: Some(p1_self),
|
||||
other_block: None,
|
||||
fields: p1_self,
|
||||
span: Span::new(0, 10),
|
||||
};
|
||||
let p2_in_p1_rel = Participant {
|
||||
name: vec![p2_name.clone()],
|
||||
role: None,
|
||||
self_block: None,
|
||||
other_block: None,
|
||||
fields: vec![],
|
||||
span: Span::new(0, 10),
|
||||
};
|
||||
|
||||
@@ -165,15 +158,13 @@ fn valid_bidirectional_relationship() -> impl Strategy<Value = (Relationship, Re
|
||||
let p2 = Participant {
|
||||
name: vec![p2_name],
|
||||
role: None,
|
||||
self_block: Some(p2_self),
|
||||
other_block: None,
|
||||
fields: p2_self,
|
||||
span: Span::new(20, 30),
|
||||
};
|
||||
let p1_in_p2_rel = Participant {
|
||||
name: vec![p1_name],
|
||||
role: None,
|
||||
self_block: None,
|
||||
other_block: None,
|
||||
fields: vec![],
|
||||
span: Span::new(20, 30),
|
||||
};
|
||||
|
||||
@@ -257,15 +248,13 @@ proptest! {
|
||||
Participant {
|
||||
name: vec![p1.clone()],
|
||||
role: None,
|
||||
self_block: None,
|
||||
other_block: None,
|
||||
fields: vec![],
|
||||
span: Span::new(0, 10),
|
||||
},
|
||||
Participant {
|
||||
name: vec![p2.clone()],
|
||||
role: None,
|
||||
self_block: None,
|
||||
other_block: None,
|
||||
fields: vec![],
|
||||
span: Span::new(0, 10),
|
||||
},
|
||||
],
|
||||
@@ -279,15 +268,13 @@ proptest! {
|
||||
Participant {
|
||||
name: vec![p2.clone()],
|
||||
role: None,
|
||||
self_block: None,
|
||||
other_block: None,
|
||||
fields: vec![],
|
||||
span: Span::new(20, 30),
|
||||
},
|
||||
Participant {
|
||||
name: vec![p1.clone()],
|
||||
role: None,
|
||||
self_block: None,
|
||||
other_block: None,
|
||||
fields: vec![],
|
||||
span: Span::new(20, 30),
|
||||
},
|
||||
],
|
||||
@@ -327,15 +314,13 @@ proptest! {
|
||||
Participant {
|
||||
name: vec![p1.clone()],
|
||||
role: None,
|
||||
self_block: None,
|
||||
other_block: None,
|
||||
fields: vec![],
|
||||
span: Span::new(0, 10),
|
||||
},
|
||||
Participant {
|
||||
name: vec![p2.clone()],
|
||||
role: None,
|
||||
self_block: None,
|
||||
other_block: None,
|
||||
fields: vec![],
|
||||
span: Span::new(0, 10),
|
||||
},
|
||||
],
|
||||
@@ -349,15 +334,13 @@ proptest! {
|
||||
Participant {
|
||||
name: vec![p1],
|
||||
role: None,
|
||||
self_block: None,
|
||||
other_block: None,
|
||||
fields: vec![],
|
||||
span: Span::new(20, 30),
|
||||
},
|
||||
Participant {
|
||||
name: vec![p2],
|
||||
role: None,
|
||||
self_block: None,
|
||||
other_block: None,
|
||||
fields: vec![],
|
||||
span: Span::new(20, 30),
|
||||
},
|
||||
],
|
||||
@@ -391,16 +374,14 @@ proptest! {
|
||||
let participant1 = Participant {
|
||||
name: vec![p1.clone()],
|
||||
role: None,
|
||||
self_block: Some(fields1),
|
||||
other_block: None,
|
||||
fields: fields1,
|
||||
span: Span::new(0, 10),
|
||||
};
|
||||
|
||||
let participant1_again = Participant {
|
||||
name: vec![p1.clone()],
|
||||
role: None,
|
||||
self_block: Some(fields2),
|
||||
other_block: None,
|
||||
fields: fields2,
|
||||
span: Span::new(20, 30),
|
||||
};
|
||||
|
||||
@@ -411,8 +392,7 @@ proptest! {
|
||||
Participant {
|
||||
name: vec![p2.clone()],
|
||||
role: None,
|
||||
self_block: None,
|
||||
other_block: None,
|
||||
fields: vec![],
|
||||
span: Span::new(0, 10),
|
||||
},
|
||||
],
|
||||
@@ -427,8 +407,7 @@ proptest! {
|
||||
Participant {
|
||||
name: vec![p2],
|
||||
role: None,
|
||||
self_block: None,
|
||||
other_block: None,
|
||||
fields: vec![],
|
||||
span: Span::new(20, 30),
|
||||
},
|
||||
],
|
||||
@@ -461,6 +440,8 @@ proptest! {
|
||||
species: None,
|
||||
fields: vec![],
|
||||
template: None,
|
||||
uses_behaviors: None,
|
||||
uses_schedule: None,
|
||||
span: Span::new(0, 10),
|
||||
})),
|
||||
valid_ident().prop_map(|name| Declaration::Template(Template {
|
||||
@@ -468,6 +449,8 @@ proptest! {
|
||||
fields: vec![],
|
||||
strict: false,
|
||||
includes: vec![],
|
||||
uses_behaviors: None,
|
||||
uses_schedule: None,
|
||||
span: Span::new(0, 10),
|
||||
})),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user