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
f00dd967
Commit
f00dd967
authored
Mar 07, 2018
by
eckhart
Browse files
- small cleanups
parent
e5f8370f
Changes
2
Hide whitespace changes
Inline
Side-by-side
DHParser/toolkit.py
View file @
f00dd967
...
...
@@ -279,6 +279,7 @@ def expand_table(compact_table: Dict) -> Dict:
return
expanded_table
#######################################################################
#
# miscellaneous (DHParser-specific)
...
...
test/test_syntaxtree.py
View file @
f00dd967
...
...
@@ -181,7 +181,6 @@ class TestNodeFind():
tree
=
mock_syntax_tree
(
'(a (b X) (X (c d)) (e (X F)))'
)
assert
tree
[
0
]
==
mock_syntax_tree
(
'(b X)'
)
assert
tree
[
2
]
==
mock_syntax_tree
(
'(e (X F))'
)
print
(
flatten_sxpr
(
tree
[
0
].
as_sxpr
()))
try
:
node
=
tree
[
3
]
assert
False
,
"IndexError expected!"
...
...
@@ -189,7 +188,6 @@ class TestNodeFind():
pass
matches
=
list
(
tree
[
'X'
])
assert
matches
[
0
]
==
mock_syntax_tree
(
'(X (c d))'
)
print
(
flatten_sxpr
(
matches
[
0
].
as_sxpr
()))
assert
matches
[
1
]
==
mock_syntax_tree
(
'(X F)'
)
def
test_contains
(
self
):
...
...
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