Commit graph

18 commits

Author SHA1 Message Date
Florian Diebold
3ac605e687 Add beginnings of type infrastructure 2018-12-23 13:48:04 +01:00
DJMcNab
89cf7d8743 Clarify and correct comment about multi_byte_tokens 2018-12-08 19:28:10 +03:00
Adolfo Ochagavía
30cd4d5acb Validate byte string literals 2018-11-11 20:41:43 +01:00
Adolfo Ochagavía
c258b4fdb0 Add validator for byte 2018-11-11 20:27:00 +01:00
Adolfo Ochagavía
3b4c02c19e Validate string literals 2018-11-09 14:52:17 +01:00
Aleksey Kladov
2ed1514df3 rename ROOT -> SOURCE_FILE 2018-11-07 18:42:36 +03:00
Jeremy A. Kolb
6df71da81f Add some more DocCommentsOwner 2018-11-07 18:24:55 +03:00
Adolfo Ochagavía
9b5bbab104 Add character literal parsing and validation 2018-11-04 15:17:24 +01:00
Jeremy A. Kolb
61580f3cb8 Remove DOC_COMMENT
Closes #166
2018-10-31 17:38:18 -04:00
Jeremy A. Kolb
d2bcd1a386 ast::DocCommentsOwner which represents a documentation comment owner 2018-10-31 15:08:37 -04:00
Aleksey Kladov
69d07df201 Complete crate:: paths 2018-10-24 18:37:25 +03:00
Aleksey Kladov
2f4a248f80 rename gen-kinds to gen-syntax 2018-10-16 21:17:19 +03:00
bors[bot]
a230b438e0 Merge #127
127: Improve folding r=matklad a=aochagavia

I was messing around with adding support for multiline comments in folding and ended up changing a bunch of other things. 

First of all, I am not convinced of folding groups of successive items. For instance, I don't see why it is worthwhile to be able to fold something like the following:

```rust
use foo;
use bar;
```

Furthermore, this causes problems if you want to fold a multiline import:

```rust
use foo::{
  quux
};
use bar;
```

The problem is that now there are two possible folds at the same position: we could fold the first use or we could fold the import group. IMO, the only place where folding groups makes sense is when folding comments. Therefore I have **removed folding import groups in favor of folding multiline imports**.

Regarding folding comments, I made it a bit more robust by requiring that comments can only be folded if they have the same flavor. So if you have a bunch of `//` comments followed by `//!` comments, you will get two separate fold groups instead of a single one.

Finally, I rewrote the API in such a way that it should be trivial to add new folds. You only need to:

* Create a new FoldKind
* Add it to the `fold_kind` function that converts from `SyntaxKind` to `FoldKind`

Fixes #113 

Co-authored-by: Adolfo Ochagavía <github@adolfo.ochagavia.xyz>
2018-10-15 16:48:17 +00:00
Adolfo Ochagavía
4b3737510b Cleanup fold code and split logic to fold single elements 2018-10-12 19:20:58 +02:00
Jeremy A. Kolb
f8a2b53304 Language Server: textDocument/signatureHelp
Implements a pretty barebones function signature help mechanism in
the language server.

Users can use `Analysis::resolve_callback()` to get basic information
about a call site.

Fixes #102
2018-10-11 16:40:46 -04:00
Adolfo Ochagavía
f88e13f539 Use Comment wrapper 2018-10-11 16:25:35 +02:00
Daniel McNab
80eefcbc05 Add cargo gen-kinds documentation 2018-10-04 21:43:58 +01:00
Aleksey Kladov
b5021411a8 rename all things 2018-09-16 13:07:39 +03:00
Renamed from crates/libsyntax2/src/grammar.ron (Browse further)