Run rustfmt
This commit is contained in:
parent
4b0aced11f
commit
05e1555a9b
@ -190,7 +190,7 @@ pub struct ParseError {
|
||||
impl ParseError {
|
||||
fn new_with_token<T, M>(msg: M, token: Token) -> ParseResult<T>
|
||||
where M: Into<String> {
|
||||
Err(ParseError { msg: msg.into(), location: Default::default(), token, })
|
||||
Err(ParseError { msg: msg.into(), location: Default::default(), token })
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,10 +22,7 @@ impl Parser {
|
||||
Self { id_store: IdStore::new() }
|
||||
}
|
||||
|
||||
pub(crate) fn parse(
|
||||
&mut self,
|
||||
input: &str,
|
||||
) -> Result<AST, ParseError> {
|
||||
pub(crate) fn parse(&mut self, input: &str) -> Result<AST, ParseError> {
|
||||
use peg::str::LineCol;
|
||||
|
||||
schala_parser::program(input, self).map_err(|err: peg::error::ParseError<LineCol>| {
|
||||
|
@ -136,7 +136,6 @@ impl SourceReference {
|
||||
|
||||
// (line_start, line_num, the string itself)
|
||||
pub fn get_line(&self, line: usize) -> (usize, usize, String) {
|
||||
|
||||
if self.newline_offsets.is_empty() {
|
||||
return (0, 0, self.last_source.as_ref().cloned().unwrap());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user