Browse Source

Fix warnings

github-actions
Garrit Franke 2 years ago
parent
commit
e276e7c7f8
  1. 21
      src/parser/rules.rs

21
src/parser/rules.rs

@ -1,8 +1,23 @@
/**
* Copyright 2020 Garrit Franke
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
use super::node_type::Statement;
use super::node_type::*;
use super::parser::Parser;
use crate::lexer::Keyword;
use crate::lexer::{Token, TokenKind, Value};
use crate::lexer::{TokenKind, Value};
use std::convert::TryFrom;
impl Parser {
@ -113,7 +128,7 @@ impl Parser {
match &next.kind {
TokenKind::BraceClose => break,
TokenKind::Comma => {
self.next();
let _ = self.next();
continue;
}
TokenKind::Identifier(_) | TokenKind::Literal(_) => {
@ -207,7 +222,7 @@ impl Parser {
match self.peek()? {
tok if tok.kind == TokenKind::Keyword(Keyword::Else) => {
self.next();
let _ = self.next();
let peeked = self.peek()?;

Loading…
Cancel
Save