Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Generate line mappings for empty expressions. #1156

Merged
merged 1 commit into from
Apr 3, 2017

Conversation

NTaylorMullen
Copy link
Member

  • At design time we weren't generating line mappings when a user would type @ or @(. This results in no C# IntelliSense being provided to the user because the editor hasn't mapped any of Razor to the C# buffer.
  • Updated the design time renderer and design time writer to account for empty expressions.
  • Modified the DefaultIRLoweringPhase to set source locations on empty expression nodes.
  • Re-generated test files to account for 0 length line mappings on empty expression nodes.

#1155

- At design time we weren't generating line mappings when a user would type `@` or `@(`. This results in no C# IntelliSense being provided to the user because the editor hasn't mapped any of Razor to the C# buffer.
- Updated the design time renderer and design time writer to account for empty expressions.
- Modified the `DefaultIRLoweringPhase` to set source locations on empty expression nodes.
- Re-generated test files to account for 0 length line mappings on empty expression nodes.

#1155
@NTaylorMullen
Copy link
Member Author

Merging this now to unblock tooling folks. Feel free to review after it's been merged, I recommend doing so with ?w=1 in the url to ignore whitespace.

@NTaylorMullen NTaylorMullen merged commit 4c0afba into dev Apr 3, 2017
@NTaylorMullen NTaylorMullen deleted the nimullen/emptyexpr.1155 branch April 3, 2017 05:25
Copy link
Contributor

@ajaybhargavb ajaybhargavb left a comment

Choose a reason for hiding this comment

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

Looks good. Did we miss this when we ported the code to Evolution? Or did we never generate this before?

@NTaylorMullen
Copy link
Member Author

Looks good. Did we miss this when we ported the code to Evolution? Or did we never generate this before?

Eh, "cleaned" it up when porting. Didn't realize it was needed.

Copy link
Member

@rynowak rynowak left a comment

Choose a reason for hiding this comment

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

:shipit: - looks fine

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants