(value)
return no_fold_literal, value[1:]
no-fold-literal = "[" *dtext "]"
no-fold-literal = "[" *dtext "]"
no - fold - literal = [ * dtext ]
def get_no_fold_literal(value):
    """ no-fold-literal = "[" *dtext "]"
    """
    no_fold_literal = NoFoldLiteral()
    if not value:
        raise errors.HeaderParseError(
            "expected no-fold-literal but found '{}'".format(value))
    if value[0] != '[':
        raise errors.HeaderParseError(
            "expected '[' at the start of no-fold-literal "
            "but found '{}'".format(value))
    no_fold_literal.append(ValueTerminal('[', 'no-fold-literal-start'))
    value = value[1:]
    token, value = get_dtext(value)
    no_fold_literal.append(token)
    if not value or value[0] != ']':
        raise errors.HeaderParseError(
            "expected ']' at the end of no-fold-literal "
            "but found '{}'".format(value))
    no_fold_literal.append(ValueTerminal(']', 'no-fold-literal-end'))
    return no_fold_literal, value[1:]
def get_no_fold_literal ( value ) : no_fold_literal = NoFoldLiteral ( ) if not value : raise errors . HeaderParseError ( "expected no-fold-literal but found '{}'" . format ( value ) ) if value [ 0 ] != '[' : raise errors . HeaderParseError ( "expected '[' at the start of no-fold-literal " "but found '{}'" . format ( value ) ) no_fold_literal . append ( ValueTerminal ( '[' , 'no-fold-literal-start' ) ) value = value [ 1 : ] token , value = get_dtext ( value ) no_fold_literal . append ( token ) if not value or value [ 0 ] != ']' : raise errors . HeaderParseError ( "expected ']' at the end of no-fold-literal " "but found '{}'" . format ( value ) ) no_fold_literal . append ( ValueTerminal ( ']' , 'no-fold-literal-end' ) ) return no_fold_literal , value [ 1 : ]