From 470f8001a1dba0022ec9d3e46c67c3bbc31359be Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 30 Jun 2021 11:40:27 +0200 Subject: No more collisions between syntax::Tree and layout::Tree --- src/syntax/expr.rs | 2 +- src/syntax/mod.rs | 2 +- src/syntax/node.rs | 6 +++--- src/syntax/visit.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/syntax') 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, + pub tree: Rc, } /// 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; +pub type SyntaxTree = Vec; 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, + pub body: Rc, } /// 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, /// 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); } -- cgit v1.2.3