lexer/lexer.go
func (l *Lexer) NextToken() token.Token {
	if l.inside {
		return l.nextInsideToken()
	}
	var tok token.Token

	// l.skipWhitespace()
	if l.ch == 0 {
		tok.Literal = ""
		tok.Type = token.EOF
		tok.LineNumber = l.curLine
		return tok
	}

	if l.ch == '<' && l.peekChar() == '%' {
		l.inside = true
		return l.nextInsideToken()
	}

	tok.Type = token.HTML
	tok.Literal = l.readHTML()
	tok.LineNumber = l.curLine
	return tok
}
func (l *Lexer) NextToken() token.Token {
	if l.inside {
		return l.nextInsideToken()
	}
	var tok token.Token

	// l.skipWhitespace()
	if l.ch == 0 {
		tok.Literal = ""
		tok.Type = token.EOF
		tok.LineNumber = l.curLine
		return tok
	}

	if l.ch == '<' && l.peekChar() == '%' {
		l.inside = true
		return l.nextInsideToken()
	}

	tok.Type = token.HTML
	tok.Literal = l.readHTML()
	tok.LineNumber = l.curLine
	return tok
}
func ( l * Lexer ) NextToken ( ) token . Token { if l . inside { return l . nextInsideToken ( ) } var tok token . Token // l.skipWhitespace() if l . ch == 0 { tok . Literal = " " tok . Type = token . EOF tok . LineNumber = l . curLine return tok } if l . ch == '<' && l . peekChar ( ) == '%' { l . inside = true return l . nextInsideToken ( ) } tok . Type = token . HTML tok . Literal = l . readHTML ( ) tok . LineNumber = l . curLine return tok }
// NextToken from the source input
NextToken from the source input