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

feat(compiler): support skipping leading trivia in the lexer #30095

Closed
wants to merge 1 commit into from

Conversation

@petebacondarwin
Copy link
Member

commented Apr 24, 2019

Leading trivia, such as whitespace or comments, is
confusing for developers looking at source-mapped
templates, since they expect the source-map segment
to start after the trivia.

This commit add skipping this trivia to the Angular lexer.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@googlebot googlebot added the cla: yes label Apr 24, 2019

@petebacondarwin petebacondarwin force-pushed the petebacondarwin:FW-1284 branch from b62e895 to ed8d1d2 Apr 24, 2019

@ngbot ngbot bot added this to the needsTriage milestone Apr 24, 2019

@petebacondarwin petebacondarwin marked this pull request as ready for review Apr 24, 2019

@petebacondarwin petebacondarwin requested a review from angular/fw-compiler as a code owner Apr 24, 2019

@alxhub

alxhub approved these changes Apr 24, 2019

@AndrewKushnir

This comment has been minimized.

Copy link
Contributor

commented Apr 24, 2019

feat(compiler): support skipping leading trivia in template source-maps
Leading trivia, such as whitespace or comments, is
confusing for developers looking at source-mapped
templates, since they expect the source-map segment
to start after the trivia.

This commit adds skipping trivial characters to the lexer;
and then implements that in the template parser.
@AndrewKushnir

This comment has been minimized.

Copy link
Contributor

commented Apr 25, 2019

@petebacondarwin this PR had conflicts while merging into patch branch, so I merged it to master only. Could you please create a separate PR with the necessary changes against patch branch? Thank you.

@petebacondarwin

This comment has been minimized.

Copy link
Member Author

commented Apr 25, 2019

@AndrewKushnir - thanks I mistakenly marked if for both master and patch. But it should have only been master.

@petebacondarwin petebacondarwin deleted the petebacondarwin:FW-1284 branch Apr 25, 2019

BioPhoton added a commit to BioPhoton/angular that referenced this pull request May 21, 2019

feat(compiler): support skipping leading trivia in template source-ma…
…ps (angular#30095)

Leading trivia, such as whitespace or comments, is
confusing for developers looking at source-mapped
templates, since they expect the source-map segment
to start after the trivia.

This commit adds skipping trivial characters to the lexer;
and then implements that in the template parser.

PR Close angular#30095
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.