Skip to content

[Proposal]: Enhanced #line directives #4747

@tmat

Description

@tmat

Enhanced #line directives

  • Proposed
  • Prototype: Done
  • Implementation: Done
  • Specification: Not Started

Summary

The compiler applies the mapping defined by #line directives to diagnostic locations and sequence points emitted to the PDB.

Currently only the line number and file path can be mapped while the starting character is inferred from the source code. The proposal is to allow specifying full span mapping.

#line (startLine, startChar) - (endLine, endChar) charOffset "fileName"

Spec: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-10.0/enhanced-line-directives.md

Drawbacks

Alternatives

Unresolved questions

Design meetings

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions