-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
Proposal: dotnet/csharplang#4747
Spec: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-10.0/enhanced-line-directives.md
#line (startLine, startChar) - (endLine, endChar) charOffset "fileName"
Parsing
-
-langversion - in inactive region
- incomplete directive
- missing tokens
- unexpected token types
- with extra/no trivia between tokens
Semantics
-
CSharpSyntaxTree.GetLineMappings() - values out of range
-
(endLine, endChar) < (startLine, startChar) - before/after
#line default,#line hidden,#line number - diagnostic reported for mapped span
- sequence points in mapped span
- diagnostics and
GetLineMappings()return default (unmapped) spans after malformed#line - spans that start/end before/after
charOffsetwith single- and multi-line spans - spans shorter/longer than mapped span with single- and multi-line spans
-
SyntaxNormalizer -
CSharpCompiler.ResolveEmbeddedFilesFromExternalSourceDirectives()
Productivity
- Classification:
ClassifyTrivia(),ClassifyPreprocessorDirective() - Formatting
- EnC after changing
#line -
CSharpSyntaxFacts.TryGetExternalSourceInfo()
Reactions are currently unavailable