nl_tokens: ebnf try :: = T_TRY { inner_statement * } ( T_CATCH ( namespace_name variable ) { inner_statement * } ) * ( T_FINALLY { inner_statement * } ) ?
pl_tokens: function ( ) { this . expect ( this . tok . T_TRY ) ; const result = this . node ( "try" ) ; let always = null ; const catches = [ ] ; const body = this . next ( ) . read_statement ( ) ; // https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L455 while ( this . token === this . tok . T_CATCH ) { const item = this . node ( "catch" ) ; this . next ( ) . expect ( "(" ) && this . next ( ) ; const what = this . read_list ( this . read_namespace_name , "|" , false ) ; const variable = this . read_variable ( true , false , false ) ; this . expect ( ")" ) ; catches . <mask> ( item ( this . next ( ) . read_statement ( ) , what , variable ) ) ; } if ( this . token === this . tok . T_FINALLY ) { always = this . next ( ) . read_statement ( ) ; } return result ( body , catches , always ) ; }