conlang: Add Quote expression as a hack for testing
Possibly removed later, or replaced with something that turns Conlang AST nodes into Conlang data structures.
This commit is contained in:
@@ -388,6 +388,7 @@ pub mod yamlify {
|
||||
impl Yamlify for ExprKind {
|
||||
fn yaml(&self, y: &mut Yamler) {
|
||||
match self {
|
||||
ExprKind::Quote(k) => k.yaml(y),
|
||||
ExprKind::Let(k) => k.yaml(y),
|
||||
ExprKind::Assign(k) => k.yaml(y),
|
||||
ExprKind::Modify(k) => k.yaml(y),
|
||||
@@ -417,6 +418,11 @@ pub mod yamlify {
|
||||
}
|
||||
}
|
||||
}
|
||||
impl Yamlify for Quote {
|
||||
fn yaml(&self, y: &mut Yamler) {
|
||||
y.key("Quote").value(self);
|
||||
}
|
||||
}
|
||||
impl Yamlify for Assign {
|
||||
fn yaml(&self, y: &mut Yamler) {
|
||||
let Self { parts } = self;
|
||||
|
||||
Reference in New Issue
Block a user