-
Notifications
You must be signed in to change notification settings - Fork 834
Closed
Labels
Area-Compiler-Syntaxlexfilter, indentation and parsinglexfilter, indentation and parsingBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
Description
Consider parsing
$$$"""{{{5}}}"""This will lead to
SynExpr.InterpolatedString(
SynInterpolatedStringPart.String(value = "", range = R("(1,0--1,9)"))
SynInterpolatedStringPart.FillExpr(fillExpr = SynExpr.Const(constant = SynConst.Int32(5), range = R("(1,9--1,10)")), qualifiers = None)
SynInterpolatedStringPart.String(value = "", range = R("(1,12--1,16)"))
)The range of the opening SynInterpolatedStringPart.String covers $$$"""{{{, while the closing SynInterpolatedStringPart.String only covers the range of }""".
Expected behaviour
It should cover }}}""" instead.
Actual behavior
The range only starts from the last }.
Related information
Discovered via fsprojects/fantomas#3012
@abonie as you worked on this, could you give me a pointer where in the lexer this could be fixed?
Metadata
Metadata
Assignees
Labels
Area-Compiler-Syntaxlexfilter, indentation and parsinglexfilter, indentation and parsingBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Type
Projects
Status
Done