diff --git a/schala-lang/language/src/parsing.rs b/schala-lang/language/src/parsing.rs index 0c1a74f..16f90d9 100644 --- a/schala-lang/language/src/parsing.rs +++ b/schala-lang/language/src/parsing.rs @@ -987,50 +987,6 @@ impl Parser { }) } - /* - #[recursive_descent_method] - fn simple_pattern(&mut self) -> ParseResult { - Ok({ - let tok = self.token_handler.peek(); - match tok.get_kind() { - Identifier(_) => { - let id = self.identifier()?; - match self.token_handler.peek_kind() { - LCurlyBrace => { - let members = delimited!(self, LCurlyBrace, record_pattern_entry, Comma, RCurlyBrace); - Pattern::Record(id, members) - }, - LParen => { - let members = delimited!(self, LParen, pattern, Comma, RParen); - Pattern::TupleStruct(id, members) - }, - _ => Pattern::Literal(PatternLiteral::VarPattern(id)) - } - }, - Keyword(Kw::True) => { - self.token_handler.next(); - Pattern::Literal(PatternLiteral::BoolPattern(true)) - }, - Keyword(Kw::False) => { - self.token_handler.next(); - Pattern::Literal(PatternLiteral::BoolPattern(false)) - }, - StrLiteral(s) => { - self.token_handler.next(); - Pattern::Literal(PatternLiteral::StringPattern(s)) - }, - DigitGroup(_) | HexLiteral(_) | BinNumberSigil | Period => self.signed_number_literal()?, - Operator(ref op) if **op == "-" => self.signed_number_literal()?, - Underscore => { - self.token_handler.next(); - Pattern::Ignored - }, - other => return ParseError::new_with_token(format!("{:?} is not a valid Pattern", other), tok) - } - }) - } - */ - #[recursive_descent_method] fn signed_number_literal(&mut self) -> ParseResult { let neg = match self.token_handler.peek_kind() {