Skip to content

Range of SynExprRecordField should include the expression #13274

@nojaf

Description

@nojaf

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.

Metadata

Metadata

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions