// scanIRI consumes the current rune and all contiguous literal tokens until >
// Both surrounding <> are included.
//todo Same as string literal, are line breaks possible?
scanIRI consumes the current rune and all contiguous literal tokens until >
Both surrounding <> are included.
// scanIRI consumes the current rune and all contiguous literal tokens until > // Both surrounding < > are included . // todo Same as string literal are line breaks possible?
func (s *Scanner) scanIRI() (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)
		if ch == '>' {
			break
		}
	}
	return IRI, buf.String()
}
func ( s * Scanner ) scanIRI ( ) ( 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 ) if ch == '>' { break } } return IRI , buf . String ( ) }
scanIRI consumes the current rune and all contiguous literal tokens until >
Both surrounding <> are included.
scanIRI consumes the current rune and all contiguous literal tokens until > Both surrounding < > are included .
// Create a buffer and read the current character into it. // Read every subsequent string literal character into the buffer. // Quote end EOF/EOL will cause the loop to exit. // var chPrev rune // break at > // chPrev = ch