forked from AbleScript/ablescript
Removed a feature which disallowed comments in functios
This commit is contained in:
parent
6f193577ab
commit
690c78c9c0
|
@ -53,9 +53,16 @@ impl<'source> Parser<'source> {
|
|||
///
|
||||
/// If EOF, return Error instead of None
|
||||
fn checked_next(&mut self) -> Result<Token, Error> {
|
||||
self.lexer
|
||||
.next()
|
||||
.ok_or_else(|| Error::unexpected_eof(self.lexer.span().start))
|
||||
loop {
|
||||
match self
|
||||
.lexer
|
||||
.next()
|
||||
.ok_or_else(|| Error::unexpected_eof(self.lexer.span().start))?
|
||||
{
|
||||
Token::Comment => (),
|
||||
token => break Ok(token),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Parse a token
|
||||
|
|
Loading…
Reference in a new issue