Add doc comment to lex_n_tokens
This commit is contained in:
parent
b3bdd4ac64
commit
b26dd50006
|
@ -472,9 +472,11 @@ pub struct LexState<'a> {
|
||||||
pub span_offset: usize,
|
pub span_offset: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lex until the output is max_tokens longer than before the call, or until the input is exhausted.
|
/// Lex until the output is `max_tokens` longer than before the call, or until the input is exhausted.
|
||||||
// The behaviour here is non-obvious (maybe non-useful) iff your additional_whitespace doesn't include newline:
|
/// The return value indicates how many tokens the call added to / removed from the output.
|
||||||
// If you pass `output` in a state where the last token is an Eol, this might *remove* tokens.
|
///
|
||||||
|
/// The behaviour here is non-obvious when `additional_whitespace` doesn't include newline:
|
||||||
|
/// If you pass a `state` where the last token in the output is an Eol, this might *remove* tokens.
|
||||||
pub fn lex_n_tokens(
|
pub fn lex_n_tokens(
|
||||||
state: &mut LexState,
|
state: &mut LexState,
|
||||||
additional_whitespace: &[u8],
|
additional_whitespace: &[u8],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user