code: func lexLiteral(l *lexer) stateFn {
  	// emit the closing of the initial {literal} tag
  	var ch = l.next()
  	for isSpace(ch) {
  		ch = l.next()
  	}
  	if ch != '}' {
  		return l.errorf("expected closing tag after {literal..")
  	}
  	if l.doubleDelim && l.next() != '}' {
  		return l.errorf("expected double closing braces in tag")
  	}
  	l.emit(itemRightDelim)
  
  	// Fast forward through the literal section.
  	var expectClose, delimLen = "{/literal}", 1
  	if l.doubleDelim {
  		expectClose, delimLen = "{{/literal}}", 2
  	}
  	var i = strings.Index(l.input[l.pos:], expectClose)
  	if i == -1 {
  		return l.errorf("unclosed literal")
  	}
  	l.pos += ast.Pos(i)
  
  	// Accept everything as itemText until we see the {/literal}
  	// Emit the other various tokens.
  	if i > 0 {
  		l.emit(itemText)
  	}
  	l.pos += ast.Pos(delimLen)
  	l.emit(itemLeftDelim)
  	l.pos += ast.Pos(len("/literal"))
  	l.emit(itemLiteralEnd)
  	l.pos += ast.Pos(delimLen)
  	l.emit(itemRightDelim)
  	return lexText
  }
docs: // lexLiteral scans until a closing literal delimiter, "{\literal}".
  // It emits the literal text and the closing tag.
  //
  // A literal section contains raw text and may include braces.
  // itemLiteral has already been emitted.