diff options
author | Aleksey Kladov <[email protected]> | 2018-01-07 12:34:11 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-01-07 12:34:11 +0000 |
commit | 7c6f0f9128665c1a605caaa552347b936578f952 (patch) | |
tree | e46900ddc24786364a767b35c78c0df588ab0541 /src | |
parent | 9e4052cc2ee12751ba94909ff479bd03df141ac4 (diff) |
G: shebang
Diffstat (limited to 'src')
-rw-r--r-- | src/parser/event_parser/grammar.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/parser/event_parser/grammar.rs b/src/parser/event_parser/grammar.rs index e1f717714..f26cbc4f6 100644 --- a/src/parser/event_parser/grammar.rs +++ b/src/parser/event_parser/grammar.rs | |||
@@ -6,7 +6,7 @@ use syntax_kinds::*; | |||
6 | 6 | ||
7 | pub fn file(p: &mut Parser) { | 7 | pub fn file(p: &mut Parser) { |
8 | node(p, FILE, |p| { | 8 | node(p, FILE, |p| { |
9 | shebang(p); | 9 | p.optional(SHEBANG); |
10 | inner_attributes(p); | 10 | inner_attributes(p); |
11 | many(p, |p| { | 11 | many(p, |p| { |
12 | skip_to_first( | 12 | skip_to_first( |
@@ -17,11 +17,6 @@ pub fn file(p: &mut Parser) { | |||
17 | }) | 17 | }) |
18 | } | 18 | } |
19 | 19 | ||
20 | |||
21 | fn shebang(_: &mut Parser) { | ||
22 | //TODO | ||
23 | } | ||
24 | |||
25 | fn inner_attributes(_: &mut Parser) { | 20 | fn inner_attributes(_: &mut Parser) { |
26 | //TODO | 21 | //TODO |
27 | } | 22 | } |
@@ -136,4 +131,10 @@ impl<'p> Parser<'p> { | |||
136 | false | 131 | false |
137 | } | 132 | } |
138 | } | 133 | } |
134 | |||
135 | pub(crate) fn optional(&mut self, kind: SyntaxKind) { | ||
136 | if self.current_is(kind) { | ||
137 | self.bump(); | ||
138 | } | ||
139 | } | ||
139 | } \ No newline at end of file | 140 | } \ No newline at end of file |