Extraneous comment
This commit is contained in:
parent
2c34ab52c4
commit
7c75f9b2a8
@ -987,50 +987,6 @@ impl Parser {
|
||||
})
|
||||
}
|
||||
|
||||
/*
|
||||
#[recursive_descent_method]
|
||||
fn simple_pattern(&mut self) -> ParseResult<Pattern> {
|
||||
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<Pattern> {
|
||||
let neg = match self.token_handler.peek_kind() {
|
||||
|
Loading…
Reference in New Issue
Block a user