mime::addr_next (private)

 mime::addr_next token

Defined in packages/acs-tcl/tcl/tcllib-doc-procs.tcl

Advance an internal MIME address-parser token to the next address. This version-dependent helper updates parser state and is not a public API.

Parameters:
token (required)
Internal address-parser token.
Returns:
1 if another address was parsed, or 0 at the end of the list.

Partial Call Graph (max 5 caller/called nodes):
mime::parseaddressaux mime::parseaddressaux (private) mime::addr_next mime::addr_next mime::parseaddressaux->mime::addr_next mime::addr_specification mime::addr_specification (private) mime::addr_next->mime::addr_specification mime::parselexeme mime::parselexeme (private) mime::addr_next->mime::parselexeme

Testcases:
No testcase defined.
Source code:
    global errorCode errorInfo
    # FRINK: nocheck
    variable $token
    upvar 0 $token state
    set nocomplain [package vsatisfies [package provide Tcl] 8.4]
    foreach prop {comment domain error group local memberP phrase route} {
        if {$nocomplain} {
            unset -nocomplain state($prop)
        } else {
            if {[catch {unset state($prop)}]} {set ::errorInfo {}}
        }
    }

    switch -- [set code [catch {mime::addr_specification $token} result]] {
        0 {
            if {!$result} {
                return 0
            }

            switch -- $state(lastC) {
                LX_COMMA
                    -
                LX_END {
                }
                default {
                    # catch trailing comments...
                    set lookahead $state(input)
                    mime::parselexeme $token
                    set state(input) $lookahead
                }
            }
        }

        7 {
            set state(error) $result

            while {1} {
                switch -- $state(lastC) {
                    LX_COMMA
                        -
                    LX_END {
                        break
                    }

                    default {
                        mime::parselexeme $token
                    }
                }
            }
        }

        default {
            set ecode $errorCode
            set einfo $errorInfo

            return -code $code -errorinfo $einfo -errorcode $ecode $result
        }
    }

    foreach prop {comment domain error group local memberP phrase route} {
        if {![info exists state($prop)]} {
            set state($prop) {}
        }
    }

    return 1
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: