|
|
@ -390,7 +390,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
var results = this._handle.parse(aggregate, this._baseIndex, !this._finished); |
|
|
|
var results = this._handle.parse(aggregate, this._baseIndex, !this._finished); |
|
|
|
|
|
|
|
|
|
|
|
if (this._handle.paused()) |
|
|
|
if (this._handle.paused() || this._handle.aborted()) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
var lastIndex = results.meta.cursor; |
|
|
|
var lastIndex = results.meta.cursor; |
|
|
@ -658,6 +658,7 @@ |
|
|
|
var _input; // The input being parsed
|
|
|
|
var _input; // The input being parsed
|
|
|
|
var _parser; // The core parser being used
|
|
|
|
var _parser; // The core parser being used
|
|
|
|
var _paused = false; // Whether we are paused or not
|
|
|
|
var _paused = false; // Whether we are paused or not
|
|
|
|
|
|
|
|
var _aborted = false; // Whether the parser has aborted or not
|
|
|
|
var _delimiterError; // Temporary state between delimiter detection and processing results
|
|
|
|
var _delimiterError; // Temporary state between delimiter detection and processing results
|
|
|
|
var _fields = []; // Fields are from the header row of the input, if there is one
|
|
|
|
var _fields = []; // Fields are from the header row of the input, if there is one
|
|
|
|
var _results = { // The last results returned from the parser
|
|
|
|
var _results = { // The last results returned from the parser
|
|
|
@ -743,8 +744,13 @@ |
|
|
|
self.streamer.parseChunk(_input); |
|
|
|
self.streamer.parseChunk(_input); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.aborted = function () { |
|
|
|
|
|
|
|
return _aborted; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.abort = function() |
|
|
|
this.abort = function() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
_aborted = true; |
|
|
|
_parser.abort(); |
|
|
|
_parser.abort(); |
|
|
|
if (isFunction(_config.complete)) |
|
|
|
if (isFunction(_config.complete)) |
|
|
|
_config.complete(_results); |
|
|
|
_config.complete(_results); |
|
|
|