diff options
Diffstat (limited to 'src/parser/grammar/mod.rs')
-rw-r--r-- | src/parser/grammar/mod.rs | 24 |
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 | ||
53 | fn 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 | |||
64 | fn fn_value_parameters(p: &mut Parser) { | ||
65 | assert!(p.at(L_PAREN)); | ||
66 | p.bump(); | ||
67 | p.expect(R_PAREN); | ||
68 | } | ||
69 | |||
70 | fn fn_ret_type(p: &mut Parser) { | ||
71 | if p.at(THIN_ARROW) { | ||
72 | p.bump(); | ||
73 | types::type_(p); | ||
74 | } | ||
75 | } | ||
76 | |||
53 | fn name(p: &mut Parser) { | 77 | fn name(p: &mut Parser) { |
54 | if p.at(IDENT) { | 78 | if p.at(IDENT) { |
55 | let m = p.start(); | 79 | let m = p.start(); |