aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-02-17 16:49:18 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-02-17 17:08:09 +0100
commit12ef905754d00d824e711610fca8bedc1b885e40 (patch)
treeb778dca9ad44f5bcb45c93f1d52d7707bd627be6
parentaec7c73b2aa83d43a02d4afe7ee1a42480cdfda2 (diff)
downloadaskama-12ef905754d00d824e711610fca8bedc1b885e40.tar.gz
askama-12ef905754d00d824e711610fca8bedc1b885e40.tar.bz2
askama-12ef905754d00d824e711610fca8bedc1b885e40.zip
Derive Debug for parser AST enums
-rw-r--r--askama/src/parser.rs5
1 files changed, 4 insertions, 1 deletions
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<Expr<'a>>, Box<Expr<'a>>),
}
+#[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>),