Aleksey Kladov
a4c6e8c4e2
Refactor if-let -> match assist to use ast::make
2020-02-05 14:08:16 +01:00
Aleksey Kladov
4ea0c12cf1
Make sure that newly created nodes are the root of the tree
2020-02-04 13:22:32 +01:00
Veetaha
a3e5663ae0
ra_syntax: added tests for tokenization errors
2020-02-04 00:00:55 +02:00
Veetaha
9367b9a292
ra_syntax: add backticks around tokens specimen
2020-02-04 00:00:55 +02:00
Veetaha
c3117eea31
ra_syntax: removed unnecessary init statement from reparsing tests
2020-02-04 00:00:55 +02:00
Veetaha
58e01d8754
ra_syntax: rename first_token() -> lex_first_token()
2020-02-04 00:00:55 +02:00
Veetaha
b1764d85fc
ra_syntax: fixed a typo in doc comment
2020-02-04 00:00:55 +02:00
Veetaha
9e7eaa959f
ra_syntax: refactored the lexer design as per @matklad and @kiljacken PR review
2020-02-04 00:00:55 +02:00
Veetaha
bf60661aa3
ra_syntax: remove backticks from TokenizeError message since that is not Markdown ;(
2020-02-04 00:00:55 +02:00
Veetaha
c6d0881382
add better docs for tokenize errors
2020-02-04 00:00:55 +02:00
Veetaha
ffe00631d5
ra_syntax: moved ParsedToken derive attribute under the doc comment
2020-02-04 00:00:55 +02:00
Veetaha
a2bc4c2a74
ra_syntax: fixed doc comment
2020-02-04 00:00:55 +02:00
Veetaha
ac37a11f04
Reimplemented lexer with vectors instead of iterators
2020-02-04 00:00:55 +02:00
Veetaha
ad24976da3
ra_syntax: changed added diagnostics information returned from tokenize() (implemented with iterators)
2020-02-04 00:00:55 +02:00
Veetaha
fa31841f1f
Fixed a typo
2020-01-22 13:02:21 +02:00
Veetaha
1ac105056a
Fixed a typo
2020-01-22 13:02:21 +02:00
Veetaha
b6be1b6f61
Preserved a comment on the bug previously present in ast::Literal::kind()
2020-01-22 13:02:21 +02:00
Veetaha
3ec781d4f2
ra_syntax: remove code duplication and token reevaluation from ast::Literal::kind()
2020-01-22 13:02:21 +02:00
TomasKralCZ
72792f6bc5
changed 'descendants()' to 'children()'
2020-01-20 10:19:33 +01:00
TomasKralCZ
f67ee69777
added eq_token() method to LetStmt
2020-01-19 18:55:56 +01:00
Aleksey Kladov
3a859e587f
Nest attrs into exprs in function args
2020-01-17 11:47:07 +01:00
Aleksey Kladov
b7c45fba57
Extract expr_with_attrs
2020-01-17 11:44:40 +01:00
Aleksey Kladov
90b8a31b83
Merge pull request #2813 from jyn514/arg_attributes
...
Allow attributes before function arguments
2020-01-17 11:15:07 +01:00
Joshua Nelson
f077d5c303
move inline function closer to relevant code
...
also updates generated inline tests
2020-01-16 22:20:17 -05:00
Aleksey Kladov
5398b9eeba
Minimize test
2020-01-16 18:39:29 +01:00
Aleksey Kladov
ab0a11b1de
Simplify array parsing
2020-01-16 18:35:03 +01:00
bors[bot]
e614356de1
Merge #2827
...
2827: Fix array element attribute position r=matklad a=edwin0cheng
This PR fixed a bug which an ATTR node insert in the wrong place in array element. ~~And introduce `precede_next` for allow outer attributes to insert into a parsed `expr`.~~
related #2783
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-01-16 15:49:23 +00:00
Edwin Cheng
ed8d5c86e3
Fix array element attribute position
2020-01-16 23:37:43 +08:00
bors[bot]
c78d269b66
Merge #2837
...
2837: Accidentally quadratic r=matklad a=matklad
Our syntax highlighting is accdentally quadratic. Current state of the PR fixes it in a pretty crude way, looks like for the proper fix we need to redo how source-analyzer works.
**NB:** don't be scared by diff stats, that's mostly a test-data file
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-01-15 19:38:10 +00:00
Aleksey Kladov
ef1326ee19
More orthogonal path editing
2020-01-15 18:48:28 +01:00
Aleksey Kladov
7d2d3ac3db
More fluent API
2020-01-15 18:30:23 +01:00
Aleksey Kladov
c84010e246
Slightly more fluent API
2020-01-15 18:14:49 +01:00
Aleksey Kladov
8296d3208d
Simplify
2020-01-15 18:01:05 +01:00
Aleksey Kladov
448575aa4a
Simplify
2020-01-15 18:01:05 +01:00
Aleksey Kladov
35bfeaf4af
Add a test
2020-01-15 16:52:28 +01:00
Veetaha
60251da204
refactor(ra_syntax.validation): removed code duplication from validate_literal() function
2020-01-14 04:09:03 +02:00
kjeremy
a82c679c97
Some clippy lints
2020-01-13 11:27:06 -05:00
Joshua Nelson
c3ac2c93fb
Allow attributes before function arguments
...
This adds support for function calls of the form:
```rust
(
#[attr(...)] 1.2,
#[attr_one(...)]
#[attr_two(...)]
1.5,
... etc ...
)
```
Closes https://github.com/rust-analyzer/rust-analyzer/issues/2801
2020-01-12 10:25:41 -05:00
Florian Diebold
2c11a9b42d
Qualify paths in 'fill match arms' assist
2020-01-12 11:34:52 +01:00
Florian Diebold
15fc643e05
Fix ordering problem between qualifying paths and substituting params
2020-01-11 23:33:04 +01:00
Florian Diebold
4545f289a9
Handle type args
2020-01-11 23:33:04 +01:00
Jeremy Kolb
d993f329a0
Basic DocumentHighlightKind support for assignments
2020-01-10 15:14:19 -05:00
Emil Lauridsen
aa433c67d8
Parse trait aliases
2020-01-09 18:40:01 +01:00
Aleksey Kladov
47785b0cd4
⬆️ rowan
2020-01-09 16:33:02 +01:00
Michael Chesser
ce1b34fd59
Improve const generics parsing
...
- Handle const generics type args
- Fix issue with const generic as first parameter in trait impl
2020-01-07 09:29:03 +10:30
Jeremy Kolb
5afb22e2b3
BinOp helper to detect assignment
2020-01-04 15:54:31 -05:00
Aleksey Kladov
b5e7186265
remove unused file
2020-01-04 10:58:10 +01:00
Aleksey Kladov
084bd304f3
Switch ast declaration from ron to a macro
2020-01-03 21:54:10 +01:00
Florian Diebold
79c90b5641
Collect visibility of items during nameres
2019-12-26 16:23:40 +01:00
Florian Diebold
069bf55cca
Add infrastructure for visibility on syntax and hir_def level
2019-12-26 16:23:40 +01:00