diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-19 21:22:00 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-19 21:22:00 +0000 |
commit | ef1e107df147a82b74089ab9797ce35effe24e5e (patch) | |
tree | e54a25733ffc2c3b19385b299779d763615cb81e | |
parent | 0e1c01cdb8e6b346edd5d68d9cc72cbce1ce9793 (diff) | |
parent | a3b842fb8b7b5503b1c4fc49355edd4f2fe0d28d (diff) |
Merge #273
273: Add a test to ensure that we can parse each file r=matklad a=DJMcNab
Note that this has a non-spurious failure in ra_analysis/src/mock_analysis.
Probably fixes #195.
If my understanding is correct, fixes #214 and fixes #225.
Co-authored-by: DJMcNab <[email protected]>
14 files changed, 496 insertions, 234 deletions
diff --git a/crates/ra_syntax/src/grammar/expressions.rs b/crates/ra_syntax/src/grammar/expressions.rs index a9449c7bf..4f8c46ab3 100644 --- a/crates/ra_syntax/src/grammar/expressions.rs +++ b/crates/ra_syntax/src/grammar/expressions.rs | |||
@@ -64,6 +64,20 @@ pub(crate) fn block(p: &mut Parser) { | |||
64 | if p.at(R_CURLY) { | 64 | if p.at(R_CURLY) { |
65 | m.abandon(p); | 65 | m.abandon(p); |
66 | } else { | 66 | } else { |
67 | // test no_semi_after_block | ||
68 | // fn foo() { | ||
69 | // if true {} | ||
70 | // loop {} | ||
71 | // match () {} | ||
72 | // while true {} | ||
73 | // for _ in () {} | ||
74 | // {} | ||
75 | // {} | ||
76 | // macro_rules! test { | ||
77 | // () => {} | ||
78 | // } | ||
79 | // test!{} | ||
80 | // } | ||
67 | if is_blocklike { | 81 | if is_blocklike { |
68 | p.eat(SEMI); | 82 | p.eat(SEMI); |
69 | } else { | 83 | } else { |
@@ -143,7 +157,7 @@ fn current_op(p: &Parser) -> (u8, Op) { | |||
143 | 157 | ||
144 | let bp = match p.current() { | 158 | let bp = match p.current() { |
145 | EQ => 1, | 159 | EQ => 1, |
146 | DOTDOT => 2, | 160 | DOTDOT | DOTDOTEQ => 2, |
147 | EQEQ | NEQ | L_ANGLE | R_ANGLE => 5, | 161 | EQEQ | NEQ | L_ANGLE | R_ANGLE => 5, |
148 | PIPE => 6, | 162 | PIPE => 6, |
149 | CARET => 7, | 163 | CARET => 7, |
@@ -158,13 +172,13 @@ fn current_op(p: &Parser) -> (u8, Op) { | |||
158 | // Parses expression with binding power of at least bp. | 172 | // Parses expression with binding power of at least bp. |
159 | fn expr_bp(p: &mut Parser, r: Restrictions, bp: u8) -> BlockLike { | 173 | fn expr_bp(p: &mut Parser, r: Restrictions, bp: u8) -> BlockLike { |
160 | let mut lhs = match lhs(p, r) { | 174 | let mut lhs = match lhs(p, r) { |
161 | Some(lhs) => { | 175 | Some((lhs, blocklike)) => { |
162 | // test stmt_bin_expr_ambiguity | 176 | // test stmt_bin_expr_ambiguity |
163 | // fn foo() { | 177 | // fn foo() { |
164 | // let _ = {1} & 2; | 178 | // let _ = {1} & 2; |
165 | // {1} &2; | 179 | // {1} &2; |
166 | // } | 180 | // } |
167 | if r.prefer_stmt && is_block(lhs.kind()) { | 181 | if r.prefer_stmt && blocklike.is_block() { |
168 | return BlockLike::Block; | 182 | return BlockLike::Block; |
169 | } | 183 | } |
170 | lhs | 184 | lhs |
@@ -173,7 +187,7 @@ fn expr_bp(p: &mut Parser, r: Restrictions, bp: u8) -> BlockLike { | |||
173 | }; | 187 | }; |
174 | 188 | ||
175 | loop { | 189 | loop { |
176 | let is_range = p.current() == DOTDOT; | 190 | let is_range = p.current() == DOTDOT || p.current() == DOTDOTEQ; |
177 | let (op_bp, op) = current_op(p); | 191 | let (op_bp, op) = current_op(p); |
178 | if op_bp < bp { | 192 | if op_bp < bp { |
179 | break; | 193 | break; |
@@ -191,29 +205,12 @@ fn expr_bp(p: &mut Parser, r: Restrictions, bp: u8) -> BlockLike { | |||
191 | BlockLike::NotBlock | 205 | BlockLike::NotBlock |
192 | } | 206 | } |
193 | 207 | ||
194 | // test no_semi_after_block | ||
195 | // fn foo() { | ||
196 | // if true {} | ||
197 | // loop {} | ||
198 | // match () {} | ||
199 | // while true {} | ||
200 | // for _ in () {} | ||
201 | // {} | ||
202 | // {} | ||
203 | // } | ||
204 | fn is_block(kind: SyntaxKind) -> bool { | ||
205 | match kind { | ||
206 | IF_EXPR | WHILE_EXPR | FOR_EXPR | LOOP_EXPR | MATCH_EXPR | BLOCK_EXPR => true, | ||
207 | _ => false, | ||
208 | } | ||
209 | } | ||
210 | |||
211 | const LHS_FIRST: TokenSet = token_set_union![ | 208 | const LHS_FIRST: TokenSet = token_set_union![ |
212 | token_set![AMP, STAR, EXCL, DOTDOT, MINUS], | 209 | token_set![AMP, STAR, EXCL, DOTDOT, MINUS], |
213 | atom::ATOM_EXPR_FIRST, | 210 | atom::ATOM_EXPR_FIRST, |
214 | ]; | 211 | ]; |
215 | 212 | ||
216 | fn lhs(p: &mut Parser, r: Restrictions) -> Option<CompletedMarker> { | 213 | fn lhs(p: &mut Parser, r: Restrictions) -> Option<(CompletedMarker, BlockLike)> { |
217 | let m; | 214 | let m; |
218 | let kind = match p.current() { | 215 | let kind = match p.current() { |
219 | // test ref_expr | 216 | // test ref_expr |
@@ -246,19 +243,28 @@ fn lhs(p: &mut Parser, r: Restrictions) -> Option<CompletedMarker> { | |||
246 | if p.at_ts(EXPR_FIRST) { | 243 | if p.at_ts(EXPR_FIRST) { |
247 | expr_bp(p, r, 2); | 244 | expr_bp(p, r, 2); |
248 | } | 245 | } |
249 | return Some(m.complete(p, RANGE_EXPR)); | 246 | return Some((m.complete(p, RANGE_EXPR), BlockLike::NotBlock)); |
250 | } | 247 | } |
251 | _ => { | 248 | _ => { |
252 | let lhs = atom::atom_expr(p, r)?; | 249 | let (lhs, blocklike) = atom::atom_expr(p, r)?; |
253 | return Some(postfix_expr(p, r, lhs)); | 250 | return Some(( |
251 | postfix_expr(p, lhs, !(r.prefer_stmt && blocklike.is_block())), | ||
252 | blocklike, | ||
253 | )); | ||
254 | } | 254 | } |
255 | }; | 255 | }; |
256 | expr_bp(p, r, 255); | 256 | expr_bp(p, r, 255); |
257 | Some(m.complete(p, kind)) | 257 | Some((m.complete(p, kind), BlockLike::NotBlock)) |
258 | } | 258 | } |
259 | 259 | ||
260 | fn postfix_expr(p: &mut Parser, r: Restrictions, mut lhs: CompletedMarker) -> CompletedMarker { | 260 | fn postfix_expr( |
261 | let mut allow_calls = !r.prefer_stmt || !is_block(lhs.kind()); | 261 | p: &mut Parser, |
262 | mut lhs: CompletedMarker, | ||
263 | // Calls are disallowed if the type is a block and we prefer statements because the call cannot be disambiguated from a tuple | ||
264 | // E.g. `while true {break}();` is parsed as | ||
265 | // `while true {break}; ();` | ||
266 | mut allow_calls: bool, | ||
267 | ) -> CompletedMarker { | ||
262 | loop { | 268 | loop { |
263 | lhs = match p.current() { | 269 | lhs = match p.current() { |
264 | // test stmt_postfix_expr_ambiguity | 270 | // test stmt_postfix_expr_ambiguity |
@@ -406,20 +412,20 @@ fn arg_list(p: &mut Parser) { | |||
406 | // let _ = ::a::<b>; | 412 | // let _ = ::a::<b>; |
407 | // let _ = format!(); | 413 | // let _ = format!(); |
408 | // } | 414 | // } |
409 | fn path_expr(p: &mut Parser, r: Restrictions) -> CompletedMarker { | 415 | fn path_expr(p: &mut Parser, r: Restrictions) -> (CompletedMarker, BlockLike) { |
410 | assert!(paths::is_path_start(p) || p.at(L_ANGLE)); | 416 | assert!(paths::is_path_start(p) || p.at(L_ANGLE)); |
411 | let m = p.start(); | 417 | let m = p.start(); |
412 | paths::expr_path(p); | 418 | paths::expr_path(p); |
413 | match p.current() { | 419 | match p.current() { |
414 | L_CURLY if !r.forbid_structs => { | 420 | L_CURLY if !r.forbid_structs => { |
415 | named_field_list(p); | 421 | named_field_list(p); |
416 | m.complete(p, STRUCT_LIT) | 422 | (m.complete(p, STRUCT_LIT), BlockLike::Block) |
417 | } | 423 | } |
418 | EXCL => { | 424 | EXCL => { |
419 | items::macro_call_after_excl(p); | 425 | let block_like = items::macro_call_after_excl(p); |
420 | m.complete(p, MACRO_CALL) | 426 | return (m.complete(p, MACRO_CALL), block_like); |
421 | } | 427 | } |
422 | _ => m.complete(p, PATH_EXPR), | 428 | _ => (m.complete(p, PATH_EXPR), BlockLike::NotBlock), |
423 | } | 429 | } |
424 | } | 430 | } |
425 | 431 | ||
diff --git a/crates/ra_syntax/src/grammar/expressions/atom.rs b/crates/ra_syntax/src/grammar/expressions/atom.rs index 04087fd60..cd7d62aff 100644 --- a/crates/ra_syntax/src/grammar/expressions/atom.rs +++ b/crates/ra_syntax/src/grammar/expressions/atom.rs | |||
@@ -61,9 +61,9 @@ pub(super) const ATOM_EXPR_FIRST: TokenSet = token_set_union![ | |||
61 | 61 | ||
62 | const EXPR_RECOVERY_SET: TokenSet = token_set![LET_KW]; | 62 | const EXPR_RECOVERY_SET: TokenSet = token_set![LET_KW]; |
63 | 63 | ||
64 | pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<CompletedMarker> { | 64 | pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<(CompletedMarker, BlockLike)> { |
65 | if let Some(m) = literal(p) { | 65 | if let Some(m) = literal(p) { |
66 | return Some(m); | 66 | return Some((m, BlockLike::NotBlock)); |
67 | } | 67 | } |
68 | if paths::is_path_start(p) || p.at(L_ANGLE) { | 68 | if paths::is_path_start(p) || p.at(L_ANGLE) { |
69 | return Some(path_expr(p, r)); | 69 | return Some(path_expr(p, r)); |
@@ -114,7 +114,11 @@ pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<CompletedMark | |||
114 | return None; | 114 | return None; |
115 | } | 115 | } |
116 | }; | 116 | }; |
117 | Some(done) | 117 | let blocklike = match done.kind() { |
118 | IF_EXPR | WHILE_EXPR | FOR_EXPR | LOOP_EXPR | MATCH_EXPR | BLOCK_EXPR => BlockLike::Block, | ||
119 | _ => BlockLike::NotBlock, | ||
120 | }; | ||
121 | Some((done, blocklike)) | ||
118 | } | 122 | } |
119 | 123 | ||
120 | // test tuple_expr | 124 | // test tuple_expr |
@@ -349,6 +353,7 @@ pub(crate) fn match_arm_list(p: &mut Parser) { | |||
349 | // fn foo() { | 353 | // fn foo() { |
350 | // match () { | 354 | // match () { |
351 | // _ => (), | 355 | // _ => (), |
356 | // _ if Test>{field: 0} => (), | ||
352 | // X | Y if Z => (), | 357 | // X | Y if Z => (), |
353 | // | X | Y if Z => (), | 358 | // | X | Y if Z => (), |
354 | // | X => (), | 359 | // | X => (), |
@@ -362,7 +367,7 @@ fn match_arm(p: &mut Parser) -> BlockLike { | |||
362 | patterns::pattern(p); | 367 | patterns::pattern(p); |
363 | } | 368 | } |
364 | if p.eat(IF_KW) { | 369 | if p.eat(IF_KW) { |
365 | expr_no_struct(p); | 370 | expr(p); |
366 | } | 371 | } |
367 | p.expect(FAT_ARROW); | 372 | p.expect(FAT_ARROW); |
368 | let ret = expr_stmt(p); | 373 | let ret = expr_stmt(p); |
diff --git a/crates/ra_syntax/src/grammar/patterns.rs b/crates/ra_syntax/src/grammar/patterns.rs index 10fa0e0be..64cdf0b1b 100644 --- a/crates/ra_syntax/src/grammar/patterns.rs +++ b/crates/ra_syntax/src/grammar/patterns.rs | |||
@@ -14,9 +14,13 @@ pub(super) fn pattern_r(p: &mut Parser, recovery_set: TokenSet) { | |||
14 | if let Some(lhs) = atom_pat(p, recovery_set) { | 14 | if let Some(lhs) = atom_pat(p, recovery_set) { |
15 | // test range_pat | 15 | // test range_pat |
16 | // fn main() { | 16 | // fn main() { |
17 | // match 92 { 0 ... 100 => () } | 17 | // match 92 { |
18 | // 0 ... 100 => (), | ||
19 | // 101 ..= 200 => (), | ||
20 | // 200 .. 301=> (), | ||
21 | // } | ||
18 | // } | 22 | // } |
19 | if p.at(DOTDOTDOT) { | 23 | if p.at(DOTDOTDOT) || p.at(DOTDOTEQ) || p.at(DOTDOT) { |
20 | let m = lhs.precede(p); | 24 | let m = lhs.precede(p); |
21 | p.bump(); | 25 | p.bump(); |
22 | atom_pat(p, recovery_set); | 26 | atom_pat(p, recovery_set); |
diff --git a/crates/ra_syntax/src/parser_api.rs b/crates/ra_syntax/src/parser_api.rs index c37c30e34..02421def1 100644 --- a/crates/ra_syntax/src/parser_api.rs +++ b/crates/ra_syntax/src/parser_api.rs | |||
@@ -36,7 +36,7 @@ impl<'t> Parser<'t> { | |||
36 | self.current() == kind | 36 | self.current() == kind |
37 | } | 37 | } |
38 | 38 | ||
39 | /// Checks if the current token is `kind`. | 39 | /// Checks if the current token is in `kinds`. |
40 | pub(crate) fn at_ts(&self, kinds: TokenSet) -> bool { | 40 | pub(crate) fn at_ts(&self, kinds: TokenSet) -> bool { |
41 | kinds.contains(self.current()) | 41 | kinds.contains(self.current()) |
42 | } | 42 | } |
diff --git a/crates/ra_syntax/tests/data/parser/inline/0069_match_arm.rs b/crates/ra_syntax/tests/data/parser/inline/0069_match_arm.rs index b23a12500..3380fa4ca 100644 --- a/crates/ra_syntax/tests/data/parser/inline/0069_match_arm.rs +++ b/crates/ra_syntax/tests/data/parser/inline/0069_match_arm.rs | |||
@@ -1,6 +1,7 @@ | |||
1 | fn foo() { | 1 | fn foo() { |
2 | match () { | 2 | match () { |
3 | _ => (), | 3 | _ => (), |
4 | _ if Test>{field: 0} => (), | ||
4 | X | Y if Z => (), | 5 | X | Y if Z => (), |
5 | | X | Y if Z => (), | 6 | | X | Y if Z => (), |
6 | | X => (), | 7 | | X => (), |
diff --git a/crates/ra_syntax/tests/data/parser/inline/0069_match_arm.txt b/crates/ra_syntax/tests/data/parser/inline/0069_match_arm.txt index 044faec04..e5647765c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/0069_match_arm.txt +++ b/crates/ra_syntax/tests/data/parser/inline/0069_match_arm.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | SOURCE_FILE@[0; 125) | 1 | SOURCE_FILE@[0; 161) |
2 | FN_DEF@[0; 124) | 2 | FN_DEF@[0; 160) |
3 | FN_KW@[0; 2) | 3 | FN_KW@[0; 2) |
4 | WHITESPACE@[2; 3) | 4 | WHITESPACE@[2; 3) |
5 | NAME@[3; 6) | 5 | NAME@[3; 6) |
@@ -8,18 +8,18 @@ SOURCE_FILE@[0; 125) | |||
8 | L_PAREN@[6; 7) | 8 | L_PAREN@[6; 7) |
9 | R_PAREN@[7; 8) | 9 | R_PAREN@[7; 8) |
10 | WHITESPACE@[8; 9) | 10 | WHITESPACE@[8; 9) |
11 | BLOCK@[9; 124) | 11 | BLOCK@[9; 160) |
12 | L_CURLY@[9; 10) | 12 | L_CURLY@[9; 10) |
13 | WHITESPACE@[10; 15) | 13 | WHITESPACE@[10; 15) |
14 | EXPR_STMT@[15; 122) | 14 | EXPR_STMT@[15; 158) |
15 | MATCH_EXPR@[15; 121) | 15 | MATCH_EXPR@[15; 157) |
16 | MATCH_KW@[15; 20) | 16 | MATCH_KW@[15; 20) |
17 | WHITESPACE@[20; 21) | 17 | WHITESPACE@[20; 21) |
18 | TUPLE_EXPR@[21; 23) | 18 | TUPLE_EXPR@[21; 23) |
19 | L_PAREN@[21; 22) | 19 | L_PAREN@[21; 22) |
20 | R_PAREN@[22; 23) | 20 | R_PAREN@[22; 23) |
21 | WHITESPACE@[23; 24) | 21 | WHITESPACE@[23; 24) |
22 | MATCH_ARM_LIST@[24; 121) | 22 | MATCH_ARM_LIST@[24; 157) |
23 | L_CURLY@[24; 25) | 23 | L_CURLY@[24; 25) |
24 | WHITESPACE@[25; 34) | 24 | WHITESPACE@[25; 34) |
25 | MATCH_ARM@[34; 41) | 25 | MATCH_ARM@[34; 41) |
@@ -33,76 +33,116 @@ SOURCE_FILE@[0; 125) | |||
33 | R_PAREN@[40; 41) | 33 | R_PAREN@[40; 41) |
34 | COMMA@[41; 42) | 34 | COMMA@[41; 42) |
35 | WHITESPACE@[42; 51) | 35 | WHITESPACE@[42; 51) |
36 | MATCH_ARM@[51; 67) | 36 | MATCH_ARM@[51; 77) |
37 | BIND_PAT@[51; 52) | 37 | PLACEHOLDER_PAT@[51; 52) |
38 | NAME@[51; 52) | 38 | UNDERSCORE@[51; 52) |
39 | IDENT@[51; 52) "X" | ||
40 | WHITESPACE@[52; 53) | 39 | WHITESPACE@[52; 53) |
41 | PIPE@[53; 54) | 40 | IF_KW@[53; 55) |
42 | WHITESPACE@[54; 55) | 41 | WHITESPACE@[55; 56) |
43 | BIND_PAT@[55; 56) | 42 | BIN_EXPR@[56; 71) |
44 | NAME@[55; 56) | 43 | PATH_EXPR@[56; 60) |
45 | IDENT@[55; 56) "Y" | 44 | PATH@[56; 60) |
46 | WHITESPACE@[56; 57) | 45 | PATH_SEGMENT@[56; 60) |
47 | IF_KW@[57; 59) | 46 | NAME_REF@[56; 60) |
48 | WHITESPACE@[59; 60) | 47 | IDENT@[56; 60) "Test" |
49 | PATH_EXPR@[60; 61) | 48 | R_ANGLE@[60; 61) |
50 | PATH@[60; 61) | 49 | BLOCK_EXPR@[61; 71) |
51 | PATH_SEGMENT@[60; 61) | 50 | BLOCK@[61; 71) |
52 | NAME_REF@[60; 61) | 51 | L_CURLY@[61; 62) |
53 | IDENT@[60; 61) "Z" | 52 | EXPR_STMT@[62; 67) |
54 | WHITESPACE@[61; 62) | 53 | PATH_EXPR@[62; 67) |
55 | FAT_ARROW@[62; 64) | 54 | PATH@[62; 67) |
56 | WHITESPACE@[64; 65) | 55 | PATH_SEGMENT@[62; 67) |
57 | TUPLE_EXPR@[65; 67) | 56 | NAME_REF@[62; 67) |
58 | L_PAREN@[65; 66) | 57 | IDENT@[62; 67) "field" |
59 | R_PAREN@[66; 67) | 58 | err: `expected SEMI` |
60 | COMMA@[67; 68) | 59 | err: `expected expression` |
61 | WHITESPACE@[68; 77) | 60 | EXPR_STMT@[67; 68) |
62 | MATCH_ARM@[77; 95) | 61 | ERROR@[67; 68) |
63 | PIPE@[77; 78) | 62 | COLON@[67; 68) |
64 | WHITESPACE@[78; 79) | 63 | err: `expected SEMI` |
65 | BIND_PAT@[79; 80) | 64 | WHITESPACE@[68; 69) |
66 | NAME@[79; 80) | 65 | LITERAL@[69; 70) |
67 | IDENT@[79; 80) "X" | 66 | INT_NUMBER@[69; 70) "0" |
68 | WHITESPACE@[80; 81) | 67 | R_CURLY@[70; 71) |
69 | PIPE@[81; 82) | 68 | WHITESPACE@[71; 72) |
70 | WHITESPACE@[82; 83) | 69 | FAT_ARROW@[72; 74) |
71 | BIND_PAT@[83; 84) | 70 | WHITESPACE@[74; 75) |
72 | NAME@[83; 84) | 71 | TUPLE_EXPR@[75; 77) |
73 | IDENT@[83; 84) "Y" | 72 | L_PAREN@[75; 76) |
74 | WHITESPACE@[84; 85) | 73 | R_PAREN@[76; 77) |
75 | IF_KW@[85; 87) | 74 | COMMA@[77; 78) |
76 | WHITESPACE@[87; 88) | 75 | WHITESPACE@[78; 87) |
77 | PATH_EXPR@[88; 89) | 76 | MATCH_ARM@[87; 103) |
78 | PATH@[88; 89) | 77 | BIND_PAT@[87; 88) |
79 | PATH_SEGMENT@[88; 89) | 78 | NAME@[87; 88) |
80 | NAME_REF@[88; 89) | 79 | IDENT@[87; 88) "X" |
81 | IDENT@[88; 89) "Z" | 80 | WHITESPACE@[88; 89) |
82 | WHITESPACE@[89; 90) | 81 | PIPE@[89; 90) |
83 | FAT_ARROW@[90; 92) | 82 | WHITESPACE@[90; 91) |
83 | BIND_PAT@[91; 92) | ||
84 | NAME@[91; 92) | ||
85 | IDENT@[91; 92) "Y" | ||
84 | WHITESPACE@[92; 93) | 86 | WHITESPACE@[92; 93) |
85 | TUPLE_EXPR@[93; 95) | 87 | IF_KW@[93; 95) |
86 | L_PAREN@[93; 94) | 88 | WHITESPACE@[95; 96) |
87 | R_PAREN@[94; 95) | 89 | PATH_EXPR@[96; 97) |
88 | COMMA@[95; 96) | 90 | PATH@[96; 97) |
89 | WHITESPACE@[96; 105) | 91 | PATH_SEGMENT@[96; 97) |
90 | MATCH_ARM@[105; 114) | 92 | NAME_REF@[96; 97) |
91 | PIPE@[105; 106) | 93 | IDENT@[96; 97) "Z" |
92 | WHITESPACE@[106; 107) | 94 | WHITESPACE@[97; 98) |
93 | BIND_PAT@[107; 108) | 95 | FAT_ARROW@[98; 100) |
94 | NAME@[107; 108) | 96 | WHITESPACE@[100; 101) |
95 | IDENT@[107; 108) "X" | 97 | TUPLE_EXPR@[101; 103) |
96 | WHITESPACE@[108; 109) | 98 | L_PAREN@[101; 102) |
97 | FAT_ARROW@[109; 111) | 99 | R_PAREN@[102; 103) |
98 | WHITESPACE@[111; 112) | 100 | COMMA@[103; 104) |
99 | TUPLE_EXPR@[112; 114) | 101 | WHITESPACE@[104; 113) |
100 | L_PAREN@[112; 113) | 102 | MATCH_ARM@[113; 131) |
101 | R_PAREN@[113; 114) | 103 | PIPE@[113; 114) |
102 | COMMA@[114; 115) | 104 | WHITESPACE@[114; 115) |
103 | WHITESPACE@[115; 120) | 105 | BIND_PAT@[115; 116) |
104 | R_CURLY@[120; 121) | 106 | NAME@[115; 116) |
105 | SEMI@[121; 122) | 107 | IDENT@[115; 116) "X" |
106 | WHITESPACE@[122; 123) | 108 | WHITESPACE@[116; 117) |
107 | R_CURLY@[123; 124) | 109 | PIPE@[117; 118) |
108 | WHITESPACE@[124; 125) | 110 | WHITESPACE@[118; 119) |
111 | BIND_PAT@[119; 120) | ||
112 | NAME@[119; 120) | ||
113 | IDENT@[119; 120) "Y" | ||
114 | WHITESPACE@[120; 121) | ||
115 | IF_KW@[121; 123) | ||
116 | WHITESPACE@[123; 124) | ||
117 | PATH_EXPR@[124; 125) | ||
118 | PATH@[124; 125) | ||
119 | PATH_SEGMENT@[124; 125) | ||
120 | NAME_REF@[124; 125) | ||
121 | IDENT@[124; 125) "Z" | ||
122 | WHITESPACE@[125; 126) | ||
123 | FAT_ARROW@[126; 128) | ||
124 | WHITESPACE@[128; 129) | ||
125 | TUPLE_EXPR@[129; 131) | ||
126 | L_PAREN@[129; 130) | ||
127 | R_PAREN@[130; 131) | ||
128 | COMMA@[131; 132) | ||
129 | WHITESPACE@[132; 141) | ||
130 | MATCH_ARM@[141; 150) | ||
131 | PIPE@[141; 142) | ||
132 | WHITESPACE@[142; 143) | ||
133 | BIND_PAT@[143; 144) | ||
134 | NAME@[143; 144) | ||
135 | IDENT@[143; 144) "X" | ||
136 | WHITESPACE@[144; 145) | ||
137 | FAT_ARROW@[145; 147) | ||
138 | WHITESPACE@[147; 148) | ||
139 | TUPLE_EXPR@[148; 150) | ||
140 | L_PAREN@[148; 149) | ||
141 | R_PAREN@[149; 150) | ||
142 | COMMA@[150; 151) | ||
143 | WHITESPACE@[151; 156) | ||
144 | R_CURLY@[156; 157) | ||
145 | SEMI@[157; 158) | ||
146 | WHITESPACE@[158; 159) | ||
147 | R_CURLY@[159; 160) | ||
148 | WHITESPACE@[160; 161) | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/0086_no_semi_after_block.rs b/crates/ra_syntax/tests/data/parser/inline/0086_no_semi_after_block.rs index d769da43d..4919665cb 100644 --- a/crates/ra_syntax/tests/data/parser/inline/0086_no_semi_after_block.rs +++ b/crates/ra_syntax/tests/data/parser/inline/0086_no_semi_after_block.rs | |||
@@ -6,4 +6,8 @@ fn foo() { | |||
6 | for _ in () {} | 6 | for _ in () {} |
7 | {} | 7 | {} |
8 | {} | 8 | {} |
9 | macro_rules! test { | ||
10 | () => {} | ||
11 | } | ||
12 | test!{} | ||
9 | } | 13 | } |
diff --git a/crates/ra_syntax/tests/data/parser/inline/0086_no_semi_after_block.txt b/crates/ra_syntax/tests/data/parser/inline/0086_no_semi_after_block.txt index 69f0a48ce..63b230091 100644 --- a/crates/ra_syntax/tests/data/parser/inline/0086_no_semi_after_block.txt +++ b/crates/ra_syntax/tests/data/parser/inline/0086_no_semi_after_block.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | SOURCE_FILE@[0; 107) | 1 | SOURCE_FILE@[0; 167) |
2 | FN_DEF@[0; 106) | 2 | FN_DEF@[0; 166) |
3 | FN_KW@[0; 2) | 3 | FN_KW@[0; 2) |
4 | WHITESPACE@[2; 3) | 4 | WHITESPACE@[2; 3) |
5 | NAME@[3; 6) | 5 | NAME@[3; 6) |
@@ -8,7 +8,7 @@ SOURCE_FILE@[0; 107) | |||
8 | L_PAREN@[6; 7) | 8 | L_PAREN@[6; 7) |
9 | R_PAREN@[7; 8) | 9 | R_PAREN@[7; 8) |
10 | WHITESPACE@[8; 9) | 10 | WHITESPACE@[8; 9) |
11 | BLOCK@[9; 106) | 11 | BLOCK@[9; 166) |
12 | L_CURLY@[9; 10) | 12 | L_CURLY@[9; 10) |
13 | WHITESPACE@[10; 15) | 13 | WHITESPACE@[10; 15) |
14 | EXPR_STMT@[15; 25) | 14 | EXPR_STMT@[15; 25) |
@@ -78,10 +78,46 @@ SOURCE_FILE@[0; 107) | |||
78 | L_CURLY@[95; 96) | 78 | L_CURLY@[95; 96) |
79 | R_CURLY@[96; 97) | 79 | R_CURLY@[96; 97) |
80 | WHITESPACE@[97; 102) | 80 | WHITESPACE@[97; 102) |
81 | BLOCK_EXPR@[102; 104) | 81 | EXPR_STMT@[102; 104) |
82 | BLOCK@[102; 104) | 82 | BLOCK_EXPR@[102; 104) |
83 | L_CURLY@[102; 103) | 83 | BLOCK@[102; 104) |
84 | R_CURLY@[103; 104) | 84 | L_CURLY@[102; 103) |
85 | WHITESPACE@[104; 105) | 85 | R_CURLY@[103; 104) |
86 | R_CURLY@[105; 106) | 86 | WHITESPACE@[104; 109) |
87 | WHITESPACE@[106; 107) | 87 | EXPR_STMT@[109; 152) |
88 | MACRO_CALL@[109; 152) | ||
89 | PATH@[109; 120) | ||
90 | PATH_SEGMENT@[109; 120) | ||
91 | NAME_REF@[109; 120) | ||
92 | IDENT@[109; 120) "macro_rules" | ||
93 | EXCL@[120; 121) | ||
94 | WHITESPACE@[121; 122) | ||
95 | IDENT@[122; 126) "test" | ||
96 | WHITESPACE@[126; 127) | ||
97 | TOKEN_TREE@[127; 152) | ||
98 | L_CURLY@[127; 128) | ||
99 | WHITESPACE@[128; 138) | ||
100 | TOKEN_TREE@[138; 140) | ||
101 | L_PAREN@[138; 139) | ||
102 | R_PAREN@[139; 140) | ||
103 | WHITESPACE@[140; 141) | ||
104 | FAT_ARROW@[141; 143) | ||
105 | WHITESPACE@[143; 144) | ||
106 | TOKEN_TREE@[144; 146) | ||
107 | L_CURLY@[144; 145) | ||
108 | R_CURLY@[145; 146) | ||
109 | WHITESPACE@[146; 151) | ||
110 | R_CURLY@[151; 152) | ||
111 | WHITESPACE@[152; 157) | ||
112 | MACRO_CALL@[157; 164) | ||
113 | PATH@[157; 161) | ||
114 | PATH_SEGMENT@[157; 161) | ||
115 | NAME_REF@[157; 161) | ||
116 | IDENT@[157; 161) "test" | ||
117 | EXCL@[161; 162) | ||
118 | TOKEN_TREE@[162; 164) | ||
119 | L_CURLY@[162; 163) | ||
120 | R_CURLY@[163; 164) | ||
121 | WHITESPACE@[164; 165) | ||
122 | R_CURLY@[165; 166) | ||
123 | WHITESPACE@[166; 167) | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/0094_range_pat.rs b/crates/ra_syntax/tests/data/parser/inline/0094_range_pat.rs index 657467e75..c12ab6fce 100644 --- a/crates/ra_syntax/tests/data/parser/inline/0094_range_pat.rs +++ b/crates/ra_syntax/tests/data/parser/inline/0094_range_pat.rs | |||
@@ -1,3 +1,7 @@ | |||
1 | fn main() { | 1 | fn main() { |
2 | match 92 { 0 ... 100 => () } | 2 | match 92 { |
3 | 0 ... 100 => (), | ||
4 | 101 ..= 200 => (), | ||
5 | 200 .. 301=> (), | ||
6 | } | ||
3 | } | 7 | } |
diff --git a/crates/ra_syntax/tests/data/parser/inline/0094_range_pat.txt b/crates/ra_syntax/tests/data/parser/inline/0094_range_pat.txt index 12ccc1314..d47f38903 100644 --- a/crates/ra_syntax/tests/data/parser/inline/0094_range_pat.txt +++ b/crates/ra_syntax/tests/data/parser/inline/0094_range_pat.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | SOURCE_FILE@[0; 47) | 1 | SOURCE_FILE@[0; 112) |
2 | FN_DEF@[0; 46) | 2 | FN_DEF@[0; 111) |
3 | FN_KW@[0; 2) | 3 | FN_KW@[0; 2) |
4 | WHITESPACE@[2; 3) | 4 | WHITESPACE@[2; 3) |
5 | NAME@[3; 7) | 5 | NAME@[3; 7) |
@@ -8,35 +8,69 @@ SOURCE_FILE@[0; 47) | |||
8 | L_PAREN@[7; 8) | 8 | L_PAREN@[7; 8) |
9 | R_PAREN@[8; 9) | 9 | R_PAREN@[8; 9) |
10 | WHITESPACE@[9; 10) | 10 | WHITESPACE@[9; 10) |
11 | BLOCK@[10; 46) | 11 | BLOCK@[10; 111) |
12 | L_CURLY@[10; 11) | 12 | L_CURLY@[10; 11) |
13 | WHITESPACE@[11; 16) | 13 | WHITESPACE@[11; 16) |
14 | MATCH_EXPR@[16; 44) | 14 | MATCH_EXPR@[16; 109) |
15 | MATCH_KW@[16; 21) | 15 | MATCH_KW@[16; 21) |
16 | WHITESPACE@[21; 22) | 16 | WHITESPACE@[21; 22) |
17 | LITERAL@[22; 24) | 17 | LITERAL@[22; 24) |
18 | INT_NUMBER@[22; 24) "92" | 18 | INT_NUMBER@[22; 24) "92" |
19 | WHITESPACE@[24; 25) | 19 | WHITESPACE@[24; 25) |
20 | MATCH_ARM_LIST@[25; 44) | 20 | MATCH_ARM_LIST@[25; 109) |
21 | L_CURLY@[25; 26) | 21 | L_CURLY@[25; 26) |
22 | WHITESPACE@[26; 27) | 22 | WHITESPACE@[26; 35) |
23 | MATCH_ARM@[27; 42) | 23 | MATCH_ARM@[35; 50) |
24 | RANGE_PAT@[27; 36) | 24 | RANGE_PAT@[35; 44) |
25 | LITERAL@[27; 28) | 25 | LITERAL@[35; 36) |
26 | INT_NUMBER@[27; 28) "0" | 26 | INT_NUMBER@[35; 36) "0" |
27 | WHITESPACE@[28; 29) | 27 | WHITESPACE@[36; 37) |
28 | DOTDOTDOT@[29; 32) | 28 | DOTDOTDOT@[37; 40) |
29 | WHITESPACE@[32; 33) | 29 | WHITESPACE@[40; 41) |
30 | LITERAL@[33; 36) | 30 | LITERAL@[41; 44) |
31 | INT_NUMBER@[33; 36) "100" | 31 | INT_NUMBER@[41; 44) "100" |
32 | WHITESPACE@[36; 37) | 32 | WHITESPACE@[44; 45) |
33 | FAT_ARROW@[37; 39) | 33 | FAT_ARROW@[45; 47) |
34 | WHITESPACE@[39; 40) | 34 | WHITESPACE@[47; 48) |
35 | TUPLE_EXPR@[40; 42) | 35 | TUPLE_EXPR@[48; 50) |
36 | L_PAREN@[40; 41) | 36 | L_PAREN@[48; 49) |
37 | R_PAREN@[41; 42) | 37 | R_PAREN@[49; 50) |
38 | WHITESPACE@[42; 43) | 38 | COMMA@[50; 51) |
39 | R_CURLY@[43; 44) | 39 | WHITESPACE@[51; 60) |
40 | WHITESPACE@[44; 45) | 40 | MATCH_ARM@[60; 77) |
41 | R_CURLY@[45; 46) | 41 | RANGE_PAT@[60; 71) |
42 | WHITESPACE@[46; 47) | 42 | LITERAL@[60; 63) |
43 | INT_NUMBER@[60; 63) "101" | ||
44 | WHITESPACE@[63; 64) | ||
45 | DOTDOTEQ@[64; 67) | ||
46 | WHITESPACE@[67; 68) | ||
47 | LITERAL@[68; 71) | ||
48 | INT_NUMBER@[68; 71) "200" | ||
49 | WHITESPACE@[71; 72) | ||
50 | FAT_ARROW@[72; 74) | ||
51 | WHITESPACE@[74; 75) | ||
52 | TUPLE_EXPR@[75; 77) | ||
53 | L_PAREN@[75; 76) | ||
54 | R_PAREN@[76; 77) | ||
55 | COMMA@[77; 78) | ||
56 | WHITESPACE@[78; 87) | ||
57 | MATCH_ARM@[87; 102) | ||
58 | RANGE_PAT@[87; 97) | ||
59 | LITERAL@[87; 90) | ||
60 | INT_NUMBER@[87; 90) "200" | ||
61 | WHITESPACE@[90; 91) | ||
62 | DOTDOT@[91; 93) | ||
63 | WHITESPACE@[93; 94) | ||
64 | LITERAL@[94; 97) | ||
65 | INT_NUMBER@[94; 97) "301" | ||
66 | FAT_ARROW@[97; 99) | ||
67 | WHITESPACE@[99; 100) | ||
68 | TUPLE_EXPR@[100; 102) | ||
69 | L_PAREN@[100; 101) | ||
70 | R_PAREN@[101; 102) | ||
71 | COMMA@[102; 103) | ||
72 | WHITESPACE@[103; 108) | ||
73 | R_CURLY@[108; 109) | ||
74 | WHITESPACE@[109; 110) | ||
75 | R_CURLY@[110; 111) | ||
76 | WHITESPACE@[111; 112) | ||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0029_range_forms.rs b/crates/ra_syntax/tests/data/parser/ok/0029_range_forms.rs index 03f4ae7b2..f9ff444d4 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0029_range_forms.rs +++ b/crates/ra_syntax/tests/data/parser/ok/0029_range_forms.rs | |||
@@ -3,4 +3,9 @@ fn foo() { | |||
3 | ..z = 2; | 3 | ..z = 2; |
4 | x = false..1 == 1; | 4 | x = false..1 == 1; |
5 | let x = 1..; | 5 | let x = 1..; |
6 | |||
7 | ..=1 + 1; | ||
8 | ..=z = 2; | ||
9 | x = false..=1 == 1; | ||
10 | let x = 1..; | ||
6 | } | 11 | } |
diff --git a/crates/ra_syntax/tests/data/parser/ok/0029_range_forms.txt b/crates/ra_syntax/tests/data/parser/ok/0029_range_forms.txt index 2e7703c21..e3706bfbd 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0029_range_forms.txt +++ b/crates/ra_syntax/tests/data/parser/ok/0029_range_forms.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | SOURCE_FILE@[0; 79) | 1 | SOURCE_FILE@[0; 153) |
2 | FN_DEF@[0; 78) | 2 | FN_DEF@[0; 152) |
3 | FN_KW@[0; 2) | 3 | FN_KW@[0; 2) |
4 | WHITESPACE@[2; 3) | 4 | WHITESPACE@[2; 3) |
5 | NAME@[3; 6) | 5 | NAME@[3; 6) |
@@ -8,7 +8,7 @@ SOURCE_FILE@[0; 79) | |||
8 | L_PAREN@[6; 7) | 8 | L_PAREN@[6; 7) |
9 | R_PAREN@[7; 8) | 9 | R_PAREN@[7; 8) |
10 | WHITESPACE@[8; 9) | 10 | WHITESPACE@[8; 9) |
11 | BLOCK@[9; 78) | 11 | BLOCK@[9; 152) |
12 | L_CURLY@[9; 10) | 12 | L_CURLY@[9; 10) |
13 | WHITESPACE@[10; 15) | 13 | WHITESPACE@[10; 15) |
14 | EXPR_STMT@[15; 23) | 14 | EXPR_STMT@[15; 23) |
@@ -78,6 +78,80 @@ SOURCE_FILE@[0; 79) | |||
78 | INT_NUMBER@[72; 73) "1" | 78 | INT_NUMBER@[72; 73) "1" |
79 | DOTDOT@[73; 75) | 79 | DOTDOT@[73; 75) |
80 | SEMI@[75; 76) | 80 | SEMI@[75; 76) |
81 | WHITESPACE@[76; 77) | 81 | WHITESPACE@[76; 86) |
82 | R_CURLY@[77; 78) | 82 | err: `expected expression` |
83 | WHITESPACE@[78; 79) | 83 | EXPR_STMT@[86; 89) |
84 | ERROR@[86; 89) | ||
85 | DOTDOTEQ@[86; 89) | ||
86 | err: `expected SEMI` | ||
87 | EXPR_STMT@[89; 95) | ||
88 | BIN_EXPR@[89; 94) | ||
89 | LITERAL@[89; 90) | ||
90 | INT_NUMBER@[89; 90) "1" | ||
91 | WHITESPACE@[90; 91) | ||
92 | PLUS@[91; 92) | ||
93 | WHITESPACE@[92; 93) | ||
94 | LITERAL@[93; 94) | ||
95 | INT_NUMBER@[93; 94) "1" | ||
96 | SEMI@[94; 95) | ||
97 | WHITESPACE@[95; 100) | ||
98 | err: `expected expression` | ||
99 | EXPR_STMT@[100; 103) | ||
100 | ERROR@[100; 103) | ||
101 | DOTDOTEQ@[100; 103) | ||
102 | err: `expected SEMI` | ||
103 | EXPR_STMT@[103; 109) | ||
104 | BIN_EXPR@[103; 108) | ||
105 | PATH_EXPR@[103; 104) | ||
106 | PATH@[103; 104) | ||
107 | PATH_SEGMENT@[103; 104) | ||
108 | NAME_REF@[103; 104) | ||
109 | IDENT@[103; 104) "z" | ||
110 | WHITESPACE@[104; 105) | ||
111 | EQ@[105; 106) | ||
112 | WHITESPACE@[106; 107) | ||
113 | LITERAL@[107; 108) | ||
114 | INT_NUMBER@[107; 108) "2" | ||
115 | SEMI@[108; 109) | ||
116 | WHITESPACE@[109; 114) | ||
117 | EXPR_STMT@[114; 133) | ||
118 | BIN_EXPR@[114; 132) | ||
119 | PATH_EXPR@[114; 115) | ||
120 | PATH@[114; 115) | ||
121 | PATH_SEGMENT@[114; 115) | ||
122 | NAME_REF@[114; 115) | ||
123 | IDENT@[114; 115) "x" | ||
124 | WHITESPACE@[115; 116) | ||
125 | EQ@[116; 117) | ||
126 | WHITESPACE@[117; 118) | ||
127 | RANGE_EXPR@[118; 132) | ||
128 | LITERAL@[118; 123) | ||
129 | FALSE_KW@[118; 123) | ||
130 | DOTDOTEQ@[123; 126) | ||
131 | BIN_EXPR@[126; 132) | ||
132 | LITERAL@[126; 127) | ||
133 | INT_NUMBER@[126; 127) "1" | ||
134 | WHITESPACE@[127; 128) | ||
135 | EQEQ@[128; 130) | ||
136 | WHITESPACE@[130; 131) | ||
137 | LITERAL@[131; 132) | ||
138 | INT_NUMBER@[131; 132) "1" | ||
139 | SEMI@[132; 133) | ||
140 | WHITESPACE@[133; 138) | ||
141 | LET_STMT@[138; 150) | ||
142 | LET_KW@[138; 141) | ||
143 | WHITESPACE@[141; 142) | ||
144 | BIND_PAT@[142; 143) | ||
145 | NAME@[142; 143) | ||
146 | IDENT@[142; 143) "x" | ||
147 | WHITESPACE@[143; 144) | ||
148 | EQ@[144; 145) | ||
149 | WHITESPACE@[145; 146) | ||
150 | RANGE_EXPR@[146; 149) | ||
151 | LITERAL@[146; 147) | ||
152 | INT_NUMBER@[146; 147) "1" | ||
153 | DOTDOT@[147; 149) | ||
154 | SEMI@[149; 150) | ||
155 | WHITESPACE@[150; 151) | ||
156 | R_CURLY@[151; 152) | ||
157 | WHITESPACE@[152; 153) | ||
diff --git a/crates/ra_syntax/tests/test.rs b/crates/ra_syntax/tests/test.rs index 67acc9020..c17b6ffa6 100644 --- a/crates/ra_syntax/tests/test.rs +++ b/crates/ra_syntax/tests/test.rs | |||
@@ -6,7 +6,7 @@ extern crate walkdir; | |||
6 | use std::{ | 6 | use std::{ |
7 | fmt::Write, | 7 | fmt::Write, |
8 | fs, | 8 | fs, |
9 | path::{Path, PathBuf}, | 9 | path::{Path, PathBuf, Component}, |
10 | }; | 10 | }; |
11 | 11 | ||
12 | use ra_syntax::{ | 12 | use ra_syntax::{ |
@@ -37,6 +37,47 @@ fn parser_fuzz_tests() { | |||
37 | } | 37 | } |
38 | } | 38 | } |
39 | 39 | ||
40 | /// Test that Rust-analyzer can parse and validate the rust-analyser | ||
41 | /// TODO: Use this as a benchmark | ||
42 | #[test] | ||
43 | fn self_hosting_parsing() { | ||
44 | use std::ffi::OsStr; | ||
45 | let empty_vec = vec![]; | ||
46 | let dir = project_dir().join("crates"); | ||
47 | let mut count = 0; | ||
48 | for entry in walkdir::WalkDir::new(dir) | ||
49 | .into_iter() | ||
50 | .filter_entry(|entry| { | ||
51 | !entry | ||
52 | .path() | ||
53 | .components() | ||
54 | // TODO: this more neatly | ||
55 | .any(|component| { | ||
56 | // Get all files which are not in the crates/ra_syntax/tests/data folder | ||
57 | component == Component::Normal(OsStr::new("data")) | ||
58 | }) | ||
59 | }) | ||
60 | .map(|e| e.unwrap()) | ||
61 | .filter(|entry| { | ||
62 | // Get all `.rs ` files | ||
63 | !entry.path().is_dir() && (entry.path().extension() == Some(OsStr::new("rs"))) | ||
64 | }) | ||
65 | { | ||
66 | count += 1; | ||
67 | let text = read_text(entry.path()); | ||
68 | let node = SourceFileNode::parse(&text); | ||
69 | let errors = node.errors(); | ||
70 | assert_eq!( | ||
71 | errors, empty_vec, | ||
72 | "There should be no errors in the file {:?}", | ||
73 | entry | ||
74 | ); | ||
75 | } | ||
76 | assert!( | ||
77 | count > 30, | ||
78 | "self_hosting_parsing found too few files - is it running in the right directory?" | ||
79 | ) | ||
80 | } | ||
40 | /// Read file and normalize newlines. | 81 | /// Read file and normalize newlines. |
41 | /// | 82 | /// |
42 | /// `rustc` seems to always normalize `\r\n` newlines to `\n`: | 83 | /// `rustc` seems to always normalize `\r\n` newlines to `\n`: |
@@ -49,7 +90,9 @@ fn parser_fuzz_tests() { | |||
49 | /// | 90 | /// |
50 | /// so this should always be correct. | 91 | /// so this should always be correct. |
51 | fn read_text(path: &Path) -> String { | 92 | fn read_text(path: &Path) -> String { |
52 | fs::read_to_string(path).unwrap().replace("\r\n", "\n") | 93 | fs::read_to_string(path) |
94 | .expect(&format!("File at {:?} should be valid", path)) | ||
95 | .replace("\r\n", "\n") | ||
53 | } | 96 | } |
54 | 97 | ||
55 | pub fn dir_tests<F>(paths: &[&str], f: F) | 98 | pub fn dir_tests<F>(paths: &[&str], f: F) |
diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json index 51c72f019..5e3d64eef 100644 --- a/editors/code/package-lock.json +++ b/editors/code/package-lock.json | |||
@@ -17,9 +17,9 @@ | |||
17 | "dev": true | 17 | "dev": true |
18 | }, | 18 | }, |
19 | "ajv": { | 19 | "ajv": { |
20 | "version": "6.6.1", | 20 | "version": "6.6.2", |
21 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", | 21 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.2.tgz", |
22 | "integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==", | 22 | "integrity": "sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g==", |
23 | "dev": true, | 23 | "dev": true, |
24 | "requires": { | 24 | "requires": { |
25 | "fast-deep-equal": "2.0.1", | 25 | "fast-deep-equal": "2.0.1", |
@@ -193,12 +193,6 @@ | |||
193 | "strip-ansi": "3.0.1", | 193 | "strip-ansi": "3.0.1", |
194 | "supports-color": "2.0.0" | 194 | "supports-color": "2.0.0" |
195 | } | 195 | } |
196 | }, | ||
197 | "supports-color": { | ||
198 | "version": "2.0.0", | ||
199 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", | ||
200 | "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", | ||
201 | "dev": true | ||
202 | } | 196 | } |
203 | } | 197 | } |
204 | }, | 198 | }, |
@@ -298,12 +292,6 @@ | |||
298 | "color-convert": "1.9.3" | 292 | "color-convert": "1.9.3" |
299 | } | 293 | } |
300 | }, | 294 | }, |
301 | "has-flag": { | ||
302 | "version": "3.0.0", | ||
303 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", | ||
304 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", | ||
305 | "dev": true | ||
306 | }, | ||
307 | "supports-color": { | 295 | "supports-color": { |
308 | "version": "5.5.0", | 296 | "version": "5.5.0", |
309 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", | 297 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", |
@@ -409,9 +397,9 @@ | |||
409 | } | 397 | } |
410 | }, | 398 | }, |
411 | "commander": { | 399 | "commander": { |
412 | "version": "2.18.0", | 400 | "version": "2.19.0", |
413 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.18.0.tgz", | 401 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", |
414 | "integrity": "sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ==", | 402 | "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", |
415 | "dev": true | 403 | "dev": true |
416 | }, | 404 | }, |
417 | "concat-map": { | 405 | "concat-map": { |
@@ -437,7 +425,7 @@ | |||
437 | }, | 425 | }, |
438 | "css-select": { | 426 | "css-select": { |
439 | "version": "1.2.0", | 427 | "version": "1.2.0", |
440 | "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", | 428 | "resolved": "http://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", |
441 | "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", | 429 | "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", |
442 | "dev": true, | 430 | "dev": true, |
443 | "requires": { | 431 | "requires": { |
@@ -473,7 +461,7 @@ | |||
473 | }, | 461 | }, |
474 | "deep-assign": { | 462 | "deep-assign": { |
475 | "version": "1.0.0", | 463 | "version": "1.0.0", |
476 | "resolved": "https://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz", | 464 | "resolved": "http://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz", |
477 | "integrity": "sha1-sJJ0O+hCfcYh6gBnzex+cN0Z83s=", | 465 | "integrity": "sha1-sJJ0O+hCfcYh6gBnzex+cN0Z83s=", |
478 | "dev": true, | 466 | "dev": true, |
479 | "requires": { | 467 | "requires": { |
@@ -502,9 +490,9 @@ | |||
502 | "dev": true | 490 | "dev": true |
503 | }, | 491 | }, |
504 | "diff": { | 492 | "diff": { |
505 | "version": "3.3.1", | 493 | "version": "3.5.0", |
506 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", | 494 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", |
507 | "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", | 495 | "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", |
508 | "dev": true | 496 | "dev": true |
509 | }, | 497 | }, |
510 | "dom-serializer": { | 498 | "dom-serializer": { |
@@ -519,7 +507,7 @@ | |||
519 | "dependencies": { | 507 | "dependencies": { |
520 | "domelementtype": { | 508 | "domelementtype": { |
521 | "version": "1.1.3", | 509 | "version": "1.1.3", |
522 | "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", | 510 | "resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", |
523 | "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", | 511 | "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", |
524 | "dev": true | 512 | "dev": true |
525 | } | 513 | } |
@@ -928,13 +916,13 @@ | |||
928 | }, | 916 | }, |
929 | "string_decoder": { | 917 | "string_decoder": { |
930 | "version": "0.10.31", | 918 | "version": "0.10.31", |
931 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", | 919 | "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", |
932 | "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", | 920 | "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", |
933 | "dev": true | 921 | "dev": true |
934 | }, | 922 | }, |
935 | "through2": { | 923 | "through2": { |
936 | "version": "0.6.5", | 924 | "version": "0.6.5", |
937 | "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", | 925 | "resolved": "http://registry.npmjs.org/through2/-/through2-0.6.5.tgz", |
938 | "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", | 926 | "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", |
939 | "dev": true, | 927 | "dev": true, |
940 | "requires": { | 928 | "requires": { |
@@ -1078,7 +1066,7 @@ | |||
1078 | "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", | 1066 | "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", |
1079 | "dev": true, | 1067 | "dev": true, |
1080 | "requires": { | 1068 | "requires": { |
1081 | "ajv": "6.6.1", | 1069 | "ajv": "6.6.2", |
1082 | "har-schema": "2.0.0" | 1070 | "har-schema": "2.0.0" |
1083 | } | 1071 | } |
1084 | }, | 1072 | }, |
@@ -1101,9 +1089,9 @@ | |||
1101 | } | 1089 | } |
1102 | }, | 1090 | }, |
1103 | "has-flag": { | 1091 | "has-flag": { |
1104 | "version": "2.0.0", | 1092 | "version": "3.0.0", |
1105 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", | 1093 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", |
1106 | "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", | 1094 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", |
1107 | "dev": true | 1095 | "dev": true |
1108 | }, | 1096 | }, |
1109 | "has-symbols": { | 1097 | "has-symbols": { |
@@ -1129,7 +1117,7 @@ | |||
1129 | "domutils": "1.5.1", | 1117 | "domutils": "1.5.1", |
1130 | "entities": "1.1.2", | 1118 | "entities": "1.1.2", |
1131 | "inherits": "2.0.3", | 1119 | "inherits": "2.0.3", |
1132 | "readable-stream": "3.0.6" | 1120 | "readable-stream": "3.1.0" |
1133 | } | 1121 | } |
1134 | }, | 1122 | }, |
1135 | "http-signature": { | 1123 | "http-signature": { |
@@ -1160,9 +1148,9 @@ | |||
1160 | "dev": true | 1148 | "dev": true |
1161 | }, | 1149 | }, |
1162 | "is": { | 1150 | "is": { |
1163 | "version": "3.2.1", | 1151 | "version": "3.3.0", |
1164 | "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz", | 1152 | "resolved": "https://registry.npmjs.org/is/-/is-3.3.0.tgz", |
1165 | "integrity": "sha1-0Kwq1V63sL7JJqUmb2xmKqqD3KU=", | 1153 | "integrity": "sha512-nW24QBoPcFGGHJGUwnfpI7Yc5CdqWNdsyHQszVE/z2pKHXzh7FZ5GWhJqSyaQ9wMkQnsTx+kAI8bHlCX4tKdbg==", |
1166 | "dev": true | 1154 | "dev": true |
1167 | }, | 1155 | }, |
1168 | "is-absolute": { | 1156 | "is-absolute": { |
@@ -1331,7 +1319,7 @@ | |||
1331 | }, | 1319 | }, |
1332 | "kind-of": { | 1320 | "kind-of": { |
1333 | "version": "1.1.0", | 1321 | "version": "1.1.0", |
1334 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", | 1322 | "resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", |
1335 | "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", | 1323 | "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", |
1336 | "dev": true | 1324 | "dev": true |
1337 | }, | 1325 | }, |
@@ -1488,6 +1476,12 @@ | |||
1488 | "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", | 1476 | "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", |
1489 | "dev": true | 1477 | "dev": true |
1490 | }, | 1478 | }, |
1479 | "diff": { | ||
1480 | "version": "3.3.1", | ||
1481 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", | ||
1482 | "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", | ||
1483 | "dev": true | ||
1484 | }, | ||
1491 | "glob": { | 1485 | "glob": { |
1492 | "version": "7.1.2", | 1486 | "version": "7.1.2", |
1493 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", | 1487 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", |
@@ -1501,6 +1495,21 @@ | |||
1501 | "once": "1.4.0", | 1495 | "once": "1.4.0", |
1502 | "path-is-absolute": "1.0.1" | 1496 | "path-is-absolute": "1.0.1" |
1503 | } | 1497 | } |
1498 | }, | ||
1499 | "has-flag": { | ||
1500 | "version": "2.0.0", | ||
1501 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", | ||
1502 | "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", | ||
1503 | "dev": true | ||
1504 | }, | ||
1505 | "supports-color": { | ||
1506 | "version": "4.4.0", | ||
1507 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", | ||
1508 | "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", | ||
1509 | "dev": true, | ||
1510 | "requires": { | ||
1511 | "has-flag": "2.0.0" | ||
1512 | } | ||
1504 | } | 1513 | } |
1505 | } | 1514 | } |
1506 | }, | 1515 | }, |
@@ -1535,7 +1544,7 @@ | |||
1535 | "dev": true, | 1544 | "dev": true, |
1536 | "requires": { | 1545 | "requires": { |
1537 | "has": "1.0.3", | 1546 | "has": "1.0.3", |
1538 | "is": "3.2.1" | 1547 | "is": "3.3.0" |
1539 | } | 1548 | } |
1540 | }, | 1549 | }, |
1541 | "normalize-path": { | 1550 | "normalize-path": { |
@@ -1635,13 +1644,13 @@ | |||
1635 | }, | 1644 | }, |
1636 | "os-homedir": { | 1645 | "os-homedir": { |
1637 | "version": "1.0.2", | 1646 | "version": "1.0.2", |
1638 | "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", | 1647 | "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", |
1639 | "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", | 1648 | "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", |
1640 | "dev": true | 1649 | "dev": true |
1641 | }, | 1650 | }, |
1642 | "os-tmpdir": { | 1651 | "os-tmpdir": { |
1643 | "version": "1.0.2", | 1652 | "version": "1.0.2", |
1644 | "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", | 1653 | "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", |
1645 | "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", | 1654 | "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", |
1646 | "dev": true | 1655 | "dev": true |
1647 | }, | 1656 | }, |
@@ -1657,11 +1666,11 @@ | |||
1657 | }, | 1666 | }, |
1658 | "parse-semver": { | 1667 | "parse-semver": { |
1659 | "version": "1.1.1", | 1668 | "version": "1.1.1", |
1660 | "resolved": "https://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz", | 1669 | "resolved": "http://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz", |
1661 | "integrity": "sha1-mkr9bfBj3Egm+T+6SpnPIj9mbLg=", | 1670 | "integrity": "sha1-mkr9bfBj3Egm+T+6SpnPIj9mbLg=", |
1662 | "dev": true, | 1671 | "dev": true, |
1663 | "requires": { | 1672 | "requires": { |
1664 | "semver": "5.5.1" | 1673 | "semver": "5.6.0" |
1665 | } | 1674 | } |
1666 | }, | 1675 | }, |
1667 | "parse5": { | 1676 | "parse5": { |
@@ -1681,7 +1690,7 @@ | |||
1681 | }, | 1690 | }, |
1682 | "path-is-absolute": { | 1691 | "path-is-absolute": { |
1683 | "version": "1.0.1", | 1692 | "version": "1.0.1", |
1684 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", | 1693 | "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", |
1685 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", | 1694 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", |
1686 | "dev": true | 1695 | "dev": true |
1687 | }, | 1696 | }, |
@@ -1738,9 +1747,9 @@ | |||
1738 | "dev": true | 1747 | "dev": true |
1739 | }, | 1748 | }, |
1740 | "psl": { | 1749 | "psl": { |
1741 | "version": "1.1.29", | 1750 | "version": "1.1.31", |
1742 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", | 1751 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", |
1743 | "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", | 1752 | "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", |
1744 | "dev": true | 1753 | "dev": true |
1745 | }, | 1754 | }, |
1746 | "pump": { | 1755 | "pump": { |
@@ -1807,9 +1816,9 @@ | |||
1807 | } | 1816 | } |
1808 | }, | 1817 | }, |
1809 | "readable-stream": { | 1818 | "readable-stream": { |
1810 | "version": "3.0.6", | 1819 | "version": "3.1.0", |
1811 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.0.6.tgz", | 1820 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.0.tgz", |
1812 | "integrity": "sha512-9E1oLoOWfhSXHGv6QlwXJim7uNzd9EVlWK+21tCU9Ju/kR0/p2AZYPz4qSchgO8PlLIH4FpZYfzwS+rEksZjIg==", | 1821 | "integrity": "sha512-vpydAvIJvPODZNagCPuHG87O9JNPtvFEtjHHRVwNVsVVRBqemvPJkc2SYbxJsiZXawJdtZNmkmnsPuE3IgsG0A==", |
1813 | "dev": true, | 1822 | "dev": true, |
1814 | "requires": { | 1823 | "requires": { |
1815 | "inherits": "2.0.3", | 1824 | "inherits": "2.0.3", |
@@ -1885,9 +1894,9 @@ | |||
1885 | "dev": true | 1894 | "dev": true |
1886 | }, | 1895 | }, |
1887 | "resolve": { | 1896 | "resolve": { |
1888 | "version": "1.8.1", | 1897 | "version": "1.9.0", |
1889 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", | 1898 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.9.0.tgz", |
1890 | "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", | 1899 | "integrity": "sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ==", |
1891 | "dev": true, | 1900 | "dev": true, |
1892 | "requires": { | 1901 | "requires": { |
1893 | "path-parse": "1.0.6" | 1902 | "path-parse": "1.0.6" |
@@ -1924,9 +1933,9 @@ | |||
1924 | "dev": true | 1933 | "dev": true |
1925 | }, | 1934 | }, |
1926 | "semver": { | 1935 | "semver": { |
1927 | "version": "5.5.1", | 1936 | "version": "5.6.0", |
1928 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", | 1937 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", |
1929 | "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==" | 1938 | "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" |
1930 | }, | 1939 | }, |
1931 | "source-map": { | 1940 | "source-map": { |
1932 | "version": "0.6.1", | 1941 | "version": "0.6.1", |
@@ -1955,7 +1964,7 @@ | |||
1955 | }, | 1964 | }, |
1956 | "sprintf-js": { | 1965 | "sprintf-js": { |
1957 | "version": "1.0.3", | 1966 | "version": "1.0.3", |
1958 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", | 1967 | "resolved": "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", |
1959 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", | 1968 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", |
1960 | "dev": true | 1969 | "dev": true |
1961 | }, | 1970 | }, |
@@ -2057,17 +2066,14 @@ | |||
2057 | } | 2066 | } |
2058 | }, | 2067 | }, |
2059 | "supports-color": { | 2068 | "supports-color": { |
2060 | "version": "4.4.0", | 2069 | "version": "2.0.0", |
2061 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", | 2070 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", |
2062 | "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", | 2071 | "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", |
2063 | "dev": true, | 2072 | "dev": true |
2064 | "requires": { | ||
2065 | "has-flag": "2.0.0" | ||
2066 | } | ||
2067 | }, | 2073 | }, |
2068 | "tar": { | 2074 | "tar": { |
2069 | "version": "2.2.1", | 2075 | "version": "2.2.1", |
2070 | "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", | 2076 | "resolved": "http://registry.npmjs.org/tar/-/tar-2.2.1.tgz", |
2071 | "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", | 2077 | "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", |
2072 | "dev": true, | 2078 | "dev": true, |
2073 | "requires": { | 2079 | "requires": { |
@@ -2162,7 +2168,7 @@ | |||
2162 | "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", | 2168 | "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", |
2163 | "dev": true, | 2169 | "dev": true, |
2164 | "requires": { | 2170 | "requires": { |
2165 | "psl": "1.1.29", | 2171 | "psl": "1.1.31", |
2166 | "punycode": "1.4.1" | 2172 | "punycode": "1.4.1" |
2167 | }, | 2173 | }, |
2168 | "dependencies": { | 2174 | "dependencies": { |
@@ -2189,13 +2195,13 @@ | |||
2189 | "babel-code-frame": "6.26.0", | 2195 | "babel-code-frame": "6.26.0", |
2190 | "builtin-modules": "1.1.1", | 2196 | "builtin-modules": "1.1.1", |
2191 | "chalk": "2.4.1", | 2197 | "chalk": "2.4.1", |
2192 | "commander": "2.18.0", | 2198 | "commander": "2.19.0", |
2193 | "diff": "3.3.1", | 2199 | "diff": "3.5.0", |
2194 | "glob": "7.1.3", | 2200 | "glob": "7.1.3", |
2195 | "js-yaml": "3.12.0", | 2201 | "js-yaml": "3.12.0", |
2196 | "minimatch": "3.0.4", | 2202 | "minimatch": "3.0.4", |
2197 | "resolve": "1.8.1", | 2203 | "resolve": "1.9.0", |
2198 | "semver": "5.5.1", | 2204 | "semver": "5.6.0", |
2199 | "tslib": "1.9.3", | 2205 | "tslib": "1.9.3", |
2200 | "tsutils": "2.29.0" | 2206 | "tsutils": "2.29.0" |
2201 | } | 2207 | } |
@@ -2248,7 +2254,7 @@ | |||
2248 | "dependencies": { | 2254 | "dependencies": { |
2249 | "underscore": { | 2255 | "underscore": { |
2250 | "version": "1.8.3", | 2256 | "version": "1.8.3", |
2251 | "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", | 2257 | "resolved": "http://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", |
2252 | "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", | 2258 | "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", |
2253 | "dev": true | 2259 | "dev": true |
2254 | } | 2260 | } |
@@ -2489,7 +2495,7 @@ | |||
2489 | "dev": true, | 2495 | "dev": true, |
2490 | "requires": { | 2496 | "requires": { |
2491 | "cheerio": "1.0.0-rc.2", | 2497 | "cheerio": "1.0.0-rc.2", |
2492 | "commander": "2.18.0", | 2498 | "commander": "2.19.0", |
2493 | "denodeify": "1.2.1", | 2499 | "denodeify": "1.2.1", |
2494 | "glob": "7.1.3", | 2500 | "glob": "7.1.3", |
2495 | "lodash": "4.17.11", | 2501 | "lodash": "4.17.11", |
@@ -2499,7 +2505,7 @@ | |||
2499 | "osenv": "0.1.5", | 2505 | "osenv": "0.1.5", |
2500 | "parse-semver": "1.1.1", | 2506 | "parse-semver": "1.1.1", |
2501 | "read": "1.0.7", | 2507 | "read": "1.0.7", |
2502 | "semver": "5.5.1", | 2508 | "semver": "5.6.0", |
2503 | "tmp": "0.0.29", | 2509 | "tmp": "0.0.29", |
2504 | "url-join": "1.1.0", | 2510 | "url-join": "1.1.0", |
2505 | "vso-node-api": "6.1.2-preview", | 2511 | "vso-node-api": "6.1.2-preview", |
@@ -2522,7 +2528,7 @@ | |||
2522 | "gulp-vinyl-zip": "2.1.2", | 2528 | "gulp-vinyl-zip": "2.1.2", |
2523 | "mocha": "4.1.0", | 2529 | "mocha": "4.1.0", |
2524 | "request": "2.88.0", | 2530 | "request": "2.88.0", |
2525 | "semver": "5.5.1", | 2531 | "semver": "5.6.0", |
2526 | "source-map-support": "0.5.9", | 2532 | "source-map-support": "0.5.9", |
2527 | "url-parse": "1.4.4", | 2533 | "url-parse": "1.4.4", |
2528 | "vinyl-fs": "3.0.3", | 2534 | "vinyl-fs": "3.0.3", |
@@ -2539,7 +2545,7 @@ | |||
2539 | "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-5.2.1.tgz", | 2545 | "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-5.2.1.tgz", |
2540 | "integrity": "sha512-7jrS/9WnV0ruqPamN1nE7qCxn0phkH5LjSgSp9h6qoJGoeAKzwKz/PF6M+iGA/aklx4GLZg1prddhEPQtuXI1Q==", | 2546 | "integrity": "sha512-7jrS/9WnV0ruqPamN1nE7qCxn0phkH5LjSgSp9h6qoJGoeAKzwKz/PF6M+iGA/aklx4GLZg1prddhEPQtuXI1Q==", |
2541 | "requires": { | 2547 | "requires": { |
2542 | "semver": "5.5.1", | 2548 | "semver": "5.6.0", |
2543 | "vscode-languageserver-protocol": "3.14.1" | 2549 | "vscode-languageserver-protocol": "3.14.1" |
2544 | } | 2550 | } |
2545 | }, | 2551 | }, |