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

Fixed inline comments parsing #148

Merged
merged 2 commits into from
Apr 6, 2017
Merged

Fixed inline comments parsing #148

merged 2 commits into from
Apr 6, 2017

Conversation

nijel
Copy link
Contributor

@nijel nijel commented Apr 4, 2017

This is different approach than #147 to fix phpmyadmin/phpmyadmin#13139.

Please review the changes.

The newline is now included as separate token, previously it was
silently discarded, so it was not present in output.

See phpmyadmin/phpmyadmin#13139

Signed-off-by: Michal Čihař <michal@cihar.com>
Concatenating line terminated comments will change the query.

Signed-off-by: Michal Čihař <michal@cihar.com>
@codecov
Copy link

codecov bot commented Apr 4, 2017

Codecov Report

Merging #148 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##             master   #148   +/-   ##
=======================================
  Coverage       100%   100%           
- Complexity     1682   1687    +5     
=======================================
  Files            55     55           
  Lines          3950   3956    +6     
=======================================
+ Hits           3950   3956    +6

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5114843...7973054. Read the comment docs.

// Include trailing \n as whitespace token
if ($this->last < $this->len) {
$this->last--;
}

Copy link
Member

Choose a reason for hiding this comment

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

I am not very familiar with the Lexer code, but I believe this makes sense. Having the whitespaces as a separate whitespace token makes sense.

@nijel nijel merged commit 518eb1b into phpmyadmin:master Apr 6, 2017
@nijel nijel deleted the inline-comment-newline branch April 6, 2017 14:54
nijel added a commit that referenced this pull request Apr 6, 2017
Signed-off-by: Michal Čihař <michal@cihar.com>
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.

Inline comments making succeeding line commented - new line removed
2 participants