-
Notifications
You must be signed in to change notification settings - Fork 196
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
Roslyn Tokenizer Infrastructure #10676
Roslyn Tokenizer Infrastructure #10676
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests are duplicates of the non-legacy versions, they just use the legacy parser.
@@ -44,6 +44,10 @@ public partial class RazorSourceGenerator | |||
|
|||
var razorConfiguration = new RazorConfiguration(razorLanguageVersion, configurationName ?? "default", Extensions: [], UseConsolidatedMvcViews: true); | |||
|
|||
// We use the new tokenizer by default | |||
var useRazorTokenizer = !parseOptions.Features.TryGetValue("use-razor-tokenizer", out var useRazorTokenizerValue) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure the best way to actually test this. We could wait for the new tokenizer and test a side effect, like strings being handled better, but that doesn't seem like a great approach. I don't have any better ideas though.
This is some of the infrastructure that will be needed to get the Roslyn tokenizer in. We'll have the new tokenizer, and an option to switch back to the legacy tokenizer. To make reviewing easier, I would highly suggest going commit-by-commit, to make sure that the renames show up as actual renames.