From 12ef905754d00d824e711610fca8bedc1b885e40 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Fri, 17 Feb 2017 16:49:18 +0100 Subject: Derive Debug for parser AST enums --- askama/src/parser.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/askama/src/parser.rs b/askama/src/parser.rs index 425f148..e3758fe 100644 --- a/askama/src/parser.rs +++ b/askama/src/parser.rs @@ -1,6 +1,7 @@ use nom::{self, IResult}; use std::str; +#[derive(Debug)] pub enum Expr<'a> { StrLit(&'a str), Var(&'a str), @@ -8,13 +9,15 @@ pub enum Expr<'a> { BinOp(&'a str, Box>, Box>), } +#[derive(Debug)] pub enum Target<'a> { Name(&'a str), } -#[derive(Clone, Copy)] +#[derive(Clone, Copy, Debug)] pub struct WS(pub bool, pub bool); +#[derive(Debug)] pub enum Node<'a> { Lit(&'a str, &'a str, &'a str), Expr(WS, Expr<'a>), -- cgit