code: func lexText(l *lexer) stateFn {
  	var r, lastChar rune
  	for {
  		lastChar = r
  		r = l.next()
  
  		// comment / soydoc handling
  		if r == '/' {
  			switch l.next() {
  			case '/':
  				// '//' only begins a comment if the previous character is whitespace,
  				// or if we are the start of input.
  				var lastCharEmitted = lastChar
  				if lastChar == 0 && l.lastEmit.val != "" {
  					lastCharEmitted = rune(l.lastEmit.val[len(l.lastEmit.val)-1])
  				}
  				if lastCharEmitted == 0 || isSpaceEOL(lastCharEmitted) {
  					maybeEmitText(l, 3)
  					if lastChar != 0 {
  						l.start++ // ignore the preceeding space, if present.
  					}
  					return lexLineComment(l)
  				}
  			case '*':
  				maybeEmitText(l, 2)
  				if l.next() == '*' {
  					return lexSoyDoc(l)
  				}
  				l.backup()
  				return lexBlockComment(l)
  			}
  			l.backup()
  		}
  
  		// eof or entering a tag?
  		switch r {
  		case '{':
  			l.backup()
  			maybeEmitText(l, 0)
  			return lexLeftDelim
  		case '}':
  			return l.errorf("unexpected closing delimiter } found in input.")
  		case eof:
  			l.backup()
  			maybeEmitText(l, 0)
  			l.emit(itemEOF)
  			return nil
  		}
  	}
  }
docs: // lexText scans until an opening command delimiter, "{".
  // it ignores line comments (//) and block comments (/* */).