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

Roslyn Tokenizer Infrastructure #10676

Merged
merged 4 commits into from
Jul 29, 2024

Conversation

333fred
Copy link
Member

@333fred 333fred commented Jul 26, 2024

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.

@333fred 333fred requested review from a team as code owners July 26, 2024 20:59
Copy link
Member Author

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

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.

@jjonescz jjonescz added the area-compiler Umbrella for all compiler issues label Jul 29, 2024
@333fred 333fred merged commit b9c924b into dotnet:feature/roslyn-tokenizer Jul 29, 2024
12 checks passed
@333fred 333fred deleted the duplicate-info branch July 29, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-compiler Umbrella for all compiler issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants