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

add more test cases for lambda tokenization #255

Merged
merged 2 commits into from Apr 24, 2018

Conversation

Projects
None yet
2 participants
@falcondai
Contributor

falcondai commented Apr 24, 2018

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

Matches lambda via lookahead for whitespace or :. This resolves #246 and a problem introduced in #253

Alternate Designs

Benefits

Possible Drawbacks

Applicable Issues

#253 broke parsing lambda_not.foo. This fixes it while preserving correct tokenization for #246

@@ -335,7 +335,7 @@
]
}
{
'begin': '\\b(lambda)\\s?+'
'begin': '\\b(lambda)(?=[\\s\\:])'

This comment has been minimized.

@maxbrunsfeld

maxbrunsfeld Apr 24, 2018

Contributor

Would something as simple as a word boundary anchor (\b) work here, or do you need the lookahead?

This comment has been minimized.

@falcondai

falcondai Apr 24, 2018

Contributor

That s a very good point! Let me push a new commit

@maxbrunsfeld maxbrunsfeld merged commit 9efeb2a into atom:master Apr 24, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@maxbrunsfeld

This comment has been minimized.

Contributor

maxbrunsfeld commented Apr 24, 2018

Thanks for following up on the lambda_not thing.

@falcondai

This comment has been minimized.

Contributor

falcondai commented Apr 24, 2018

Sure thing! I happen to see that in my code just now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment