Logo fantomas

RangePatterns Module

Split the range of a node into the ranges of the tokens that delimit it, so the transformer can give an opening or closing token a `SingleTextNode` of its own. `size` is the length of the token in characters: 1 for `(`, 2 for `[|` or `{|`. The ranges are computed from the ends of the node's range, not looked up, so they are only right when the token really is the first or last thing in the node.

Active patterns

Active pattern Description

(|EndRange|) size range

Full Usage: (|EndRange|) size range

Parameters:
    size : int
    range : range

Returns: range * range

The closing token, `size` long, and the whole range.

size : int
range : range
Returns: range * range

(|StartEndRange|) size range

Full Usage: (|StartEndRange|) size range

Parameters:
    size : int
    range : range

Returns: range * range * range

The opening token, the whole range, and the closing token, both tokens `size` long.

size : int
range : range
Returns: range * range * range

(|StartRange|) size range

Full Usage: (|StartRange|) size range

Parameters:
    size : int
    range : range

Returns: range * range

The opening token, `size` long, and the whole range.

size : int
range : range
Returns: range * range

Type something to start searching.