Commit Graph

13661 Commits

Author SHA1 Message Date
Aleksey Kladov
b7c141e0b5 Parse enums 2018-01-28 22:59:18 +03:00
bors[bot]
ab81e4c7b4 Merge #29
29: Structs r=matklad a=matklad

r? @CAD97
2018-01-28 18:21:35 +00:00
Aleksey Kladov
b9cbbfa405 Test for error recovery for broken parameters 2018-01-28 21:19:57 +03:00
Aleksey Kladov
8ca02acb5a Generic params in structs 2018-01-28 21:18:24 +03:00
Aleksey Kladov
7e55b2693f Move struct parsing to a separate module 2018-01-28 21:18:24 +03:00
bors[bot]
08def60f16 Merge #30
30: Skip over balanced parens r=matklad a=matklad
2018-01-28 17:53:33 +00:00
Aleksey Kladov
d1d47e6244 Skip over balanced parens 2018-01-28 20:53:01 +03:00
bors[bot]
4adf0c20b7 Merge #28
28: Don't return SyntaxKind from bump r=matklad a=matklad
2018-01-28 11:59:12 +00:00
Aleksey Kladov
dee7046f7e Don't return SyntaxKind from bump 2018-01-28 14:58:51 +03:00
bors[bot]
4212d28727 Merge #25
25: Drop curly_block r=matklad a=matklad

closes #13
2018-01-28 11:34:32 +00:00
Aleksey Kladov
2141888782 Rename raw_lookahead -> nth 2018-01-28 14:33:10 +03:00
Aleksey Kladov
60725def49 Simplify 2018-01-28 14:30:59 +03:00
Aleksey Kladov
3cd2b2473b Drop curly_block
closes #13
2018-01-28 14:26:24 +03:00
bors[bot]
7a6fa6504c Merge #24
24: Block Comments r=matklad a=CAD97

closes #7
2018-01-28 10:52:49 +00:00
Christopher Durham
5982e6d73b
Update comments.rs 2018-01-28 05:51:39 -05:00
Christopher Durham
f4f79038d1 Block Comments
closes #7
2018-01-28 05:08:25 -05:00
bors[bot]
37ee4c4c2a Merge #23
23: Simplify item parsing r=matklad a=matklad
2018-01-28 10:02:15 +00:00
Aleksey Kladov
0663c24222 Add recovery test 2018-01-28 13:01:39 +03:00
Aleksey Kladov
83aa6f0899 Simplify item parsing 2018-01-28 12:57:03 +03:00
Aleksey Kladov
469654e088 Let bors to cleanup branches 2018-01-28 12:49:42 +03:00
bors[bot]
8e9ca4cd03 Merge #22
22: Try to fix spurious download errors on appveyor r=matklad a=matklad
2018-01-28 09:41:43 +00:00
Aleksey Kladov
2f93371d82 Try to fix spurious download errors on appveyor 2018-01-28 12:40:50 +03:00
bors[bot]
eafb9c3ab4 Merge #21
21: Apply #20 to generating code r=CAD97 a=CAD97
2018-01-28 09:36:12 +00:00
Christopher Durham
14c0ee90ca
Update gen.rs 2018-01-28 04:31:18 -05:00
bors[bot]
fde9d3ca43 Merge #20
20: Drop `repr(u32)` from SyntaxKind r=CAD97 a=matklad

Nomicon says it disables some optimizations:
https://doc.rust-lang.org/beta/nomicon/other-reprs.html#repru-repri
2018-01-28 09:28:45 +00:00
Aleksey Kladov
169d5d371a Drop repr(u32) from SyntaxKind
Nomicon says it disables some optimizations:
https://doc.rust-lang.org/beta/nomicon/other-reprs.html#repru-repri
2018-01-28 12:24:03 +03:00
bors[bot]
bec9f09134 Merge #18
18: Comments r=matklad a=matklad
2018-01-28 09:07:26 +00:00
Aleksey Kladov
d3dedcace8 Document events a bit 2018-01-28 12:06:43 +03:00
Aleksey Kladov
cd4e13f10a Document events a bit 2018-01-28 12:06:26 +03:00
Aleksey Kladov
52104f7d25 Explain TOMBSTONE and EOF 2018-01-28 11:43:59 +03:00
bors[bot]
092f9a6b98 Merge #17
17: Document the design of `FileBuilder` r=matklad a=matklad
2018-01-28 08:18:47 +00:00
Aleksey Kladov
1417f26f82 Document the design of FileBuilder 2018-01-28 11:18:17 +03:00
bors[bot]
aff82e5ee1 Merge #16
16: Proof-of-concept SyntaxKind as enum r=matklad a=CAD97

This was the one bit about the original RFC I was most confused about. Why isn't `SyntaxKind` a normal `enum`?

If it's to signify that it's non-exhaustive [`#[non_exhaustive]`](https://github.com/rust-lang/rust/issues/44109) should be used. (Or `#[doc(hidden)] __Nonexhaustive` on stable.)

If it's so that more variants can be added externally, why? There's no need for that, that I can foresee.

If it's to expose the `SyntaxKind` type but not any of its instances, why? This is the only actual benefit I can see of this pseudo-enum style.

This diff is meant to be as non-invasive as possible, and as such reexports all symbols as they existed prior to this. It's diffed on top of the assumed-good-to-merge #15 to avoid the conflict between them.

Diff without #15: <4244948c6b>
Just `src/syntax_kinds.rs`: <4244948c6b (diff-8f0d69eb4fe0148851505f787b6fd3bb)>
2018-01-28 08:07:56 +00:00
bors[bot]
efadcf7158 Merge #15
15: Add minimal docs to most public symbols r=matklad a=CAD97

Also sticks a safety on some warnings that rustc provides.

If you're just stubbing out a module and don't want rustc refusing to compile it because you haven't documented it yet, stick `#![allow(missing_docs)]` at the top.
2018-01-28 07:51:49 +00:00
Christopher Durham
4244948c6b Convert SyntaxKind to an enum 2018-01-27 21:52:22 -05:00
Christopher Durham
50b9012e10 Add minimal docs to most public symbols 2018-01-27 20:29:14 -05:00
bors[bot]
6d3caf58ca Merge #14
14: Normalize test newlines r=matklad a=CAD97

Tests pass with CRLF newlines now
2018-01-28 00:24:27 +00:00
Aleksey Kladov
5e0752ceda The last of the Masters 2018-01-28 03:23:05 +03:00
Christopher Durham
58ff03086f Normalize test newlines
Tests pass with CRLF newlines now
2018-01-27 19:19:53 -05:00
Aleksey Kladov
fcc4987de5 Add appveyor badge 2018-01-28 03:15:30 +03:00
Aleksey Kladov
ee6ebec70d Fix typo 2018-01-28 03:14:30 +03:00
Aleksey Kladov
6a57d2ae4a CI: add windows testing 2018-01-28 03:13:44 +03:00
Christopher Durham
e6e61251ab
Merge pull request #12 from CAD97/enforce-fmt
Enforce rustfmt format
2018-01-27 18:51:12 -05:00
Christopher Durham
9140b3e728 Be explicit for Travis' sake 2018-01-27 18:47:42 -05:00
Christopher Durham
55e8755fbb Enforce rustfmt format 2018-01-27 18:36:02 -05:00
Christopher Durham
4de3c97b2a Enforce rustfmt format 2018-01-27 18:31:23 -05:00
Aleksey Kladov
357cd33581 Add tests for parser recovery in fields 2018-01-28 02:20:40 +03:00
Aleksey Kladov
3630aeb1ea Drop high-order stuff for good 2018-01-28 01:13:27 +03:00
Aleksey Kladov
b7ae5bbba2 Simplify 2018-01-28 01:12:49 +03:00
Aleksey Kladov
da9bfacd98 Brush up readme 2018-01-28 00:58:47 +03:00