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

Re-add marker IR tokens to represent CSharp in an expression. #1160

Merged
merged 2 commits into from
Apr 3, 2017

Conversation

NTaylorMullen
Copy link
Contributor

Reverted the last generate line mapping bits for empty expressions because it wasn't 100% accurate. It wouldn't always generate line mappings in the correct location. Example, if a user wrote @() they would get a line mapping that would point to the beginning of the @ and not in the middle of the parens. I re-enabled IR for empty CSharp tokens since they inherently represent where C# is expected. A great example of this expectation is writing @ before would never end up in a C# compile error because we'd strip out the Write( statement; with markers we get appropriate errors and design time experience.

  • 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.
  • Modified the DefaultIRLoweringPhase to allow for marker symbols, these symbols .
  • Re-generated test files to account for 0 length line mappings on empty expression nodes.

#1155

This is blocking tooling.

- 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.
- Modified the `DefaultIRLoweringPhase` to allow for marker symbols, these symbols .
- Re-generated test files to account for 0 length line mappings on empty expression nodes.

#1155
@NTaylorMullen NTaylorMullen merged commit 0e15ff3 into dev Apr 3, 2017
@NTaylorMullen NTaylorMullen deleted the nimullen/readdmarkers.1155 branch April 3, 2017 20:05
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:

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.

4 participants