Adding documentation to repeat_spec.js
This commit is contained in:
parent
beb5a6fb52
commit
6beeddb83a
@ -1,3 +1,7 @@
|
||||
// RepeatSpec nodes are used for `a{m,n}` regular expression syntax. It is not
|
||||
// rendered directly; it just indicates how many times the
|
||||
// [Repeat](./repeat.html) node loops.
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
if (this.properties.min) {
|
||||
@ -16,6 +20,7 @@ export default {
|
||||
this.maximum = -1;
|
||||
}
|
||||
|
||||
// Report invalid repeat when the minimum is larger than the maximum.
|
||||
if (this.minimum > this.maximum && this.maximum !== -1) {
|
||||
throw `Numbers out of order: ${this.textValue}`;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user