aboutsummaryrefslogtreecommitdiff
path: root/src/parser/grammar/mod.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-02-11 09:51:09 +0000
committerAleksey Kladov <[email protected]>2018-02-11 09:51:09 +0000
commit8a3f17a4e263781deac5e503ad5116ec78004618 (patch)
tree0b489b1784c572011dd9e25d6d0ba53e8a50f148 /src/parser/grammar/mod.rs
parent2fb33b2d0d14f09ee06a42bca252dccbf57185e1 (diff)
G: fn pointer type
Diffstat (limited to 'src/parser/grammar/mod.rs')
-rw-r--r--src/parser/grammar/mod.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/parser/grammar/mod.rs b/src/parser/grammar/mod.rs
index abf9fe86c..5266354c1 100644
--- a/src/parser/grammar/mod.rs
+++ b/src/parser/grammar/mod.rs
@@ -50,6 +50,30 @@ fn alias(p: &mut Parser) -> bool {
50 true //FIXME: return false if three are errors 50 true //FIXME: return false if three are errors
51} 51}
52 52
53fn abi(p: &mut Parser) {
54 assert!(p.at(EXTERN_KW));
55 let abi = p.start();
56 p.bump();
57 match p.current() {
58 STRING | RAW_STRING => p.bump(),
59 _ => (),
60 }
61 abi.complete(p, ABI);
62}
63
64fn fn_value_parameters(p: &mut Parser) {
65 assert!(p.at(L_PAREN));
66 p.bump();
67 p.expect(R_PAREN);
68}
69
70fn fn_ret_type(p: &mut Parser) {
71 if p.at(THIN_ARROW) {
72 p.bump();
73 types::type_(p);
74 }
75}
76
53fn name(p: &mut Parser) { 77fn name(p: &mut Parser) {
54 if p.at(IDENT) { 78 if p.at(IDENT) {
55 let m = p.start(); 79 let m = p.start();