nl_tokens: Read a for incremental loop ebnf for :: = T_FOR ( for_exprs ; for_exprs ; for_exprs ) for_statement for_statement :: = statement | : inner_statement_list T_ENDFOR ; for_exprs :: = expr? ( expr ) *
pl_tokens: function ( ) { const result = this . node ( "for" ) ; this . expect ( this . tok . T_FOR ) && this . next ( ) ; let init = [ ] ; let test = [ ] ; let increment = [ ] ; let body = null ; let shortForm = false ; if ( this . expect ( "(" ) ) this . next ( ) ; if ( this . token !== ";" ) { init = this . read_list ( this . read_expr , "," ) ; if ( this . expect ( ";" ) ) this . next ( ) ; } else { this . next ( ) ; } if ( this . token !== ";" ) { test = this . read_list ( this . read_expr , "," ) ; if ( this . expect ( ";" ) ) this . next ( ) ; } else { this . next ( ) ; } if ( this . token !== ")" ) { increment = this . read_list ( this . read_expr , "," ) ; if ( this . expect ( ")" ) ) this . next ( ) ; } else { this . next ( ) ; } if ( this . token === ":" ) { shortForm = true ; body = this . read_short_form ( this . tok . T_ENDFOR ) ; } else { <mask> = this . read_statement ( ) ; } return result ( init , test , increment , body , shortForm ) ; }