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

[Parse] Refactor Lexer's skipToEndOfline #13495

Merged
merged 3 commits into from
Dec 19, 2017

Conversation

omochi
Copy link
Collaborator

@omochi omochi commented Dec 17, 2017

Lexer has two similar methods which are skipToEndOfLine and skipUpToEndOfLine.

This PR unify them.

The only difference in them are that
it will stop at which before or after of newline found,
so add EatNewline parameter to function to control this.

And because of this behavior about newline,
lexTrivia does not reuse skipSlashSlashComment and skipHashbang.
So add EatNewline to them, use in common from lexTrivia

This PR includes my other PR #13483

@harlanhaskins
Copy link
Collaborator

@swift-ci please smoke test

@rintaro
Copy link
Member

rintaro commented Dec 18, 2017

@omochi Could you rebase this PR?

@omochi
Copy link
Collaborator Author

omochi commented Dec 18, 2017

@rintaro OK, I will do.

@omochi
Copy link
Collaborator Author

omochi commented Dec 18, 2017

I rebased and tested it locally.

@rintaro
Copy link
Member

rintaro commented Dec 18, 2017

Thanks!
@swift-ci Please smoke test

@rintaro rintaro merged commit 023379c into apple:master Dec 19, 2017
@omochi omochi deleted the lexer-refactor-skip-to-eol branch March 7, 2018 14:38
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.

None yet

4 participants