The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit ef51e777 authored by di68kap's avatar di68kap
Browse files

Merge remote-tracking branch 'origin/master'

parents b1450063 a9354ef2
......@@ -279,6 +279,7 @@ def expand_table(compact_table: Dict) -> Dict:
return expanded_table
#######################################################################
#
# miscellaneous (DHParser-specific)
......
......@@ -382,8 +382,7 @@ def is_token(context: List[Node], tokens: AbstractSet[str] = frozenset()) -> boo
return "".join(child.content for child in node.children[i:k])
return nd.content
node = context[-1]
return (node.parser.ptype == TOKEN_PTYPE and (not tokens or stripped(node) in tokens))
return node.parser.ptype == TOKEN_PTYPE and (not tokens or stripped(node) in tokens)
@transformation_factory(AbstractSet[str])
......@@ -755,6 +754,7 @@ remove_expendables = remove_children_if(is_expendable)
# partial(remove_children_if, condition=is_expendable)
remove_anonymous_expendables = remove_children_if(lambda ctx: is_anonymous(ctx)
and is_expendable(ctx))
remove_anonymous_tokens = remove_children_if(lambda ctx: is_token(ctx) and is_anonymous(ctx))
remove_first = apply_if(keep_children(slice(1, None)), lambda ctx: len(ctx[-1].children) > 1)
remove_last = apply_if(keep_children(slice(None, -1)), lambda ctx: len(ctx[-1].children) > 1)
remove_brackets = apply_if(keep_children(slice(1, -1)), lambda ctx: len(ctx[-1].children) >= 2)
......
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment