Add additional pattern variants

This commit is contained in:
Marcus Klaas de Vries 2019-01-15 15:24:04 +01:00 committed by Aleksey Kladov
parent 0a82d9cdc9
commit afaa26636e
7 changed files with 142 additions and 62 deletions

View file

@ -47,9 +47,11 @@ impl FnScopes {
compute_expr_scopes(body.body_expr(), &body, &mut scopes, root); compute_expr_scopes(body.body_expr(), &body, &mut scopes, root);
scopes scopes
} }
pub fn entries(&self, scope: ScopeId) -> &[ScopeEntry] { pub fn entries(&self, scope: ScopeId) -> &[ScopeEntry] {
&self.scopes[scope].entries &self.scopes[scope].entries
} }
pub fn scope_chain_for<'a>(&'a self, expr: ExprId) -> impl Iterator<Item = ScopeId> + 'a { pub fn scope_chain_for<'a>(&'a self, expr: ExprId) -> impl Iterator<Item = ScopeId> + 'a {
generate(self.scope_for(expr), move |&scope| { generate(self.scope_for(expr), move |&scope| {
self.scopes[scope].parent self.scopes[scope].parent
@ -76,12 +78,14 @@ impl FnScopes {
entries: vec![], entries: vec![],
}) })
} }
fn new_scope(&mut self, parent: ScopeId) -> ScopeId { fn new_scope(&mut self, parent: ScopeId) -> ScopeId {
self.scopes.alloc(ScopeData { self.scopes.alloc(ScopeData {
parent: Some(parent), parent: Some(parent),
entries: vec![], entries: vec![],
}) })
} }
fn add_bindings(&mut self, body: &Body, scope: ScopeId, pat: PatId) { fn add_bindings(&mut self, body: &Body, scope: ScopeId, pat: PatId) {
match &body[pat] { match &body[pat] {
Pat::Bind { name } => self.scopes[scope].entries.push(ScopeEntry { Pat::Bind { name } => self.scopes[scope].entries.push(ScopeEntry {
@ -91,15 +95,18 @@ impl FnScopes {
p => p.walk_child_pats(|pat| self.add_bindings(body, scope, pat)), p => p.walk_child_pats(|pat| self.add_bindings(body, scope, pat)),
} }
} }
fn add_params_bindings(&mut self, scope: ScopeId, params: &[PatId]) { fn add_params_bindings(&mut self, scope: ScopeId, params: &[PatId]) {
let body = Arc::clone(&self.body); let body = Arc::clone(&self.body);
params params
.into_iter() .into_iter()
.for_each(|pat| self.add_bindings(&body, scope, *pat)); .for_each(|pat| self.add_bindings(&body, scope, *pat));
} }
fn set_scope(&mut self, node: ExprId, scope: ScopeId) { fn set_scope(&mut self, node: ExprId, scope: ScopeId) {
self.scope_for.insert(node, scope); self.scope_for.insert(node, scope);
} }
fn scope_for(&self, expr: ExprId) -> Option<ScopeId> { fn scope_for(&self, expr: ExprId) -> Option<ScopeId> {
self.scope_for.get(&expr).map(|&scope| scope) self.scope_for.get(&expr).map(|&scope| scope)
} }
@ -121,6 +128,7 @@ impl ScopeEntryWithSyntax {
pub fn name(&self) -> &Name { pub fn name(&self) -> &Name {
&self.name &self.name
} }
pub fn ptr(&self) -> LocalSyntaxPtr { pub fn ptr(&self) -> LocalSyntaxPtr {
self.ptr self.ptr
} }
@ -132,6 +140,7 @@ impl ScopesWithSyntaxMapping {
self.scopes.scopes[scope].parent self.scopes.scopes[scope].parent
}) })
} }
pub fn scope_chain_for_offset<'a>( pub fn scope_chain_for_offset<'a>(
&'a self, &'a self,
offset: TextUnit, offset: TextUnit,
@ -152,6 +161,7 @@ impl ScopesWithSyntaxMapping {
generate(scope, move |&scope| self.scopes.scopes[scope].parent) generate(scope, move |&scope| self.scopes.scopes[scope].parent)
} }
// XXX: during completion, cursor might be outside of any particular // XXX: during completion, cursor might be outside of any particular
// expression. Try to figure out the correct scope... // expression. Try to figure out the correct scope...
fn adjust(&self, ptr: LocalSyntaxPtr, original_scope: ScopeId, offset: TextUnit) -> ScopeId { fn adjust(&self, ptr: LocalSyntaxPtr, original_scope: ScopeId, offset: TextUnit) -> ScopeId {
@ -225,6 +235,7 @@ impl ScopeEntry {
pub fn name(&self) -> &Name { pub fn name(&self) -> &Name {
&self.name &self.name
} }
pub fn pat(&self) -> PatId { pub fn pat(&self) -> PatId {
self.pat self.pat
} }

View file

@ -329,9 +329,25 @@ impl Expr {
pub struct PatId(RawId); pub struct PatId(RawId);
impl_arena_id!(PatId); impl_arena_id!(PatId);
/// Close relative to rustc's hir::PatKind
#[derive(Debug, Clone, Eq, PartialEq)] #[derive(Debug, Clone, Eq, PartialEq)]
pub enum Pat { pub enum Pat {
Missing, Missing, // do we need this?
Wild,
Tuple(Vec<PatId>),
Struct, // TODO
Range {
start: ExprId,
end: ExprId,
},
Box(PatId),
Slice {
prefix: Vec<PatId>,
rest: Option<PatId>,
suffix: Vec<PatId>,
},
Path(Path),
Lit(ExprId),
Bind { Bind {
name: Name, name: Name,
}, },
@ -348,11 +364,25 @@ pub enum Pat {
impl Pat { impl Pat {
pub fn walk_child_pats(&self, mut f: impl FnMut(PatId)) { pub fn walk_child_pats(&self, mut f: impl FnMut(PatId)) {
match self { match self {
Pat::Missing | Pat::Bind { .. } => {} Pat::Range { .. }
Pat::TupleStruct { args, .. } => { | Pat::Lit(..)
| Pat::Path(..)
| Pat::Wild
| Pat::Missing
| Pat::Bind { .. } => {}
Pat::Tuple(args) | Pat::TupleStruct { args, .. } => {
args.iter().map(|pat| *pat).for_each(f); args.iter().map(|pat| *pat).for_each(f);
} }
Pat::Ref { pat, .. } => f(*pat), Pat::Ref { pat, .. } | Pat::Box(pat) => f(*pat),
Pat::Slice {
prefix,
rest,
suffix,
} => {
let total_iter = prefix.iter().chain(rest.iter()).chain(suffix.iter());
total_iter.map(|pat| *pat).for_each(f);
}
Pat::Struct { .. } => {} // TODO
} }
} }
} }
@ -745,30 +775,41 @@ impl ExprCollector {
} }
fn collect_pat(&mut self, pat: &ast::Pat) -> PatId { fn collect_pat(&mut self, pat: &ast::Pat) -> PatId {
let syntax_ptr = LocalSyntaxPtr::new(pat.syntax()); let pattern = match pat.kind() {
match pat.kind() {
ast::PatKind::BindPat(bp) => { ast::PatKind::BindPat(bp) => {
let name = bp let name = bp
.name() .name()
.map(|nr| nr.as_name()) .map(|nr| nr.as_name())
.unwrap_or_else(Name::missing); .unwrap_or_else(Name::missing);
self.alloc_pat(Pat::Bind { name }, syntax_ptr) Pat::Bind { name }
} }
ast::PatKind::TupleStructPat(p) => { ast::PatKind::TupleStructPat(p) => {
let path = p.path().and_then(Path::from_ast); let path = p.path().and_then(Path::from_ast);
let args = p.args().map(|p| self.collect_pat(p)).collect(); let args = p.args().map(|p| self.collect_pat(p)).collect();
self.alloc_pat(Pat::TupleStruct { path, args }, syntax_ptr) Pat::TupleStruct { path, args }
} }
ast::PatKind::RefPat(p) => { ast::PatKind::RefPat(p) => {
let pat = self.collect_pat_opt(p.pat()); let pat = self.collect_pat_opt(p.pat());
let mutability = Mutability::from_mutable(p.is_mut()); let mutability = Mutability::from_mutable(p.is_mut());
self.alloc_pat(Pat::Ref { pat, mutability }, syntax_ptr) Pat::Ref { pat, mutability }
} }
_ => { ast::PatKind::PathPat(p) => {
// TODO let path = p.path().and_then(Path::from_ast);
self.alloc_pat(Pat::Missing, syntax_ptr) path.map(|path| Pat::Path(path)).unwrap_or(Pat::Missing)
} }
} ast::PatKind::TuplePat(p) => {
let args = p.args().map(|p| self.collect_pat(p)).collect();
Pat::Tuple(args)
}
ast::PatKind::PlaceholderPat(_) => Pat::Wild,
// TODO: implement
ast::PatKind::FieldPatList(_)
| ast::PatKind::SlicePat(_)
| ast::PatKind::StructPat(_)
| ast::PatKind::RangePat(_) => Pat::Missing,
};
let syntax_ptr = LocalSyntaxPtr::new(pat.syntax());
self.alloc_pat(pattern, syntax_ptr)
} }
fn collect_pat_opt(&mut self, pat: Option<&ast::Pat>) -> PatId { fn collect_pat_opt(&mut self, pat: Option<&ast::Pat>) -> PatId {

View file

@ -1168,6 +1168,8 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
decl_ty decl_ty
}; };
// TODO: walk the pattern here?
self.write_pat_ty(*pat, ty); self.write_pat_ty(*pat, ty);
} }
Statement::Expr(expr) => { Statement::Expr(expr) => {
@ -1188,6 +1190,9 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
for (type_ref, pat) in signature.params().iter().zip(body.params()) { for (type_ref, pat) in signature.params().iter().zip(body.params()) {
let ty = self.make_ty(type_ref); let ty = self.make_ty(type_ref);
let ty = self.insert_type_vars(ty); let ty = self.insert_type_vars(ty);
// TODO: walk pattern?
self.write_pat_ty(*pat, ty); self.write_pat_ty(*pat, ty);
} }
self.return_ty = { self.return_ty = {

View file

@ -358,6 +358,21 @@ fn test(x: &str, y: isize) {
); );
} }
#[test]
fn infer_pattern() {
check_inference(
r#"
fn test(x: &i32) {
let y = x;
let &z = x;
let a = z;
let (c, d) = (1, "hello");
}
"#,
"pattern.txt",
);
}
fn infer(content: &str) -> String { fn infer(content: &str) -> String {
let (db, _, file_id) = MockDatabase::with_single_file(content); let (db, _, file_id) = MockDatabase::with_single_file(content);
let source_file = db.source_file(file_id); let source_file = db.source_file(file_id);

View file

@ -2285,7 +2285,11 @@ impl AstNode for PathPat {
} }
impl PathPat {} impl PathPat {
pub fn path(&self) -> Option<&Path> {
super::child_opt(self)
}
}
// PathSegment // PathSegment
#[derive(Debug, PartialEq, Eq, Hash)] #[derive(Debug, PartialEq, Eq, Hash)]
@ -3219,7 +3223,11 @@ impl AstNode for TuplePat {
} }
impl TuplePat {} impl TuplePat {
pub fn args(&self) -> impl Iterator<Item = &Pat> {
super::children(self)
}
}
// TupleStructPat // TupleStructPat
#[derive(Debug, PartialEq, Eq, Hash)] #[derive(Debug, PartialEq, Eq, Hash)]

View file

@ -490,14 +490,14 @@ Grammar(
"RefPat": ( options: [ "Pat" ]), "RefPat": ( options: [ "Pat" ]),
"BindPat": ( traits: ["NameOwner"] ), "BindPat": ( traits: ["NameOwner"] ),
"PlaceholderPat": (), "PlaceholderPat": (),
"PathPat": (), "PathPat": ( options: ["Path"] ),
"StructPat": (), "StructPat": (),
"FieldPatList": (), "FieldPatList": (),
"TupleStructPat": ( "TupleStructPat": (
options: ["Path"], options: ["Path"],
collections: [["args", "Pat"]], collections: [["args", "Pat"]],
), ),
"TuplePat": (), "TuplePat": ( collections: [["args", "Pat"]] ),
"SlicePat": (), "SlicePat": (),
"RangePat": (), "RangePat": (),

View file

@ -183,7 +183,7 @@
"dependencies": { "dependencies": {
"chalk": { "chalk": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -348,7 +348,7 @@
"dependencies": { "dependencies": {
"readable-stream": { "readable-stream": {
"version": "2.3.6", "version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -363,7 +363,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -425,7 +425,7 @@
}, },
"css-select": { "css-select": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", "resolved": "http://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz",
"integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -461,7 +461,7 @@
}, },
"deep-assign": { "deep-assign": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz", "resolved": "http://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz",
"integrity": "sha1-sJJ0O+hCfcYh6gBnzex+cN0Z83s=", "integrity": "sha1-sJJ0O+hCfcYh6gBnzex+cN0Z83s=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -507,7 +507,7 @@
"dependencies": { "dependencies": {
"domelementtype": { "domelementtype": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", "resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
"integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=",
"dev": true "dev": true
} }
@ -540,7 +540,7 @@
}, },
"duplexer": { "duplexer": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
"integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
"dev": true "dev": true
}, },
@ -558,7 +558,7 @@
"dependencies": { "dependencies": {
"readable-stream": { "readable-stream": {
"version": "2.3.6", "version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -573,7 +573,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -627,7 +627,7 @@
}, },
"event-stream": { "event-stream": {
"version": "3.3.4", "version": "3.3.4",
"resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", "resolved": "http://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",
"integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -694,7 +694,7 @@
"dependencies": { "dependencies": {
"readable-stream": { "readable-stream": {
"version": "2.3.6", "version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -709,7 +709,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -828,7 +828,7 @@
"dependencies": { "dependencies": {
"readable-stream": { "readable-stream": {
"version": "2.3.6", "version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -843,7 +843,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -904,7 +904,7 @@
}, },
"readable-stream": { "readable-stream": {
"version": "1.0.34", "version": "1.0.34",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
"integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -916,13 +916,13 @@
}, },
"string_decoder": { "string_decoder": {
"version": "0.10.31", "version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
"dev": true "dev": true
}, },
"through2": { "through2": {
"version": "0.6.5", "version": "0.6.5",
"resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", "resolved": "http://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
"integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1192,7 +1192,7 @@
}, },
"is-obj": { "is-obj": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
"dev": true "dev": true
}, },
@ -1319,7 +1319,7 @@
}, },
"kind-of": { "kind-of": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", "resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
"integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=",
"dev": true "dev": true
}, },
@ -1334,7 +1334,7 @@
"dependencies": { "dependencies": {
"readable-stream": { "readable-stream": {
"version": "2.3.6", "version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1349,7 +1349,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1384,7 +1384,7 @@
}, },
"map-stream": { "map-stream": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", "resolved": "http://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",
"integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=",
"dev": true "dev": true
}, },
@ -1439,13 +1439,13 @@
}, },
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true "dev": true
}, },
"mkdirp": { "mkdirp": {
"version": "0.5.1", "version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1618,7 +1618,7 @@
"dependencies": { "dependencies": {
"readable-stream": { "readable-stream": {
"version": "2.3.6", "version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1633,7 +1633,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1644,13 +1644,13 @@
}, },
"os-homedir": { "os-homedir": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
"dev": true "dev": true
}, },
"os-tmpdir": { "os-tmpdir": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true "dev": true
}, },
@ -1666,7 +1666,7 @@
}, },
"parse-semver": { "parse-semver": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz", "resolved": "http://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz",
"integrity": "sha1-mkr9bfBj3Egm+T+6SpnPIj9mbLg=", "integrity": "sha1-mkr9bfBj3Egm+T+6SpnPIj9mbLg=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1690,7 +1690,7 @@
}, },
"path-is-absolute": { "path-is-absolute": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true "dev": true
}, },
@ -1702,7 +1702,7 @@
}, },
"pause-stream": { "pause-stream": {
"version": "0.0.11", "version": "0.0.11",
"resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", "resolved": "http://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz",
"integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1955,7 +1955,7 @@
}, },
"split": { "split": {
"version": "0.3.3", "version": "0.3.3",
"resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", "resolved": "http://registry.npmjs.org/split/-/split-0.3.3.tgz",
"integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1964,7 +1964,7 @@
}, },
"sprintf-js": { "sprintf-js": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "resolved": "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true "dev": true
}, },
@ -1993,7 +1993,7 @@
}, },
"stream-combiner": { "stream-combiner": {
"version": "0.0.4", "version": "0.0.4",
"resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", "resolved": "http://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz",
"integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -2017,7 +2017,7 @@
"dependencies": { "dependencies": {
"readable-stream": { "readable-stream": {
"version": "2.3.6", "version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -2032,7 +2032,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -2058,7 +2058,7 @@
}, },
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -2073,7 +2073,7 @@
}, },
"tar": { "tar": {
"version": "2.2.1", "version": "2.2.1",
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "resolved": "http://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
"integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -2084,7 +2084,7 @@
}, },
"through": { "through": {
"version": "2.3.8", "version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
"dev": true "dev": true
}, },
@ -2100,7 +2100,7 @@
"dependencies": { "dependencies": {
"readable-stream": { "readable-stream": {
"version": "2.3.6", "version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -2115,7 +2115,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -2223,7 +2223,7 @@
}, },
"tunnel": { "tunnel": {
"version": "0.0.4", "version": "0.0.4",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", "resolved": "http://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz",
"integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=", "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=",
"dev": true "dev": true
}, },
@ -2254,7 +2254,7 @@
"dependencies": { "dependencies": {
"underscore": { "underscore": {
"version": "1.8.3", "version": "1.8.3",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", "resolved": "http://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
"integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=",
"dev": true "dev": true
} }
@ -2397,7 +2397,7 @@
}, },
"readable-stream": { "readable-stream": {
"version": "2.3.6", "version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -2412,7 +2412,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {