Skip to content

Commit 618561c

Browse files
committed
PR feedback and fix NewFalseExpression
1 parent 3eaad51 commit 618561c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

internal/scanner/scanner.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2341,11 +2341,11 @@ func ComputePositionOfLineAndCharacter(lineStarts []core.TextPos, line int, char
23412341
return res
23422342
}
23432343

2344-
func GetLeadingCommentRanges(f ast.NodeFactoryCoercible, text string, pos int) iter.Seq[ast.CommentRange] {
2344+
func GetLeadingCommentRanges(f *ast.NodeFactory, text string, pos int) iter.Seq[ast.CommentRange] {
23452345
return iterateCommentRanges(f, text, pos, false)
23462346
}
23472347

2348-
func GetTrailingCommentRanges(f ast.NodeFactoryCoercible, text string, pos int) iter.Seq[ast.CommentRange] {
2348+
func GetTrailingCommentRanges(f *ast.NodeFactory, text string, pos int) iter.Seq[ast.CommentRange] {
23492349
return iterateCommentRanges(f, text, pos, true)
23502350
}
23512351

@@ -2355,8 +2355,7 @@ Single-line comment ranges include the leading double-slash characters but not t
23552355
line break. Multi-line comment ranges include the leading slash-asterisk and trailing
23562356
asterisk-slash characters.
23572357
*/
2358-
func iterateCommentRanges(fc ast.NodeFactoryCoercible, text string, pos int, trailing bool) iter.Seq[ast.CommentRange] {
2359-
f := fc.AsNodeFactory()
2358+
func iterateCommentRanges(f *ast.NodeFactory, text string, pos int, trailing bool) iter.Seq[ast.CommentRange] {
23602359
return func(yield func(ast.CommentRange) bool) {
23612360
var pendingPos int
23622361
var pendingEnd int

0 commit comments

Comments
 (0)