// scanLinecomment consumes the current rune and all contiguous tokens until End-Of-Line.
scanLinecomment consumes the current rune and all contiguous tokens until End-Of-Line.
// scanLinecomment consumes the current rune and all contiguous tokens until End - Of - Line .
func (s *Scanner) scanLinecomment() (tok Token, lit string) {
	var buf bytes.Buffer
	buf.WriteRune(s.read())
	for {
		ch := s.read()
		if isLineOrFileEnd(ch) {
			s.unread()
			break
		}
		buf.WriteRune(ch)
	}
	return LINECOMMENT, buf.String()
}
func ( s * Scanner ) scanLinecomment ( ) ( tok Token , lit string ) { var buf bytes . Buffer buf . WriteRune ( s . read ( ) ) for { ch := s . read ( ) if isLineOrFileEnd ( ch ) { s . unread ( ) break } buf . WriteRune ( ch ) } return LINECOMMENT , buf . String ( ) }
scanLinecomment consumes the current rune and all contiguous tokens until End-Of-Line.
scanLinecomment consumes the current rune and all contiguous tokens until End - Of - Line .
// Create a buffer and read the current character into it. // Read every subsequent string literal character into the buffer. // EOL and EOF will cause the loop to exit. Both are not consumed.