We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Consider the following code:
[<DllImport("oleacc.dll")>] extern int AccessibleChildren()
Matching AST
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)))
Expected behavior
I would expect the range of the SynModuleDecl.Let and SynBinding to include the range of the attribute.
SynModuleDecl.Let
SynBinding
Actual behavior
Range is 2.0 - 2.31, not starting from 1.0 as the attribute does.
2.0 - 2.31
1.0
Known workarounds
Create a custom range based on other elements.
Related information
Provide any related information (optional):
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Consider the following code:
Matching AST
Expected behavior
I would expect the range of the
SynModuleDecl.Let
andSynBinding
to include the range of the attribute.Actual behavior
Range is
2.0 - 2.31
, not starting from1.0
as the attribute does.Known workarounds
Create a custom range based on other elements.
Related information
Provide any related information (optional):
The text was updated successfully, but these errors were encountered: