ImplFile
(ParsedImplFileInput
("tmp.fsx", true, QualifiedNameOfFile Tmp$fsx, [], [],
[SynModuleOrNamespace
([Tmp], false, AnonModule,
[Let
(false,
[SynBinding
(None, Normal, false, false,
[{ Attributes =
[{ TypeName = LongIdentWithDots ([DllImport], [])
ArgExpr =
Paren
(Const
(String
("oleacc.dll", Regular,
tmp.fsx (1,12--1,24) IsSynthetic=false),
tmp.fsx (1,12--1,24) IsSynthetic=false),
tmp.fsx (1,11--1,12) IsSynthetic=false,
Some tmp.fsx (1,24--1,25) IsSynthetic=false,
tmp.fsx (1,11--1,25) IsSynthetic=false)
Target = None
AppliesToGetterAndSetter = false
Range = tmp.fsx (1,2--1,11) IsSynthetic=false }]
Range = tmp.fsx (1,0--1,27) IsSynthetic=false }],
PreXmlDoc ((2,6), FSharp.Compiler.Xml.XmlDocCollector),
SynValData
(None, SynValInfo ([[]], SynArgInfo ([], false, None)), None),
LongIdent
(LongIdentWithDots ([AccessibleChildren], []), None,
Some (SynValTyparDecls ([], false, [])),
Pats
[Tuple
(false, [], tmp.fsx (2,29--2,30) IsSynthetic=false)],
None, tmp.fsx (2,11--2,29) IsSynthetic=false),
Some
(SynBindingReturnInfo
(App
(LongIdent (LongIdentWithDots ([int], [])), None, [],
[], None, false,
tmp.fsx (2,7--2,10) IsSynthetic=false),
tmp.fsx (2,7--2,10) IsSynthetic=false, [])),
Typed
(App
(NonAtomic, false, Ident failwith,
Const
(String
("extern was not given a DllImport attribute",
Regular, tmp.fsx (2,30--2,31) IsSynthetic=false),
tmp.fsx (2,30--2,31) IsSynthetic=false),
tmp.fsx (2,0--2,31) IsSynthetic=false),
App
(LongIdent (LongIdentWithDots ([int], [])), None, [], [],
None, false, tmp.fsx (2,7--2,10) IsSynthetic=false),
tmp.fsx (2,0--2,31) IsSynthetic=false),
tmp.fsx (2,0--2,31) IsSynthetic=false, NoneAtInvisible)],
tmp.fsx (2,0--2,31) IsSynthetic=false)], PreXmlDocEmpty, [], None,
tmp.fsx (1,0--2,31) IsSynthetic=false)], (true, true)))
Create a custom range based on other elements.
Consider the following code:
Matching AST
Expected behavior
I would expect the range of the
SynModuleDecl.LetandSynBindingto include the range of the attribute.Actual behavior
Range is
2.0 - 2.31, not starting from1.0as the attribute does.Known workarounds
Create a custom range based on other elements.
Related information
Provide any related information (optional):