public static function build($list)
    {
        if (is_string($list)) {
            return $list;
        }

        if ($list instanceof self) {
            $list = $list->tokens;
        }

        $ret = '';
        if (is_array($list)) {
            foreach ($list as $tok) {
                $ret .= $tok->token;
            }
        }

        return $ret;
    }
public static function build($list)
    {
        if (is_string($list)) {
            return $list;
        }

        if ($list instanceof self) {
            $list = $list->tokens;
        }

        $ret = '';
        if (is_array($list)) {
            foreach ($list as $tok) {
                $ret .= $tok->token;
            }
        }

        return $ret;
    }
public static function build ( $ list ) { if ( is_string ( $ list ) ) { return $ list ; } if ( $ list instanceof self ) { $ list = $ list -> tokens ; } $ ret = '' ; if ( is_array ( $ list ) ) { foreach ( $ list as $ tok ) { $ ret .= $ tok -> token ; } } return $ ret ; }
Builds an array of tokens by merging their raw value.

@param string|Token[]|TokensList $list the tokens to be built

@return string
Builds an array of tokens by merging their raw value .