| Extracted from Pike v7.8 release 700 at 2013-06-08.

[Top]
Parser
Parser.C

# Method Parser.C.group()

Method group

  `array(Token|array) group(array(string|Token) tokens, void|mapping(string:string) groupings)`

Description

  Fold sub blocks of an array of tokens into sub arrays, for grouping purposes.

Parameter `tokens`

  The token array to fold.

Parameter `groupings`

  Supplies the tokens marking the boundaries of blocks to fold. The indices of the mapping mark the start of a block, the corresponding values mark where the block ends. The sub arrays will start and end in these tokens. If no groupings mapping is provided, {}, () and [] are used as block boundaries.