aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama_derive/src/generator.rs6
-rw-r--r--askama_derive/src/parser.rs4
2 files changed, 5 insertions, 5 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 3288e22..aa3eadf 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -244,7 +244,7 @@ impl<'a> Generator<'a> {
self.write(")");
}
- fn visit_call(&mut self, obj: &Expr, method: &str, args: &[Expr]) {
+ fn visit_method_call(&mut self, obj: &Expr, method: &str, args: &[Expr]) {
self.visit_expr(obj);
self.write(&format!(".{}(", method));
for (i, arg) in args.iter().enumerate() {
@@ -266,8 +266,8 @@ impl<'a> Generator<'a> {
Expr::BinOp(op, ref left, ref right) =>
self.visit_binop(op, left, right),
Expr::Group(ref inner) => self.visit_group(inner),
- Expr::Call(ref obj, method, ref args) =>
- self.visit_call(obj, method, args),
+ Expr::MethodCall(ref obj, method, ref args) =>
+ self.visit_method_call(obj, method, args),
}
}
diff --git a/askama_derive/src/parser.rs b/askama_derive/src/parser.rs
index c6c437c..9e8f087 100644
--- a/askama_derive/src/parser.rs
+++ b/askama_derive/src/parser.rs
@@ -10,7 +10,7 @@ pub enum Expr<'a> {
Filter(&'a str, Vec<Expr<'a>>),
BinOp(&'a str, Box<Expr<'a>>, Box<Expr<'a>>),
Group(Box<Expr<'a>>),
- Call(Box<Expr<'a>>, &'a str, Vec<Expr<'a>>),
+ MethodCall(Box<Expr<'a>>, &'a str, Vec<Expr<'a>>),
}
#[derive(Debug)]
@@ -173,7 +173,7 @@ named!(expr_attr<Expr>, do_parse!(
let mut res = obj;
for (aname, args) in attrs {
res = if args.is_some() {
- Expr::Call(Box::new(res), aname, args.unwrap())
+ Expr::MethodCall(Box::new(res), aname, args.unwrap())
} else {
Expr::Attr(Box::new(res), aname)
};