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

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

@petebacondarwin petebacondarwin added area: core Issues related to the framework runtime comp: ivy effort1: hours freq2: medium action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release risk: low labels 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 April 24, 2019 21:18
@petebacondarwin petebacondarwin requested a review from a team as a code owner April 24, 2019 21:18
@petebacondarwin petebacondarwin added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 24, 2019
@AndrewKushnir
Copy link
Contributor

AndrewKushnir commented Apr 24, 2019

Presubmit

@AndrewKushnir AndrewKushnir added action: presubmit The PR is in need of a google3 presubmit and removed action: presubmit The PR is in need of a google3 presubmit labels 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 adds skipping trivial characters to the lexer;
and then implements that in the template parser.
@AndrewKushnir AndrewKushnir added target: major This PR is targeted for the next major release and removed target: patch This PR is targeted for the next patch release labels Apr 25, 2019
@AndrewKushnir
Copy link
Contributor

@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
Copy link
Member Author

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

@petebacondarwin petebacondarwin deleted the FW-1284 branch April 25, 2019 20:24
BioPhoton pushed a commit to BioPhoton/angular that referenced this pull request May 21, 2019
…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
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime cla: yes effort1: hours freq2: medium risk: low target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants