From 6beeddb83ac0eae29f4b93e006cfe9ed7c9aac1b Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Thu, 23 Apr 2015 19:08:35 -0400 Subject: [PATCH] Adding documentation to repeat_spec.js --- src/js/parser/javascript/repeat_spec.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/parser/javascript/repeat_spec.js b/src/js/parser/javascript/repeat_spec.js index d6ee5d0..af2b67e 100644 --- a/src/js/parser/javascript/repeat_spec.js +++ b/src/js/parser/javascript/repeat_spec.js @@ -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}`; }