Commit Graph

1029 Commits

Author SHA1 Message Date
Aleksey Kladov
0a9e3ccc26 Rename FieldDef -> Field 2020-07-30 16:49:13 +02:00
Aleksey Kladov
6f8aa75329 Rename RecordLit -> RecordExpr 2020-07-30 16:21:30 +02:00
Aleksey Kladov
28ef4c375a Rename TypeParamList -> GenericParamList 2020-07-30 15:36:21 +02:00
Aleksey Kladov
eb2f806344 Rename TypeAliasDef -> TypeAlias 2020-07-30 15:25:46 +02:00
Aleksey Kladov
1142112c70 Rename FnDef -> Fn 2020-07-30 15:16:05 +02:00
Aleksey Kladov
b6b77d1396 Update tests 2020-07-30 14:20:33 +02:00
Aleksey Kladov
b1332670c7 Rename UseItem -> Use 2020-07-30 14:20:33 +02:00
Aleksey Kladov
e381c02ef3 Add comma list to use tree 2020-07-30 14:20:33 +02:00
Aleksey Kladov
96313283cd Update tests 2020-07-30 12:33:05 +02:00
Aleksey Kladov
d032f872b6 Finish extern crates grammar 2020-07-30 12:31:07 +02:00
Aleksey Kladov
026e4e6af1 Update tests 2020-07-30 12:01:14 +02:00
Aleksey Kladov
6cd2131caf Rename Rename 2020-07-30 11:58:41 +02:00
Aleksey Kladov
7d09e5ed61 Finish Module grammar 2020-07-30 11:50:56 +02:00
Aleksey Kladov
081f35fe1b Update tests 2020-07-30 11:50:56 +02:00
Aleksey Kladov
2984da672e Split ItemList & AssocItemList 2020-07-30 11:50:56 +02:00
Aleksey Kladov
ede5d17b04 Finish SourceFile grammar 2020-07-30 00:46:39 +02:00
Aleksey Kladov
6636f56e79 Rename ModuleItem -> Item 2020-07-30 00:23:03 +02:00
Aleksey Kladov
76202a2c73 Rename NomialDef -> AdtDef 2020-07-29 19:22:15 +02:00
Aleksey Kladov
3d28292157 Switch to ungrammar from ast_src
The primary advantage of ungrammar is that it (eventually) allows one
to describe concrete syntax tree structure -- with alternatives and
specific sequence of tokens & nodes.

That should be re-usable for:

* generate `make` calls
* Rust reference
* Hypothetical parser's evented API

We loose doc comments for the time being unfortunately. I don't think
we should add support for doc comments to ungrammar -- they'll make
grammar file hard to read. We might supply docs as out-of band info,
or maybe just via a reference, but we'll think about that once things
are no longer in flux
2020-07-29 19:18:25 +02:00
Aleksey Kladov
0d1357be05 Dead code 2020-07-29 17:35:12 +02:00
Aleksey Kladov
9fb1624c5e Remove dead code 2020-07-29 15:46:47 +02:00
Aleksey Kladov
dc18ff51c3 Remove dead code 2020-07-29 15:12:19 +02:00
Aleksey Kladov
b10e437039 Fix nameref parsing 2020-07-28 20:59:48 +02:00
Aleksey Kladov
e2030405d5 Rename modules 2020-07-23 17:23:01 +02:00
Laurențiu Nicola
cb958cf5fe Store macro invocation parameters as text instead of tt 2020-07-22 21:50:37 +03:00
kjeremy
d8eec71dc9 Bump lexer 2020-07-20 15:37:50 -04:00
Jonas Schievink
85f5cbc9dc Move remove_bounds to edit.rs 2020-07-14 13:33:37 +02:00
Jonas Schievink
0f654b06ab missing impl members: remove assoc. type bounds 2020-07-14 13:12:16 +02:00
Aleksey Kladov
f48ab3ebeb Comment decorations
closes #4461
2020-07-12 02:23:41 +02:00
Aleksey Kladov
9a3c22bbfd Make slow test parallel 2020-07-11 12:56:44 +02:00
Aleksey Kladov
68706b59c9 Don't mess with cursor position when adding hashes 2020-07-09 19:21:41 +02:00
Aleksey Kladov
8e1ebbcc13 Simplify 2020-07-09 11:47:27 +02:00
Aleksey Kladov
b660681a6b Unify tests 2020-07-09 10:58:56 +02:00
kjeremy
ebdee366b0 Clippy perf warnings
Removes redundant clones
2020-07-06 17:13:55 -04:00
Aleksey Kladov
991850bc3c Unify magic env var name 2020-07-01 12:31:03 +02:00
Aleksey Kladov
7b0113b3d5 Move parser specific tests utils to parser tests 2020-07-01 12:30:17 +02:00
Aleksey Kladov
bbc4dc9956 Update the rest of the tests 2020-06-29 17:23:01 +02:00
Veetaha
e75e2ae5b6 Simlify with matches!() 2020-06-28 04:03:59 +03:00
Laurențiu Nicola
52a488982f Bump rustc_lexer 2020-06-27 13:56:54 +03:00
Laurențiu Nicola
76ddface08 Fix panic in split and merge import assists 2020-06-23 16:51:07 +03:00
bors[bot]
6d0a765d34
Merge #4962
4962: Implement APIs for parsing expressions, types, paths, patterns and items r=davidlattimore a=davidlattimore



Co-authored-by: David Lattimore <dml@google.com>
2020-06-21 12:37:29 +00:00
David Lattimore
bc99e95d7d Implement APIs for parsing expressions, types, paths, patterns and items 2020-06-21 22:28:17 +10:00
bors[bot]
90a5c4626a
Merge #4851
4851: Add quickfix to add a struct field r=TimoFreiberg a=TimoFreiberg

Related to #4563 
I created a quickfix for record literals first because the NoSuchField diagnostic was already there.
To offer that quickfix for FieldExprs with unknown fields I'd need to add a new diagnostic (or create a `NoSuchField` diagnostic for those cases)

I think it'd make sense to make this a snippet completion (to select the generated type), but this would require changing the `Analysis` API and I'd like some feedback before I touch that.

Co-authored-by: Timo Freiberg <timo.freiberg@gmail.com>
2020-06-19 15:08:52 +00:00
bors[bot]
28077f971a
Merge #4872
4872: Reduce the usage of bare subscript operator r=matklad a=Veetaha



Co-authored-by: Veetaha <veetaha2@gmail.com>
2020-06-18 06:48:12 +00:00
bors[bot]
83a16e825d
Merge #4878
4878: Make "Replace qualified name with use" replace *all* mentions of the path r=matklad a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/4836

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-06-16 05:29:05 +00:00
David Lattimore
fe7d35d477 Make ra_syntax::{SyntaxNodeChildren, SyntaxElementChildren} public.
SyntaxNode::children and SyntaxNode::children_with_tokens return these types, but there's currently no way AFAIK to name them.
2020-06-15 21:36:30 +10:00
Aleksey Kladov
b5c4f2faa2 Update parser tests with env var 2020-06-15 11:02:17 +02:00
Veetaha
667d224fcc Reduce the usage of bare subscript operator 2020-06-14 13:12:52 +03:00
Jonas Schievink
e9eb54c617 Fix rewrite_root when there's only 1 replacement 2020-06-13 19:05:46 +02:00
Timo Freiberg
f5ac313000 Add quickfix to add a struct field 2020-06-12 18:52:44 +02:00