Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
DHParser
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
badw-it
DHParser
Commits
588474ca
Commit
588474ca
authored
Jun 13, 2019
by
eckhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- cython compatibility restored
parent
7d533d69
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
DHParser/syntaxtree.pxd
DHParser/syntaxtree.pxd
+2
-2
DHParser/syntaxtree.py
DHParser/syntaxtree.py
+1
-2
No files found.
DHParser/syntaxtree.pxd
View file @
588474ca
...
...
@@ -16,14 +16,14 @@ cdef class Node:
cpdef
is_anonymous
(
self
)
cpdef
_content
(
self
)
cpdef
with_pos
(
self
,
pos
)
cpdef
has_attr
(
self
)
# cpdef has_attr(self, attr
)
# cpdef compare_attr(self, other)
# cpdef _tree_repr(self, tab, open_fn, close_fn, data_fn, density, inline, inline_fn)
# cpdef as_sxpr(self, src, indentation, compact)
# cpdef as_xml(self, src, indentation, inline_tags, omit_tags, empty_tags)
# cpdef select_if(self, match_function, include_root, reverse)
# cpdef select(self, tag_names, include_root)
cpdef
pick
(
self
,
tag_names
)
# cpdef pick(self, criterion, reverse
)
# cpdef tree_size(self)
cpdef
to_json_obj
(
self
)
...
...
DHParser/syntaxtree.py
View file @
588474ca
...
...
@@ -614,8 +614,7 @@ class Node: # (collections.abc.Sized): Base class omitted for cython-compatibil
"""
return
self
.
select_if
(
create_match_function
(
criterion
),
include_root
,
reverse
)
def
pick
(
self
,
criterion
:
CriteriaType
,
reverse
:
bool
=
False
)
->
Optional
[
'Node'
]:
def
pick
(
self
,
criterion
:
CriteriaType
,
reverse
:
bool
=
False
)
->
Optional
[
'Node'
]:
"""
Picks the first (or last if run in reverse mode) descendant that fulfills
the given criterion which can be either a match-function or a tag-name or
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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