Permalink
Browse files

Changed Preserve() to accept a string argument as a Literal.

  • Loading branch information...
JStoker
JStoker committed Mar 20, 2012
1 parent 75fa05a commit a76892cbad62d001b52b251b206291701a628c3e
Showing with 3 additions and 4 deletions.
  1. +1 −2 parcon/.gitignore
  2. +2 −2 parcon/parcon/__init__.py
View
@@ -1,2 +1 @@
-/dist
-/MANIFEST
+*.py[co]
@@ -1814,7 +1814,7 @@ class Present(_GParser):
probably want to use Preserve instead.
"""
def __init__(self, parser):
- self.parser = parser
+ self.parser = promote(parser)
def parse(self, text, position, end, space):
result = self.parser.parse(text, position, end, space)
@@ -1840,7 +1840,7 @@ class Preserve(_GParser):
parser returned, even though it doesn't consume any input.
"""
def __init__(self, parser):
- self.parser = parser
+ self.parser = promote(parser)
def parse(self, text, position, end, space):
result = self.parser.parse(text, position, end, space)

0 comments on commit a76892c

Please sign in to comment.