func newHelperMethodDoctype(ln *line, rslt *result, src *source, parent element, opts *Options) (*helperMethodDoctype, error) {
	if len(ln.tokens) < 3 {
		return nil, fmt.Errorf("doctype is not specified [file: %s][line: %d]", ln.fileName(), ln.no)
	}

	doctype := ln.tokens[2]

	if _, ok := doctypes[doctype]; !ok {
		return nil, fmt.Errorf("doctype is invalid [file: %s][line: %d][doctype: %s]", ln.fileName(), ln.no, doctype)
	}

	e := &helperMethodDoctype{
		elementBase: newElementBase(ln, rslt, src, parent, opts),
		doctype:     doctype,
	}

	return e, nil
}
func newHelperMethodDoctype(ln *line, rslt *result, src *source, parent element, opts *Options) (*helperMethodDoctype, error) {
	if len(ln.tokens) < 3 {
		return nil, fmt.Errorf("doctype is not specified [file: %s][line: %d]", ln.fileName(), ln.no)
	}

	doctype := ln.tokens[2]

	if _, ok := doctypes[doctype]; !ok {
		return nil, fmt.Errorf("doctype is invalid [file: %s][line: %d][doctype: %s]", ln.fileName(), ln.no, doctype)
	}

	e := &helperMethodDoctype{
		elementBase: newElementBase(ln, rslt, src, parent, opts),
		doctype:     doctype,
	}

	return e, nil
}
// newHelperMethodDoctype creates and returns a helper method doctype.