Skip to content

Fix bug parsing unary subtypes with newlines #393

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

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

c42f
Copy link
Member

@c42f c42f commented Nov 21, 2023

In expressions like "a +\n\n<:" the presence of peek(ps, skip_newlines=true) was inconsistent with the use of bump() without skip_newlines. It seems that we didn't need skip_newlines at all in parse_unary_subtype, so do this to be consistent with parsing of other operators.

Fix #392

In expressions like `"a +\n\n<:"` the presence of `peek(ps, skip_newlines=true)` was
inconsistent with the use of `bump()` without `skip_newlines`. It seems
that we didn't need skip_newlines at all in parse_unary_subtype, so do
this to be consistent with parsing of other operators.
Copy link

codecov bot commented Nov 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a6b94d2) 96.58% compared to head (c2ca143) 96.58%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #393   +/-   ##
=======================================
  Coverage   96.58%   96.58%           
=======================================
  Files          14       14           
  Lines        4187     4187           
=======================================
  Hits         4044     4044           
  Misses        143      143           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@c42f c42f merged commit 5769755 into main Nov 21, 2023
@c42f c42f deleted the caf/fix-newlines-with-unary-subtype branch November 21, 2023 10:32
@c42f c42f mentioned this pull request Nov 23, 2023
10 tasks
c42f added a commit that referenced this pull request Dec 6, 2023
In expressions like `"a +\n\n<:"` the presence of `peek(ps, skip_newlines=true)` was
inconsistent with the use of `bump()` without `skip_newlines`. It seems
that we didn't need skip_newlines at all in parse_unary_subtype, so do
this to be consistent with parsing of other operators.
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.

"a +\n\n>:" and related expressions with >: parse incorrectly
1 participant