Skip to main content

Module indices

Module indices 

Source
Expand description

Parser and resolver for the --indices flag.

Grammar:

indices := expr ("," expr)*
expr    := int | range
range   := int? ":" int?
int     := "-"? [0-9]+

Resolution against a dataset with rowcount rows:

  • Negative i means rowcount + i (errors if still < 0).
  • a:b is inclusive on both ends.
  • a: means a..=rowcount-1.
  • :b means 0..=b.
  • : means the entire dataset.
  • Order is preserved and duplicates are not removed.

Functionsยง

resolve
Parse --indices and expand against the dataset row count.