X Tutup
Skip to content

fix(parser): detect and report interpolation in expressions#3750

Closed
pkozlowski-opensource wants to merge 1 commit intoangular:masterfrom
pkozlowski-opensource:interp_in_exps
Closed

fix(parser): detect and report interpolation in expressions#3750
pkozlowski-opensource wants to merge 1 commit intoangular:masterfrom
pkozlowski-opensource:interp_in_exps

Conversation

@pkozlowski-opensource
Copy link
Copy Markdown
Member

Fixes #3645

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What about adding the check in parseInterpolation() to avoid duplicating the logic here ?
(you would have to check that you are parsing a template binding there)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hmm, yeh, this line here is not ideal but I didn't want to call the entire parseIntorpolation just to do this check. I'm not sure I can think of a much better solution atm....

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What I mean is that if parseInterpolation() finds an interpolation while we are parsing a tpl binding, we should throw.

This would also makes your code consistent with the existing code (check how parsePipe() throws when parsing an action)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM when the minor fixes are in (as discussed)

@0x-r4bbit
Copy link
Copy Markdown
Contributor

Ah, love this! 👍

@pkozlowski-opensource pkozlowski-opensource added the action: review The PR is still awaiting reviews from at least one requested reviewer label Aug 21, 2015
@mhevery
Copy link
Copy Markdown
Contributor

mhevery commented Aug 23, 2015

@vicb When you say LGTM, please add LGTM label. if you want fixes, also add action: cleanup

@mhevery mhevery added pr_state: LGTM action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Aug 23, 2015
@pkozlowski-opensource
Copy link
Copy Markdown
Member Author

All the cleanup was done, going to get ahead and merge it.

@pkozlowski-opensource pkozlowski-opensource added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Aug 23, 2015
@mary-poppins
Copy link
Copy Markdown

Merging PR #3750 on behalf of @pkozlowski-opensource to branch presubmit-pkozlowski-opensource-pr-3750.

@mary-poppins mary-poppins removed the action: merge The PR is ready for merge by the caretaker label Aug 23, 2015
@angular-automatic-lock-bot
Copy link
Copy Markdown

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 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(compiler): [property]="{{foo}}" should raise an exception

6 participants

X Tutup