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

hoc: don't nest calls to follow() when lexing ++/+= and --/-= #287

Merged
merged 1 commit into from
Sep 19, 2019

Conversation

deepcube
Copy link
Contributor

The code had a nested use of the follow() function that could cause +=+
and -=- to register as ++ and --. The first follow() to execute could
consume a character and match and then the second follow() could consume
another character and match. For example i-=-10 would result in a syntax
error and i-=- would decrement i.

@nsajko
Copy link
Contributor

nsajko commented Sep 11, 2019

You should probably change the capital "D" to lowercase "d" in the commit message and pull request title, for consistency with existing commits.

The code had a nested use of the follow() function that could cause +=+
and -=- to register as ++ and --.  The first follow() to execute could
consume a character and match and then the second follow() could consume
another character and match.  For example i-=-10 would result in a syntax
error and i-=- would decrement i.
@deepcube
Copy link
Contributor Author

You should probably change the capital "D" to lowercase "d" in the commit message and pull request title, for consistency with existing commits.

Done^wdone

@deepcube deepcube changed the title hoc: Don't nest calls to follow() when lexing ++/+= and --/-= hoc: don't nest calls to follow() when lexing ++/+= and --/-= Sep 12, 2019
@dancrossnyc dancrossnyc merged commit f1dd3f0 into 9fans:master Sep 19, 2019
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.

3 participants