Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite glue_ordinal to return tokens, refs #214 #2

Merged
merged 3 commits into from
Feb 7, 2017

Conversation

davidbgk
Copy link
Contributor

@davidbgk davidbgk commented Feb 3, 2017

No description provided.

elif previous is not None:
# Matches "bis" either followed by a type or nothing.
if (ordinal_pattern.match(token) and
(not next_ or (next_ and types_pattern.match(next_)))):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can simplify a bit: … and (not next_ or types_pattern.match(next_)…

else:
yield previous
previous = None
yield token
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WIth a continue in the first if we can remove one of the two yield token I think

@yohanboniface yohanboniface merged commit f3c424d into master Feb 7, 2017
@yohanboniface yohanboniface deleted the rewrite-glue-ordinal branch February 7, 2017 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants