// This function reports an error starting at the current location of the
// parser. Setting on_whole_token=false will report the error only on trivia,
// which is useful in cases such as when "a semicolon is expected here" before
// the current node. However, setting on_whole_token=true will report the error
// only on the non-trivia text of the next token parsed, which is useful
// in cases like "flagging an entire token as an extra".
This function reports an error starting at the current location of the
parser. Setting on_whole_token=false will report the error only on trivia,
which is useful in cases such as when "a semicolon is expected here" before
the current node. However, setting on_whole_token=true will report the error
only on the non-trivia text of the next token parsed, which is useful
in cases like "flagging an entire token as an extra".
This function reports an error starting at the current location of the parser . Setting on_whole_token = false will report the error only on trivia which is useful in cases such as when " a semicolon is expected here " before the current node . However setting on_whole_token = true will report the error only on the non - trivia text of the next token parsed which is useful in cases like " flagging an entire token as an extra " .
fn with_error_impl(&mut self, on_whole_token: bool, message: Error) {
        let (start_offset, end_offset) = self.error_offsets(on_whole_token);
        let error = SyntaxError::make(start_offset, end_offset, message);
        self.add_error(error)
    }
fn with_error_impl ( & mut self , on_whole_token : bool , message : Error ) { let ( start_offset , end_offset ) = self . error_offsets ( on_whole_token ) ; let error = SyntaxError :: make ( start_offset , end_offset , message ) ; self . add_error ( error ) }
This function reports an error starting at the current location of the
parser.
This function reports an error starting at the current location of the parser .
&mut self
on_whole_token
bool
message
Error