diff options
Diffstat (limited to 'node_modules/nanomatch/lib/parsers.js')
-rw-r--r-- | node_modules/nanomatch/lib/parsers.js | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/node_modules/nanomatch/lib/parsers.js b/node_modules/nanomatch/lib/parsers.js index b98ef3746..0b0a59a59 100644 --- a/node_modules/nanomatch/lib/parsers.js +++ b/node_modules/nanomatch/lib/parsers.js @@ -39,13 +39,8 @@ module.exports = function(nanomatch, options) { var m = this.match(/^\.[\\/]/); if (!m) return; - this.ast.strictOpen = !!this.options.strictOpen; - this.ast.addPrefix = true; - - return pos({ - type: 'bos', - val: '' - }); + this.state.strictOpen = !!this.options.strictOpen; + this.state.addPrefix = true; }) /** @@ -130,11 +125,11 @@ module.exports = function(nanomatch, options) { if (!m) return; var val = m[0]; - this.ast.dot = val === '.' && (parsed === '' || parsed.slice(-1) === '/'); + this.state.dot = val === '.' && (parsed === '' || parsed.slice(-1) === '/'); return pos({ type: 'dot', - dotfiles: this.ast.dot, + dotfiles: this.state.dot, val: val }); }) @@ -175,7 +170,7 @@ module.exports = function(nanomatch, options) { var m = this.match(/^\*{2}(?![*(])(?=[,\/)]|$)/); if (!m) return; - var type = opts.noglobstar !== true ? 'globstar': 'star'; + var type = opts.noglobstar !== true ? 'globstar' : 'star'; var node = pos({type: type, parsed: parsed}); if (this.input.slice(0, 4) === '/**/') { |