-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Represent enhanced #line
directives in syntax API
#54318
Comments
These feel pretty differnet (to me at least). Do we expect any code to operate on hte base type itself? |
Code that is looking for mapped file paths can use the base class. |
Base class feels like the right solution to me. Even if we don't expect to see a large number of users of the base type, it would feel weird to me if the two forms of |
Updated proposal to extract a |
Added |
API ReviewAPI Approved
|
Re CharacterOffset: |
Presumably yes, but main question is whether we think that will ever happen. If you think that it's reasonable someone would want to know this from |
I can't predict future. I think it's ok to not expose it as long as we have a reasonable path forward if we need it. |
It's potentially a more onerous API to use. |
If someone is interested in knowing the offset at all they presumably have a reason to distinguish between |
Background and Motivation
Represent enhanced
#line
directives (see proposal) in the syntax model.Proposed API
Current
#line
directives are represented byMicrosoft.CodeAnalysis.CSharp.Syntax.LineDirectiveTriviaSyntax
.One possible approach is to introduce an additional class to represent enhanced
#line
directives and a common base class for both. The existingLineDirectiveTriviaSyntax
class would be unchanged other than some members becoming overrides of virtual base class members.A
CharacterOffset
property should be added toLineMapping
as well.The text was updated successfully, but these errors were encountered: