From a68b4498b87cbc8fc6f1c1c660df5fac09ca564e Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 26 Jun 2012 15:36:59 +1200 Subject: Allow naked value literal for pathoc path specifications. --- libpathod/rparse.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libpathod/rparse.py') diff --git a/libpathod/rparse.py b/libpathod/rparse.py index bb45ae00..6306f746 100644 --- a/libpathod/rparse.py +++ b/libpathod/rparse.py @@ -293,6 +293,8 @@ class Body: class Path: def __init__(self, value): + if isinstance(value, basestring): + value = ValueLiteral(value) self.value = value def accept(self, settings, r): @@ -300,7 +302,7 @@ class Path: @classmethod def expr(klass): - e = Value.copy() + e = v_naked_literal.copy() return e.setParseAction(lambda x: klass(*x)) -- cgit v1.2.3