diff options
author | Aleksey Kladov <[email protected]> | 2018-07-31 13:35:59 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-07-31 13:35:59 +0100 |
commit | 2a2815266b35de12bd3c48cc405e8b3e8fcf8885 (patch) | |
tree | 46b80b237d7b9ef54d3f9c407283c8ead6954655 /src/parser/grammar/types.rs | |
parent | f843f23abae72ba3bd2920edc2a8635eafb61409 (diff) |
refactor ascription
Diffstat (limited to 'src/parser/grammar/types.rs')
-rw-r--r-- | src/parser/grammar/types.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/parser/grammar/types.rs b/src/parser/grammar/types.rs index bcdc3ef97..014086521 100644 --- a/src/parser/grammar/types.rs +++ b/src/parser/grammar/types.rs | |||
@@ -17,6 +17,11 @@ pub(super) fn type_(p: &mut Parser) { | |||
17 | } | 17 | } |
18 | } | 18 | } |
19 | 19 | ||
20 | pub(super) fn ascription(p: &mut Parser) { | ||
21 | p.expect(COLON); | ||
22 | type_(p) | ||
23 | } | ||
24 | |||
20 | fn type_no_plus(p: &mut Parser) { | 25 | fn type_no_plus(p: &mut Parser) { |
21 | type_(p); | 26 | type_(p); |
22 | } | 27 | } |