Commit Graph

28 Commits

Author SHA1 Message Date
csmoe
2ca9f71897 fix: support existential type 2019-06-12 14:32:39 +00:00
Aleksey Kladov
2e722ec54b show error offsets in tests 2019-05-29 10:31:07 +03:00
Aleksey Kladov
310bfe57bd update test data 2019-05-28 17:09:45 +03:00
Aleksey Kladov
313314e14b share literal validation logic with compiler 2019-05-07 19:41:59 +03:00
Aleksey Kladov
7d6bd5d137 always show token text 2019-04-02 14:49:46 +03:00
Ville Penttinen
245c0d8584 Update tests 2019-03-31 10:39:23 +03:00
Ville Penttinen
bfc2ac90c8 Update tests 2019-03-30 17:11:46 +02:00
bors[bot]
1cd18f9237 Merge #991
991: Use Marker argument for item parsers r=matklad a=pcpthm

Before doing this for expressions, I found that the pattern (Marker argument) should be applied to the item parsers because visiblity and modifiers are parsed in a separate function.

Fixed some parser bugs:
- Fix pub_expr: `pub 42;` was allowed.
- Fix incorrect parsing of crate::path: incorrectly parsed as `crate` as a visibility.

Co-authored-by: pcpthm <pcpthm@gmail.com>
2019-03-18 09:32:28 +00:00
pcpthm
76075c7410 Use Marker argument for item parsers
- Fix pub_expr
- Fix incorrect parsing of crate::path
2019-03-18 14:34:08 +09:00
pcpthm
a67fe4ea7e Fix parse tree of attribute on match arm 2019-03-17 20:57:27 +09:00
Aleksey Kladov
77f2381eea improve error recovery
parse the contents of error block as an expression
2019-03-04 15:31:18 +03:00
Ville Penttinen
96e3ac389f Parse only outer_attributes for match arms for now 2019-02-17 19:48:08 +02: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
2efdf41bdb make macro a NameOwner 2019-02-11 19:24:13 +03:00
DJMcNab
00e6b5d26c Parse and validate attributes in blocks 2019-01-28 20:03:56 +00:00
Aleksey Kladov
23172a116c rename POS_FIELD -> POS_FIELD_DEF
to match NAMED_FIELD_DEF
2019-01-26 00:24:12 +03:00
Erlend Tobiassen
8198cde13b
Update tests after allowing where predicate to accept types 2019-01-22 14:32:23 +01:00
Florian Diebold
fe6c4115f6 Rename ImplItem to ImplBlock
rustc uses the name ImplItem for items in impls, not the impl {} block itself,
which could lead to confusion.
2019-01-04 18:28:36 +01:00
Aleksey Kladov
49b0fe20ab fix suffix ranges 2018-12-27 15:10:30 +03:00
Florian Diebold
0d724ea572 Improve parsing of incomplete field accesses in preparation for field completion
We need to be able to get the receiver even if there is no field name yet, and
currently "a." wouldn't get parsed as a field name at all. This seems to help.
2018-12-25 15:16:42 +01:00
DJMcNab
134fe4f566 Fix the tests and fix the precommit hook 2018-12-20 16:45:54 +00:00
Aleksey Kladov
2ed1514df3 rename ROOT -> SOURCE_FILE 2018-11-07 18:42:36 +03:00
Aleksey Kladov
ec131b6c7b grammar: fix where clause parsing
closes #205
2018-11-06 21:19:32 +03:00
Aleksey Kladov
a05e09e9c5 Attach comments smartly 2018-10-08 17:36:38 +03:00
csmoe
8b710e9535 generate testsuite for impl_type 2018-09-26 16:53:16 +08:00
csmoe
edf1cc3582 parse impl type 2018-09-25 22:21:16 +08:00
csmoe
e446316585 add test for impl recovery 2018-09-24 11:44:43 +08:00
Aleksey Kladov
b5021411a8 rename all things 2018-09-16 13:07:39 +03:00