Currently T_RETURN tokens are being parsed into a PGPFunctionCall, which makes sense, but their type is being set as "601" instead of "T_RETURN". This breaks commands like PGPList->find(T_RETURN), since find looks for $object->type, not $object->name['type']. Maybe it's a bug with PGPList->find()?

Here's the parsed output of return call:

PGPFunctionCall
        (
            [parent] => PGPNode
                (
                    [type-1] => 601
                )

            [type] => 601
            [name] => Array
                (
                    [type] => 335 (T_RETURN)
                    [value] => return
                )

This has broken coder_upgrade routines such as coder_upgrade_convert_action_info().

Comments

solotandem’s picture

Title: T_RETURN tokens aren't being parsed correctly » T_CONTINUE, T_ECHO, T_RETURN, and T_EXIT statements have type = T_FUNCTION_CALL
Assigned: Unassigned » solotandem
Status: Active » Fixed

Fixed in next dev release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.