summaryrefslogtreecommitdiff
path: root/src/syntax/tree.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax/tree.rs')
-rw-r--r--src/syntax/tree.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/syntax/tree.rs b/src/syntax/tree.rs
index 31f334d2..44acd023 100644
--- a/src/syntax/tree.rs
+++ b/src/syntax/tree.rs
@@ -33,6 +33,8 @@ pub enum SyntaxNode {
Text(String),
/// Lines of raw text.
Raw(Vec<String>),
+ /// An optionally highlighted (multi-line) code block.
+ Code(Code),
/// A function call.
Call(CallExpr),
}
@@ -199,3 +201,10 @@ impl CallExpr {
}
}
}
+/// A code block.
+#[derive(Debug, Clone, PartialEq)]
+pub struct Code {
+ pub lang: Option<Spanned<Ident>>,
+ pub lines: Vec<String>,
+ pub block: bool,
+}