-
Notifications
You must be signed in to change notification settings - Fork 832
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
Any original keyword string (__LINE__, __SOURCE_DIRECTORY__ or __SOURCE_FILE__) information is currently lost in the untyped tree.
They are represented as SynConst.String with the resolved values.
__LINE__leads to
Const(String ("1", tmp.fsx (1,0--1,8) IsSynthetic=false), tmp.fsx (1,0--1,8) IsSynthetic=false),Describe the solution you'd like
I propose to extend SynConst with a new union case | KeywordString of constant: string * value: string * range: Range.
Describe alternatives you've considered
Get the original keyword from the F# tokens.
Additional context
This would lead to a richer AST and would be one less check Fantomas has to do to restore the original typed value.
auduchinok and smoothdeveloper