Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit a76892cbad62d001b52b251b206291701a628c3e 1 parent 75fa05a
JStoker authored
Showing with 3 additions and 4 deletions.
  1. +1 −2  parcon/.gitignore
  2. +2 −2 parcon/parcon/__init__.py
View
3  parcon/.gitignore
@@ -1,2 +1 @@
-/dist
-/MANIFEST
+*.py[co]
View
4 parcon/parcon/__init__.py
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.