Aleksey Kladov
689661c959
Scale back to only two traits
2020-04-09 13:00:09 +02:00
Luca Barbieri
60f4d7bd8c
Provide more complete AST accessors to support usage in rustc
2020-04-09 11:50:37 +02:00
Aleksey Kladov
8f01e62bb9
Scale back the traits
2020-04-09 11:04:18 +02:00
Luca Barbieri
68196ccc10
Add AstElement trait, generate tokens, support tokens in enums
...
- Adds a new AstElement trait that is implemented by all generated
node, token and enum structs
- Overhauls the code generators to code-generate all tokens, and
also enhances enums to support including tokens, node, and nested
enums
2020-04-08 17:15:12 +02:00
Fireassember
787043496a
added fmt::Display as a supertrait for AstNode and changed generation.
2020-03-06 19:29:30 +02:00
Aleksey Kladov
584c8d9875
Slightly refactor inlay hints
2020-02-29 23:24:50 +01:00
Kirill Bulatov
2a7d97d829
Fix the trailing whitespace test
2020-02-12 17:04:16 +02:00
Kirill Bulatov
848c576266
Introduce AttrKind
2020-02-12 16:44:52 +02:00
Jonas Platte
a3b104aa6d
Implement slice pattern AST > HIR lowering
2020-02-11 22:33:11 +01:00
Florian Diebold
069bf55cca
Add infrastructure for visibility on syntax and hir_def level
2019-12-26 16:23:40 +01:00
Geoffry Song
5645c153e0
Attempt to implement typed accessors
2019-11-15 12:05:29 -08:00
kjeremy
dcc0a9cd7e
Attach docs to statics
2019-10-31 16:21:46 -04:00
Jeremy Kolb
1438f38eb6
Preserve whitespace at the end of doc comments
...
Whitespace can have special meaning in markdown. For instance
ending a line with three spaces will render a new line.
Note that this behavior diverges from RLS.
Fixes #1997
2019-10-27 16:56:25 -04:00
Aleksey Kladov
5dbbfda34a
simplify strip attrs
2019-09-28 19:50:16 +03:00
Aleksey Kladov
d847d53e36
Start simplifying editing API
2019-09-26 22:22:08 +03:00
Aleksey Kladov
183a38fb50
keep ast creation API simple
2019-09-26 15:29:28 +03:00
Aleksey Kladov
bbcca4f735
make ast object safe
2019-08-23 15:06:47 +03:00
Florian Diebold
16a7d8cc85
Add impl Trait
and dyn Trait
types
...
- refactor bounds handling in the AST a bit
- add HIR for bounds
- add `Ty::Dyn` and `Ty::Opaque` variants and lower `dyn Trait` / `impl Trait`
syntax to them
2019-08-22 19:33:00 +02:00
kjeremy
0f61aa1f09
Unconditionally trim the end of comments
2019-07-31 13:59:14 -04:00
kjeremy
d65dc40348
Removes */
in block doc comments
2019-07-31 11:43:00 -04:00
kjeremy
4fccad9b2c
Add explicit newline preserving tests
2019-07-31 10:46:15 -04:00
Aleksey Kladov
5c594bcb48
cleanup casts
2019-07-19 18:22:00 +03:00
Aleksey Kladov
0343c4a815
migrate ra_assists to the new AST
2019-07-19 13:16:25 +03:00
Aleksey Kladov
d402974aa0
migrate ra_syntax to the new rowan API
2019-07-19 13:16:24 +03:00
Aleksey Kladov
1834bae5b8
allow rustfmt to reorder imports
...
This wasn't a right decision in the first place, the feature flag was
broken in the last rustfmt release, and syntax highlighting of imports
is more important anyway
2019-07-04 23:09:09 +03:00
Aleksey Kladov
0efbcdf435
remove old parsing methods
2019-05-28 17:34:28 +03:00
Aleksey Kladov
faf526e021
migrate to untyped rowan
2019-04-09 10:26:51 +03:00
Lenard Pratt
b27fa33a9f
updated snapshots
2019-04-07 13:23:18 +01:00
Lenard Pratt
e175921932
Added ArrayExprKind,
...
changed the display for fixed array types,
Added Array Enum to ra_hir/expr
2019-04-07 13:23:14 +01:00
robojumper
ca40ca93a5
Parse and infer tuple indices
2019-04-06 01:07:35 +02:00
Aleksey Kladov
ab19ff16e5
add minimal comments
2019-04-02 13:02:23 +03:00
Aleksey Kladov
0e1e40676a
rename flavor to kind
2019-04-02 12:53:44 +03:00
Aleksey Kladov
cb5001c0a5
move extensions to submodules
2019-04-02 12:47:39 +03:00
Aleksey Kladov
f3a82c372c
remove flavor
2019-04-02 12:25:24 +03:00
Aleksey Kladov
ae282d8da6
add ast::tokens
2019-04-02 10:23:29 +03:00
Aleksey Kladov
f874d372bb
simplify
2019-04-02 10:09:52 +03:00
Aleksey Kladov
bd1f5ba222
move ast traits to a separate file
2019-04-02 10:03:19 +03:00
Aleksey Kladov
8014116e5f
remove dead code
2019-04-02 00:14:57 +03:00
Aleksey Kladov
9e213385c9
switch to new rowan
2019-04-01 12:06:24 +03:00
Ville Penttinen
3f62ab8f51
Add WherePred to allow predicate access in WhereClause
...
This also unifies parsing of WHERE_PRED bounds, now Lifetime bounds will also be
parsed using TYPE_BOUND_LIST
2019-03-31 13:20:56 +03:00
Ville Penttinen
55dcdb7d09
Add trait ast::TypeBoundsOwner
2019-03-31 10:56:48 +03:00
Aleksey Kladov
6c4b06e2e3
simplify
2019-03-25 10:59:42 +03:00
Marco Groppo
67055c47da
Target only the actual operator.
...
Renamed `BinExpr::op()` and `PrefixExpr::op()` to `op_kind`.
Now `op()` returns the `SyntaxNode`.
2019-03-24 22:21:22 +01:00
Aleksey Kladov
182c05a96c
add name resolution from the old impl
...
unlike the old impl, this also handles macro imports across crates
2019-03-17 12:46:13 +03:00
Ville Penttinen
6eb070d661
Add new trait TypeAscriptionOwner
...
This trait should be implemented for nodes which have an ascribed type,
e.g. thing : Type. Such as let, const, static, param, named struct fields.
2019-02-26 11:35:57 +02:00
Aleksey Kladov
65a2be4953
complete struct literals
2019-02-24 17:01:56 +03:00
Aleksey Kladov
412ac63ff5
docs
2019-02-21 15:24:42 +03:00
Aleksey Kladov
4e8a3f565b
handle != operator
2019-02-18 10:09:44 +03:00
Ville Penttinen
1c97c1ac11
Enable parsing of attributes inside a match block
...
We allow invalid inner attributes to be parsed, e.g. inner attributes that are
not directly after the opening brace of the match block.
Instead we run validation on `MatchArmList` to allow better reporting of errors.
2019-02-17 19:26:57 +02:00
Aleksey Kladov
4e91c23c79
rename yellow -> syntax_node
...
why yellow in the first place? Its red + green.
2019-02-12 19:02:30 +03:00