lib/scanner: cache! before fetch in scan_next_token
This commit is contained in:
parent
71dd1a52d5
commit
55b8f31b7b
|
@ -125,6 +125,12 @@ impl Scanner
|
|||
return self.fetch_stream_end(*base, tokens);
|
||||
}
|
||||
|
||||
// 4 characters is the longest token we can encounter, one
|
||||
// of:
|
||||
// - '--- '
|
||||
// - '... '
|
||||
cache!(~base, 4, opts)?;
|
||||
|
||||
// Fetch the next token(s)
|
||||
match base.as_bytes()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue