Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
badw-it
DHParser
Commits
93fc373b
Commit
93fc373b
authored
Apr 20, 2017
by
Eckhart Arnold
Browse files
- Capture and Retrieve Operators now warn about being experimental
parent
38f369b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
DHParser/parsers.py
View file @
93fc373b
...
...
@@ -853,6 +853,7 @@ class NegativeLookbehind(Lookbehind):
class
Capture
(
UnaryOperator
):
def
__init__
(
self
,
parser
,
name
=
None
):
super
(
Capture
,
self
).
__init__
(
parser
,
name
)
print
(
"WARNING: Capture operator is experimental"
)
def
__call__
(
self
,
text
):
node
,
text
=
self
.
parser
(
text
)
...
...
@@ -871,6 +872,7 @@ class Retrieve(Parser):
super
(
Retrieve
,
self
).
__init__
(
name
)
self
.
symbol
=
symbol
self
.
counterpart
=
counterpart
if
counterpart
else
lambda
value
:
value
print
(
"WARNING: Retrieve operator is experimental"
)
def
__deepcopy__
(
self
,
memo
):
return
self
.
__class__
(
self
.
symbol
,
self
.
counterpart
,
self
.
name
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment