@@ -863,7 +863,7 @@ func (p *Parser) parseExpectedMatchingBrackets(openKind ast.Kind, closeKind ast.
863863 return
864864 }
865865 if lastError != nil {
866- related := ast .NewDiagnostic (nil , core .NewTextRange (openPosition , openPosition + 1 ), diagnostics .The_parser_expected_to_find_a_1_to_match_the_0_token_here , scanner .TokenToString (openKind ), scanner .TokenToString (closeKind ))
866+ related := ast .NewDiagnostic (nil , core .NewTextRange (openPosition , openPosition ), diagnostics .The_parser_expected_to_find_a_1_to_match_the_0_token_here , scanner .TokenToString (openKind ), scanner .TokenToString (closeKind ))
867867 lastError .AddRelatedInfo (related )
868868 }
869869}
@@ -2925,7 +2925,7 @@ func (p *Parser) parseImportType() *ast.Node {
29252925 if len (p .diagnostics ) != 0 {
29262926 lastDiagnostic := p .diagnostics [len (p .diagnostics )- 1 ]
29272927 if lastDiagnostic .Code () == diagnostics .X_0_expected .Code () {
2928- related := ast .NewDiagnostic (nil , core .NewTextRange (openBracePosition , openBracePosition + 1 ), diagnostics .The_parser_expected_to_find_a_1_to_match_the_0_token_here , "{" , "}" )
2928+ related := ast .NewDiagnostic (nil , core .NewTextRange (openBracePosition , openBracePosition ), diagnostics .The_parser_expected_to_find_a_1_to_match_the_0_token_here , "{" , "}" )
29292929 lastDiagnostic .AddRelatedInfo (related )
29302930 }
29312931 }
@@ -2972,7 +2972,7 @@ func (p *Parser) parseImportAttributes(token ast.Kind, skipKeyword bool) *ast.No
29722972 if len (p .diagnostics ) != 0 {
29732973 lastDiagnostic := p .diagnostics [len (p .diagnostics )- 1 ]
29742974 if lastDiagnostic .Code () == diagnostics .X_0_expected .Code () {
2975- related := ast .NewDiagnostic (nil , core .NewTextRange (openBracePosition , openBracePosition + 1 ), diagnostics .The_parser_expected_to_find_a_1_to_match_the_0_token_here , "{" , "}" )
2975+ related := ast .NewDiagnostic (nil , core .NewTextRange (openBracePosition , openBracePosition ), diagnostics .The_parser_expected_to_find_a_1_to_match_the_0_token_here , "{" , "}" )
29762976 lastDiagnostic .AddRelatedInfo (related )
29772977 }
29782978 }
0 commit comments