Skip to content

Commit 3ba915f

Browse files
committed
bug fix in comment scanning
1 parent 8d9d9ce commit 3ba915f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

postgres/parser/parser/scan.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,6 @@ func (s *scanner) next() int {
451451
// block comments and whitespace will be concatenated together into the final return value.
452452
func (s *scanner) skipWhitespace(lval *sqlSymType, allowComments bool) (blockComment string, newline, ok bool) {
453453
newline = false
454-
var blockComments string
455454
for {
456455
ch := s.peek()
457456
if ch == '\n' {
@@ -468,9 +467,9 @@ func (s *scanner) skipWhitespace(lval *sqlSymType, allowComments bool) (blockCom
468467
return "", false, false
469468
} else if present {
470469
if len(blockComment) > 0 {
471-
blockComments += " "
470+
blockComment += " "
472471
}
473-
blockComments += cmt
472+
blockComment += cmt
474473
continue
475474
}
476475
}

0 commit comments

Comments
 (0)