Skip to content

Commit

Permalink
pegjs#30: Add description of new range feature to README.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingun committed Jan 1, 2014
1 parent 5be8c40 commit 7ed8a52
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Expand Up @@ -293,6 +293,21 @@ expression as many times as possible.
Try to match the expression. If the match succeeds, return its match result,
otherwise return `null`.

#### *expression* |count|<br> *expression* |min..max|

Match exact `count` repetitions of `expression`. If the match succeeds, return
their match results in an array.

-or-

Match expression at least `min` but not more then `max` times. If the match
succeeds, return their match results in an array. Both `min` and `max` may
be omitted. If `min` omitted, then suppose to `0`. If `max` is omitted, then
suppose to infinity. `expression |..|` equivalently `expression |0..|` and
`expression *`. `expression |1..|` equivalently `expression +`.

`count`, `min` and `max` must be positive integers.

#### & *expression*

Try to match the expression. If the match succeeds, just return `undefined` and
Expand Down

0 comments on commit 7ed8a52

Please sign in to comment.