From 8e0c01ae39f2f1f80ad0d372119e8654de21d29c Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 20 Jul 2012 23:47:34 +1200 Subject: Fine-tuning for injection: docs, bugfixes. --- libpathod/rparse.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'libpathod/rparse.py') diff --git a/libpathod/rparse.py b/libpathod/rparse.py index 5a2f84b1..e71265ea 100644 --- a/libpathod/rparse.py +++ b/libpathod/rparse.py @@ -421,7 +421,8 @@ class InjectAt: e = e + pp.MatchFirst( [ v_integer, - pp.Literal("r") + pp.Literal("r"), + pp.Literal("a") ] ) e += pp.Literal(",").suppress() @@ -429,7 +430,13 @@ class InjectAt: return e.setParseAction(lambda x: klass(*x)) def accept(self, settings, r): - r.actions.append((self.offset, "inject", self.value)) + r.actions.append( + ( + self.offset, + "inject", + self.value.get_generator(settings) + ) + ) class Header: -- cgit v1.2.3