diff options
| author | Martin Haug <mhaug@live.de> | 2021-05-29 12:25:10 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-05-31 22:33:40 +0200 |
| commit | 9f77f09aacd1fb0fd6138a6d16ed2755f6bfae3f (patch) | |
| tree | eba4a1609f178b3f2e6838ca9ee3c013e420621f /src/parse/parser.rs | |
| parent | 0bfee5b7772338fd39bbf708d3e31ea7bcec859b (diff) | |
Parse import and include expressions
Co-Authored-By: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'src/parse/parser.rs')
| -rw-r--r-- | src/parse/parser.rs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/parse/parser.rs b/src/parse/parser.rs index 729d0a8d..6269ad73 100644 --- a/src/parse/parser.rs +++ b/src/parse/parser.rs @@ -46,9 +46,6 @@ pub enum Group { Bracket, /// A curly-braced group: `{...}`. Brace, - /// A group ended by a chained subheader or a closing bracket: - /// `... >>`, `...]`. - Subheader, /// A group ended by a semicolon or a line break: `;`, `\n`. Stmt, /// A group for a single expression, ended by a line break. @@ -129,7 +126,6 @@ impl<'s> Parser<'s> { Group::Paren => self.assert(Token::LeftParen), Group::Bracket => self.assert(Token::LeftBracket), Group::Brace => self.assert(Token::LeftBrace), - Group::Subheader => {} Group::Stmt => {} Group::Expr => {} } @@ -152,7 +148,6 @@ impl<'s> Parser<'s> { Group::Paren => Some((Token::RightParen, true)), Group::Bracket => Some((Token::RightBracket, true)), Group::Brace => Some((Token::RightBrace, true)), - Group::Subheader => None, Group::Stmt => Some((Token::Semicolon, false)), Group::Expr => None, } { @@ -365,7 +360,6 @@ impl<'s> Parser<'s> { Token::RightBracket => self.inside(Group::Bracket), Token::RightBrace => self.inside(Group::Brace), Token::Semicolon => self.inside(Group::Stmt), - Token::Pipe => self.inside(Group::Subheader), Token::Space(n) => n >= 1 && self.stop_at_newline(), _ => false, } { |
