diff options
Diffstat (limited to 'ext/fg/js/source-input.js')
-rw-r--r-- | ext/fg/js/source-input.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/fg/js/source-input.js b/ext/fg/js/source-input.js index 9f5a76a0..d3c92793 100644 --- a/ext/fg/js/source-input.js +++ b/ext/fg/js/source-input.js @@ -18,9 +18,13 @@ class TextSourceInput { - constructor(input) { + constructor(input, length=-1) { this.input = input; - this.length = -1; + this.length = length; + } + + clone() { + return new TextSourceInput(this.input, this.length); } text() { |