Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
badw-it
DHParser
Commits
368cc95a
Commit
368cc95a
authored
Mar 10, 2018
by
eckhart
Browse files
- transform.py: added remove_anonymous_tokens and ..._expendablse to exported symbols
parent
d5ba7af6
Changes
1
Hide whitespace changes
Inline
Side-by-side
DHParser/transform.py
View file @
368cc95a
...
...
@@ -79,6 +79,8 @@ __all__ = ('TransformationDict',
'remove_whitespace'
,
'remove_empty'
,
'remove_anonymous_empty'
,
'remove_anonymous_expendables'
,
'remove_anonymous_tokens'
,
'remove_expendables'
,
'remove_brackets'
,
'remove_infix_operator'
,
...
...
@@ -386,6 +388,7 @@ def is_token(context: List[Node], tokens: AbstractSet[str] = frozenset()) -> boo
tokens are a match.
"""
def
stripped
(
nd
:
Node
)
->
str
:
"""Removes leading and trailing whitespace-nodes from content."""
# assert node.parser.ptype == TOKEN_PTYPE
if
nd
.
children
:
i
,
k
=
0
,
len
(
nd
.
children
)
...
...
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