Skip to content

Fix #4500 Allow keyword start after numbers #4501

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 2 commits into from
Aug 28, 2018

Conversation

benkobalog
Copy link
Contributor

No description provided.

@benkobalog benkobalog changed the title Fix #4400 Allow keyword start after numbers Fix #4500 Allow keyword start after numbers May 10, 2018
@allanrenucci
Copy link
Contributor

Wrong issue number in commit message

@benkobalog
Copy link
Contributor Author

I fixed it @allanrenucci

@@ -79,7 +79,7 @@ object SyntaxHighlighting {
} else {
if (n.isUpper && (keywordStart || prev == '.')) {
appendWhile(n, !typeEnders.contains(_), typeDef)
} else if (keywordStart) {
} else if (keywordStart || prev.isDigit) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't you fix keywordStart instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking about it too and maybe I should have asked first.
The other place where keywordStart is used is type ascriptions (the if just before the one I modified). And as far as I know there is no situation where a number literal can precede a type ascription. For this reason I only added it here.
But maybe it would be better to add it to keywordStart.

Copy link
Contributor

@allanrenucci allanrenucci left a comment

Choose a reason for hiding this comment

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

Sorry @benkobalog. I forgot about this PR.

I think the fix has to go in keywordStart. I rebased the PR and appended a commit

@allanrenucci allanrenucci merged commit 1d24eaa into scala:master Aug 28, 2018
@benkobalog benkobalog deleted the fix-#4500 branch August 29, 2018 07:46
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