(lval *sqlSymType, allowComments bool)
| 413 | } |
| 414 | |
| 415 | func (s *scanner) skipWhitespace(lval *sqlSymType, allowComments bool) (newline, ok bool) { |
| 416 | newline = false |
| 417 | for { |
| 418 | ch := s.peek() |
| 419 | if ch == '\n' { |
| 420 | s.pos++ |
| 421 | newline = true |
| 422 | continue |
| 423 | } |
| 424 | if ch == ' ' || ch == '\t' || ch == '\r' || ch == '\f' { |
| 425 | s.pos++ |
| 426 | continue |
| 427 | } |
| 428 | if allowComments { |
| 429 | if present, cok := s.scanComment(lval); !cok { |
| 430 | return false, false |
| 431 | } else if present { |
| 432 | continue |
| 433 | } |
| 434 | } |
| 435 | break |
| 436 | } |
| 437 | return newline, true |
| 438 | } |
| 439 | |
| 440 | func (s *scanner) scanComment(lval *sqlSymType) (present, ok bool) { |
| 441 | start := s.pos |
no test coverage detected