summaryrefslogtreecommitdiff
path: root/src/syntax
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-06-30 11:40:27 +0200
committerLaurenz <laurmaedje@gmail.com>2021-06-30 11:40:27 +0200
commit470f8001a1dba0022ec9d3e46c67c3bbc31359be (patch)
treed68f60533201658148ea508c90ba704f806561d5 /src/syntax
parent45812b700114a51f0ee21e31f4454cde3729eaf5 (diff)
No more collisions between syntax::Tree and layout::Tree
Diffstat (limited to 'src/syntax')
-rw-r--r--src/syntax/expr.rs2
-rw-r--r--src/syntax/mod.rs2
-rw-r--r--src/syntax/node.rs6
-rw-r--r--src/syntax/visit.rs2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/syntax/expr.rs b/src/syntax/expr.rs
index aabff1ea..26ec7f48 100644
--- a/src/syntax/expr.rs
+++ b/src/syntax/expr.rs
@@ -158,7 +158,7 @@ pub struct TemplateExpr {
/// The source code location.
pub span: Span,
/// The contents of the template.
- pub tree: Rc<Tree>,
+ pub tree: Rc<SyntaxTree>,
}
/// A grouped expression: `(1 + 2)`.
diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs
index 9426090c..6673fda6 100644
--- a/src/syntax/mod.rs
+++ b/src/syntax/mod.rs
@@ -16,4 +16,4 @@ pub use token::*;
/// The abstract syntax tree.
///
/// This type can represent a full parsed document.
-pub type Tree = Vec<Node>;
+pub type SyntaxTree = Vec<Node>;
diff --git a/src/syntax/node.rs b/src/syntax/node.rs
index 79b1e352..1fbdb3d8 100644
--- a/src/syntax/node.rs
+++ b/src/syntax/node.rs
@@ -52,7 +52,7 @@ pub struct HeadingNode {
/// The section depth (numer of equals signs).
pub level: usize,
/// The contents of the heading.
- pub body: Rc<Tree>,
+ pub body: Rc<SyntaxTree>,
}
/// An item in an unordered list: `- ...`.
@@ -61,7 +61,7 @@ pub struct ListItem {
/// The source code location.
pub span: Span,
/// The contents of the list item.
- pub body: Tree,
+ pub body: SyntaxTree,
}
/// An item in an enumeration (ordered list): `1. ...`.
@@ -72,5 +72,5 @@ pub struct EnumItem {
/// The number, if any.
pub number: Option<usize>,
/// The contents of the list item.
- pub body: Tree,
+ pub body: SyntaxTree,
}
diff --git a/src/syntax/visit.rs b/src/syntax/visit.rs
index 657b379a..66c5f979 100644
--- a/src/syntax/visit.rs
+++ b/src/syntax/visit.rs
@@ -79,7 +79,7 @@ macro_rules! impl_visitor {
}
impl_visitors! {
- visit_tree(v, tree: Tree) {
+ visit_tree(v, tree: SyntaxTree) {
for node in tree {
v.visit_node(node);
}