fsharp icon indicating copy to clipboard operation
fsharp copied to clipboard

Range of SynExprRecordField should include the expression

Open nojaf opened this issue 3 years ago • 0 comments

Given the following code and AST:

let config = {
    root_url =
      // #if WATCH
        "http://localhost:8080/"
      // #endif
}
Record
  (None, None,
   [SynExprRecordField
      ((SynLongIdent ([root_url], [], [None]), true),
       Some tmp.fsx (2,13--2,14),
       Some
         (Const
            (String
               ("http://localhost:8080/", Regular,
                tmp.fsx (4,8--4,32)), tmp.fsx (4,8--4,32))),
       None)], tmp.fsx (1,13--6,1))

Expected behaviour

I would think the range of the SynExprRecordField would span till the end of the expression.

Actual behaviour

It appears to be ending after the equals sign.

Known workarounds

Calculate the range.

nojaf avatar Jun 10 '22 14:06 nojaf